Using libmemcache PHP extension on OS X

Gavin Dunne gavin at orgasm.com
Fri Mar 4 16:19:31 PST 2005


Hey everyone, I'm attempting to use the PHP libmemcache extension on:

Mac OS X 10.3.8
Apache 1.3.33
PHP 5.0.3
libmemcache 1.2.3
mcache 1.1.2

Configuration and compilation seems to go fine, however on restarting 
apache something goes wrong.  Following is a script of what I've done, 
any help in resolving this would be much appreciated.

Thanks, Gavin.


Script started on Fri Mar  4 15:48:39 2005
Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$ ./configure 
--with-php-config=/usr/local/bin/php-config 
--with-mcache=../libmemcache-1.2.3
checking build system type... powerpc-apple-darwin7.7.0
checking host system type... powerpc-apple-darwin7.7.0
checking for gcc... gcc
checking for C compiler default output... 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 ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... no
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/Zend 
-I/usr/local/include/php/TSRM
checking for PHP extension directory... 
/usr/local/lib/php/extensions/no-debug-non-zts-20041030
checking for re2c... exit 0;
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for mcache support... yes, shared
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
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 for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fl32... no
checking for af77... no
checking for fort77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for lf95... no
checking for g95... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 65536
checking command to parse /usr/bin/nm -p 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... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared 
libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... darwin7.7.0 dyld
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... darwin7.7.0 dyld
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$ make
/bin/sh /Users/gdunne/Src/mcache/libtool --mode=compile gcc  -I. 
-I/Users/gdunne/Src/mcache -DPHP_ATOM_INC 
-I/Users/gdunne/Src/mcache/include -I/Users/gdunne/Src/mcache/main 
-I/Users/gdunne/Src/mcache -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/Zend 
-I/usr/local/include/php/TSRM -I/Users/gdunne/Src/libmemcache-1.2.3  
-DHAVE_CONFIG_H  -g -O2  -prefer-pic -c 
/Users/gdunne/Src/mcache/mcache.c -o mcache.lo
mkdir .libs
  gcc -I. -I/Users/gdunne/Src/mcache -DPHP_ATOM_INC 
-I/Users/gdunne/Src/mcache/include -I/Users/gdunne/Src/mcache/main 
-I/Users/gdunne/Src/mcache -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/Zend 
-I/usr/local/include/php/TSRM -I/Users/gdunne/Src/libmemcache-1.2.3 
-DHAVE_CONFIG_H -g -O2 -c /Users/gdunne/Src/mcache/mcache.c  
-fno-common -DPIC -o .libs/mcache.o
In file included from /Users/gdunne/Src/mcache/mcache.c:33:
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c: In function 
`mcm_atomic_cmd':
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:498: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:500: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:502: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:512: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c: In function 
`mcm_delete':
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:584: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:586: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:588: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:598: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c: In function 
`mcm_fetch_cmd':
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:642: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:652: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:656: warning: assignment 
discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:666: warning: assignment 
discards qualifiers from pointer target type
In file included from /Users/gdunne/Src/mcache/mcache.c:33:
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c: In function 
`mcm_res_free':
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:1298: warning: passing 
arg 1 of pointer to function discards qualifiers from pointer target 
type
In file included from /Users/gdunne/Src/mcache/mcache.c:33:
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c: In function 
`mcm_storage_cmd':
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:2159: warning: 
assignment discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:2161: warning: 
assignment discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:2163: warning: 
assignment discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:2205: warning: 
assignment discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:2212: warning: 
assignment discards qualifiers from pointer target type
/Users/gdunne/Src/libmemcache-1.2.3/memcache.c:2216: warning: 
assignment discards qualifiers from pointer target type
/bin/sh /Users/gdunne/Src/mcache/libtool --mode=link gcc -DPHP_ATOM_INC 
-I/Users/gdunne/Src/mcache/include -I/Users/gdunne/Src/mcache/main 
-I/Users/gdunne/Src/mcache -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/Zend 
-I/usr/local/include/php/TSRM -I/Users/gdunne/Src/libmemcache-1.2.3  
-DHAVE_CONFIG_H  -g -O2   -o mcache.la -export-dynamic -avoid-version 
-prefer-pic -module -rpath /Users/gdunne/Src/mcache/modules  mcache.lo
gcc -bundle  -flat_namespace -undefined suppress -o .libs/mcache.so  
.libs/mcache.o
creating mcache.la
(cd .libs && rm -f mcache.la && ln -s ../mcache.la mcache.la)
/bin/sh /Users/gdunne/Src/mcache/libtool --mode=install cp ./mcache.la 
/Users/gdunne/Src/mcache/modules
cp ./.libs/mcache.so /Users/gdunne/Src/mcache/modules/mcache.so
cp ./.libs/mcache.lai /Users/gdunne/Src/mcache/modules/mcache.la
----------------------------------------------------------------------
Libraries have been installed in:
    /Users/gdunne/Src/mcache/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 `DYLD_LIBRARY_PATH' environment variable
      during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$ sudo make install
Installing shared extensions:     
/usr/local/lib/php/extensions/no-debug-non-zts-20041030/
Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$
Chasey:~/Src/mcache gdunne$ sudo apachectl configtest
Processing config directory: /etc/httpd/*.include
[Fri Mar  4 15:50:10 2005] [alert] httpd: Could not determine the 
server's fully qualified domain name, using 127.0.0.1 for ServerName
[Fri Mar  4 15:50:10 2005] [error] Failed to resolve server name for 
10.0.1.202 (check DNS) -- or specify an explicit ServerName
Syntax OK
dyld: /usr/sbin/httpd Undefined symbols:
__array_init
__convert_to_string
__efree
__emalloc
__erealloc
__estrndup
__object_init_ex
__zend_hash_add_or_update
__zend_hash_init
__zend_list_find
_add_assoc_double_ex
_add_assoc_long_ex
_add_assoc_string_ex
_add_assoc_zval_ex
_add_property_resource_ex
_ap_php_snprintf
_convert_to_double
_convert_to_long
_executor_globals
_php_info_print_table_end
_php_info_print_table_header
_php_info_print_table_row
_php_info_print_table_start
_php_var_serialize
_php_var_unserialize
_var_destroy
_zend_error
_zend_hash_del_key_or_index
_zend_hash_destroy
_zend_hash_find
_zend_hash_get_current_data_ex
_zend_hash_get_current_key_ex
_zend_hash_internal_pointer_reset_ex
_zend_hash_move_forward_ex
_zend_hash_num_elements
_zend_list_insert
_zend_parse_parameters
_zend_register_internal_class
_zend_register_list_destructors_ex
_zend_wrong_param_count
/usr/sbin/apachectl: line 193: 28743 Trace/BPT trap          $HTTPD -t
Chasey:~/Src/mcache gdunne$ exit
exit

Script done on Fri Mar  4 15:50:14 2005



More information about the memcached mailing list