nicolasff/phpredis — Issue #65: does phpredis require php 5.3?
Author: aleiphoenix
Created: 2011-10-27 06:53:50+00:00
State: open

Hi, I'm tring to use phpredis with php 5.2. the compiling's good, but when i load redis extension. `php -m` reports.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/redis.so' - /usr/lib64/php/modules/redis.so: undefined symbol: array_init_size in Unknown on line 0

I googled it, saying `array_init_size` is defined in 'Zend/zend_API.h:343' which can only be found in source of php 5.3.
I'm wondering does phpredis require php 5.3?

here's the complete configure and make sequence. thanks

checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -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... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable redis support... yes, shared
checking whether to enable sessions... yes
checking for ld used by cc... /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 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 g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) 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
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 static flag -static works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged

-----------------make-----------------
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis.c -o redis.lo
mkdir .libs
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis.c -fPIC -DPIC -o .libs/redis.o
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/library.c -o library.lo
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/library.c -fPIC -DPIC -o .libs/library.o
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis_session.c -o redis_session.lo
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis_session.c -fPIC -DPIC -o .libs/redis_session.o
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis_array.c -o redis_array.lo
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis_array.c -fPIC -DPIC -o .libs/redis_array.o
/root/src/phpredis/redis_array.c: In function 'ra_forward_call':
/root/src/phpredis/redis_array.c:280: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array.c: In function 'multihost_distribute':
/root/src/phpredis/redis_array.c:456: warning: initialization discards qualifiers from pointer target type
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis_array_impl.c -o redis_array_impl.lo
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/redis_array_impl.c -fPIC -DPIC -o .libs/redis_array_impl.o
/root/src/phpredis/redis_array_impl.c: In function 'ra_load_array':
/root/src/phpredis/redis_array_impl.c:169: warning: passing argument 2 of 'zend_hash_find' discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:177: warning: passing argument 2 of 'zend_hash_find' discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:185: warning: passing argument 2 of 'zend_hash_find' discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:195: warning: passing argument 2 of 'zend_hash_find' discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:205: warning: passing argument 2 of 'zend_hash_find' discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_call_extractor':
/root/src/phpredis/redis_array_impl.c:273: warning: passing argument 2 of 'zend_is_callable_ex' makes integer from pointer without a cast
/root/src/phpredis/redis_array_impl.c:273: warning: passing argument 7 of 'zend_is_callable_ex' from incompatible pointer type
/root/src/phpredis/redis_array_impl.c:281: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_index_change_keys':
/root/src/phpredis/redis_array_impl.c:400: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_index_key':
/root/src/phpredis/redis_array_impl.c:477: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_rehash_scan':
/root/src/phpredis/redis_array_impl.c:545: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:548: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_get_key_type':
/root/src/phpredis/redis_array_impl.c:602: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_remove_from_index':
/root/src/phpredis/redis_array_impl.c:625: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_del_key':
/root/src/phpredis/redis_array_impl.c:647: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_move_zset':
/root/src/phpredis/redis_array_impl.c:673: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:721: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_move_string':
/root/src/phpredis/redis_array_impl.c:740: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:752: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_move_hash':
/root/src/phpredis/redis_array_impl.c:772: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:783: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'ra_move_collection':
/root/src/phpredis/redis_array_impl.c:804: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:808: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:813: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:833: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c:835: warning: initialization discards qualifiers from pointer target type
/root/src/phpredis/redis_array_impl.c: In function 'zval_rehash_callback':
/root/src/phpredis/redis_array_impl.c:931: warning: initialization discards qualifiers from pointer target type
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/igbinary/igbinary.c -o igbinary/igbinary.lo
mkdir igbinary/.libs
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/igbinary/igbinary.c -fPIC -DPIC -o igbinary/.libs/igbinary.o
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/igbinary/hash_si.c -o igbinary/hash_si.lo
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/igbinary/hash_si.c -fPIC -DPIC -o igbinary/.libs/hash_si.o
/bin/sh /root/src/phpredis/libtool --mode=compile cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/igbinary/hash_function.c -o igbinary/hash_function.lo
cc -I. -I/root/src/phpredis -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/src/phpredis/igbinary/hash_function.c -fPIC -DPIC -o igbinary/.libs/hash_function.o
/bin/sh /root/src/phpredis/libtool --mode=link cc -DPHP_ATOM_INC -I/root/src/phpredis/include -I/root/src/phpredis/main -I/root/src/phpredis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -o redis.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/src/phpredis/modules redis.lo library.lo redis_session.lo redis_array.lo redis_array_impl.lo igbinary/igbinary.lo igbinary/hash_si.lo igbinary/hash_function.lo
cc -shared .libs/redis.o .libs/library.o .libs/redis_session.o .libs/redis_array.o .libs/redis_array_impl.o igbinary/.libs/igbinary.o igbinary/.libs/hash_si.o igbinary/.libs/hash_function.o -Wl,-soname -Wl,redis.so -o .libs/redis.so
creating redis.la
(cd .libs && rm -f redis.la && ln -s ../redis.la redis.la)
/bin/sh /root/src/phpredis/libtool --mode=install cp ./redis.la /root/src/phpredis/modules
cp ./.libs/redis.so /root/src/phpredis/modules/redis.so
cp ./.libs/redis.lai /root/src/phpredis/modules/redis.la
PATH="$PATH:/sbin" ldconfig -n /root/src/phpredis/modules
----------------------------------------------------------------------
Libraries have been installed in:
/root/src/phpredis/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'.