libmemcached機能拡張をビルドしてみる(いったん挫折
gccの状態
$ gcc -v Using built-in specs. Target: i386-redhat-linux コンフィグオプション: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=i386-redhat-linux スレッドモデル: posix gcc バージョン 4.1.2 20070502 (Red Hat 4.1.2-12)
phpの状態
$ php -v PHP 5.2.6 (cli) (built: May 7 2008 00:30:35) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans
libmemcached
本家から落としてきたSRPMのリビルドしたもの
$ rpm -ql libmemcached /usr/bin/memcat /usr/bin/memcp /usr/bin/memerror /usr/bin/memflush /usr/bin/memrm /usr/bin/memslap /usr/bin/memstat /usr/include/libmemcached/libmemcached_config.h /usr/include/libmemcached/memcached.h /usr/include/libmemcached/memcached.hh /usr/include/libmemcached/memcached_constants.h /usr/include/libmemcached/memcached_get.h /usr/include/libmemcached/memcached_result.h /usr/include/libmemcached/memcached_server.h /usr/include/libmemcached/memcached_storage.h /usr/include/libmemcached/memcached_string.h /usr/include/libmemcached/memcached_types.h /usr/include/libmemcached/memcached_watchpoint.h /usr/lib/libmemcached.a /usr/lib/libmemcached.la /usr/lib/libmemcached.so /usr/lib/libmemcached.so.2 /usr/lib/libmemcached.so.2.0.0 /usr/lib/pkgconfig/libmemcached.pc /usr/share/man/man1/memcat.1.gz /usr/share/man/man1/memcp.1.gz /usr/share/man/man1/memerror.1.gz /usr/share/man/man1/memflush.1.gz /usr/share/man/man1/memrm.1.gz /usr/share/man/man1/memslap.1.gz /usr/share/man/man1/memstat.1.gz /usr/share/man/man3/libmemcached.3.gz /usr/share/man/man3/libmemcached_examples.3.gz /usr/share/man/man3/memcached_add.3.gz /usr/share/man/man3/memcached_add_by_key.3.gz /usr/share/man/man3/memcached_append.3.gz /usr/share/man/man3/memcached_append_by_key.3.gz /usr/share/man/man3/memcached_behavior_get.3.gz /usr/share/man/man3/memcached_behavior_set.3.gz /usr/share/man/man3/memcached_callback_get.3.gz /usr/share/man/man3/memcached_callback_set.3.gz /usr/share/man/man3/memcached_cas.3.gz /usr/share/man/man3/memcached_cas_by_key.3.gz /usr/share/man/man3/memcached_clone.3.gz /usr/share/man/man3/memcached_create.3.gz /usr/share/man/man3/memcached_decrement.3.gz /usr/share/man/man3/memcached_delete.3.gz /usr/share/man/man3/memcached_delete_by_key.3.gz /usr/share/man/man3/memcached_fetch.3.gz /usr/share/man/man3/memcached_fetch_execute.3.gz /usr/share/man/man3/memcached_fetch_result.3.gz /usr/share/man/man3/memcached_free.3.gz /usr/share/man/man3/memcached_get.3.gz /usr/share/man/man3/memcached_get_by_key.3.gz /usr/share/man/man3/memcached_increment.3.gz /usr/share/man/man3/memcached_lib_version.3.gz /usr/share/man/man3/memcached_mget.3.gz /usr/share/man/man3/memcached_mget_by_key.3.gz /usr/share/man/man3/memcached_prepend.3.gz /usr/share/man/man3/memcached_prepend_by_key.3.gz /usr/share/man/man3/memcached_quit.3.gz /usr/share/man/man3/memcached_replace.3.gz /usr/share/man/man3/memcached_replace_by_key.3.gz /usr/share/man/man3/memcached_server_add.3.gz /usr/share/man/man3/memcached_server_count.3.gz /usr/share/man/man3/memcached_server_list.3.gz /usr/share/man/man3/memcached_server_list_append.3.gz /usr/share/man/man3/memcached_server_list_count.3.gz /usr/share/man/man3/memcached_server_list_free.3.gz /usr/share/man/man3/memcached_server_push.3.gz /usr/share/man/man3/memcached_servers_parse.3.gz /usr/share/man/man3/memcached_set.3.gz /usr/share/man/man3/memcached_set_by_key.3.gz /usr/share/man/man3/memcached_stat.3.gz /usr/share/man/man3/memcached_stat_get_keys.3.gz /usr/share/man/man3/memcached_stat_get_value.3.gz /usr/share/man/man3/memcached_stat_servername.3.gz /usr/share/man/man3/memcached_strerror.3.gz /usr/share/man/man3/memcached_verbosity.3.gz /usr/share/man/man3/memcached_version.3.gz
ビルド環境でRPMのビルドをしてみる
$ make mkdir -p BUILD RPMS SOURCES SPECS SRPMS /usr/bin/rpmbuild --define "_topdir ${PWD}" --pipe "tee build-rpm.log" -bb php-ext-libmemcached.spec 2>&1 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.74233 + umask 022 + cd 〜/rpm/php-ext-libmemcached/BUILD + LANG=C + export LANG + unset DISPLAY + cd 〜/rpm/php-ext-libmemcached/BUILD + rm -rf php-libmemcached-0.1.0 + /bin/gzip -dc 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0.tar.gz + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd php-libmemcached-0.1.0 ++ /usr/bin/id -u + '[' 511 = 0 ']' ++ /usr/bin/id -u + '[' 511 = 0 ']' + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.74233 + umask 022 + cd 〜/rpm/php-ext-libmemcached/BUILD + cd php-libmemcached-0.1.0 + LANG=C + export LANG + unset DISPLAY + phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached ../../lib/autoconf/general.m4:1973: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:1993: AC_CACHE_CHECK is expanded from... aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from... aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from... aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from... aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from... configure.in:77: the top level configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from... aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from... configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from... aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from... aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from... configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached ../../lib/autoconf/general.m4:1973: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:1993: AC_CACHE_CHECK is expanded from... aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from... aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from... aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from... aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from... configure.in:77: the top level configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from... aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from... configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from... aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from... aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from... + CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' + export CFLAGS + CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' + export CXXFLAGS + FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' + export FFLAGS ++ find . -name config.guess -o -name config.sub + for i in '$(find . -name config.guess -o -name config.sub)' ++ basename ./config.guess + '[' -f /usr/lib/rpm/redhat/config.guess ']' + /bin/rm -f ./config.guess ++ basename ./config.guess + /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess `/usr/lib/rpm/redhat/config.guess' -> `./config.guess' + for i in '$(find . -name config.guess -o -name config.sub)' ++ basename ./config.sub + '[' -f /usr/lib/rpm/redhat/config.sub ']' + /bin/rm -f ./config.sub ++ basename ./config.sub + /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub `/usr/lib/rpm/redhat/config.sub' -> `./config.sub' + ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-libmemcached=shared checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for i686-redhat-linux-gnu-gcc... no checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc and cc understand -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i386-redhat-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib checking for PHP extension directory... /usr/lib/php5/extensions checking for PHP installed headers prefix... /usr/include/php5/php checking for re2c... no configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether to enable libmemcached support... yes, shared checking for the location of libmemcached (--with specified)... no checking for the location of libmemcached... /usr checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... nm checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking the maximum length of command line arguments... 32768 checking command to parse nm output from gcc object... ok checking for objdir... .libs checking for i686-redhat-linux-gnu-ar... no checking for ar... ar checking for i686-redhat-linux-gnu-ranlib... no checking for ranlib... ranlib checking for i686-redhat-linux-gnu-strip... no checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no creating libtool appending configuration tag "CXX" to libtool configure: creating ./config.status config.status: creating config.h + /usr/bin/make make[1]: Entering directory `/home2〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0' /bin/sh 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libtool --mode=compile gcc -I. -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0 -DPHP_ATOM_INC -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/include -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/main -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0 -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Werror -c 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c -o libmemcached.lo mkdir .libs gcc -I. -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0 -DPHP_ATOM_INC -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/include -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/main -I〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0 -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Werror -c 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c -fPIC -DPIC -o .libs/libmemcached.o cc1: warnings being treated as errors 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c: In function '_php_libmemcached_get_memcached_connection': 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:200: warning: dereferencing type-punned pointer will break strict-aliasing rules 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c: In function '_php_libmemcached_get_value': 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:262: warning: pointer targets in passing argument 1 of 'uncompress' differ in signedness 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:262: warning: pointer targets in passing argument 3 of 'uncompress' differ in signedness 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:275: warning: dereferencing type-punned pointer will break strict-aliasing rules 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c: In function '_get_value_from_zval': 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:336: warning: pointer targets in passing argument 1 of 'compress' differ in signedness 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:336: warning: pointer targets in passing argument 3 of 'compress' differ in signedness 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c: In function 'zif_memcached_mget': 〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0/libmemcached.c:1066: warning: dereferencing type-punned pointer will break strict-aliasing rules make[1]: *** [libmemcached.lo] Error 1 make[1]: Leaving directory `/home2〜/rpm/php-ext-libmemcached/BUILD/php-libmemcached-0.1.0' error: Bad exit status from /var/tmp/rpm-tmp.74233 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.74233 (%build) make: *** [.build-rpm] Error 1
ふつーにphpizeからしてみる
[elf@server SOURCES]$ tar zxvf php-libmemcached-0.1.0.tar.gz php-libmemcached-0.1.0/ php-libmemcached-0.1.0/EXPERIMENTAL php-libmemcached-0.1.0/CREDITS php-libmemcached-0.1.0/php_libmemcached.h php-libmemcached-0.1.0/README php-libmemcached-0.1.0/config.m4 php-libmemcached-0.1.0/libmemcached.c [elf@server SOURCES]$ cd php-libmemcached-0.1.0 [elf@server php-libmemcached-0.1.0]$ phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached ../../lib/autoconf/general.m4:1973: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:1993: AC_CACHE_CHECK is expanded from... aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from... aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from... aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from... aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from... configure.in:77: the top level configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from... aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from... configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from... aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from... aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from... configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached ../../lib/autoconf/general.m4:1973: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:1993: AC_CACHE_CHECK is expanded from... aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from... aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from... aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from... aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from... configure.in:77: the top level configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from... aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from... configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from... aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from... aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from... [elf@server php-libmemcached-0.1.0]$ ./configure --enable-libmemcached=shared checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc and cc understand -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib checking for PHP extension directory... /usr/lib/php5/extensions checking for PHP installed headers prefix... /usr/include/php5/php checking for re2c... no configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether to enable libmemcached support... yes, shared checking for the location of libmemcached (--with specified)... no checking for the location of libmemcached... /usr checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no creating libtool appending configuration tag "CXX" to libtool configure: creating ./config.status config.status: creating config.h [elf@server php-libmemcached-0.1.0]$ make /bin/sh 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/libtool --mode=compile gcc -I. -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0 -DPHP_ATOM_INC -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/include -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/main -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0 -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Werror -c 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/libmemcached.c -o libmemcached.lo mkdir .libs gcc -I. -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0 -DPHP_ATOM_INC -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/include -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/main -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0 -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Werror -c 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/libmemcached.c -fPIC -DPIC -o .libs/libmemcached.o /bin/sh 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/libtool --mode=link gcc -DPHP_ATOM_INC -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/include -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/main -I〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0 -I/usr/include/php5/php -I/usr/include/php5/php/main -I/usr/include/php5/php/TSRM -I/usr/include/php5/php/Zend -I/usr/include/php5/php/ext -I/usr/include/php5/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Werror -o libmemcached.la -export-dynamic -avoid-version -prefer-pic -module -rpath 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/modules libmemcached.lo -lmemcached gcc -shared .libs/libmemcached.o /usr/lib/libmemcached.so -Wl,-soname -Wl,libmemcached.so -o .libs/libmemcached.so creating libmemcached.la (cd .libs && rm -f libmemcached.la && ln -s ../libmemcached.la libmemcached.la) /bin/sh 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/libtool --mode=install cp ./libmemcached.la 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/modules cp ./.libs/libmemcached.so 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/modules/libmemcached.so cp ./.libs/libmemcached.lai 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/modules/libmemcached.la PATH="$PATH:/sbin" ldconfig -n 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/modules ---------------------------------------------------------------------- Libraries have been installed in: 〜/rpm/php-ext-libmemcached/SOURCES/php-libmemcached-0.1.0/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Build complete. Don't forget to run 'make test'. $ ls -la modules/ total 92 drwxrwxr-x 2 elf elf 4096 2008-09-18 18:37 ./ drwxr-xr-x 7 elf elf 4096 2008-09-18 18:37 ../ -rw-rw-r-- 1 elf elf 908 2008-09-18 18:37 libmemcached.la -rwxrwxr-x 1 elf elf 74203 2008-09-18 18:37 libmemcached.so*
できたやん!!
やり直しだ…