-
Notifications
You must be signed in to change notification settings - Fork 327
Description
Latest version use memcached_server_*_version which are not available in libmemcached < 1.0.10 (tested with 1.0.8)
This only cast warning during build.
.../php_memcached.c:2646:5: warning: implicit declaration of function 'memcached_server_major_version' [-Wimplicit-function-declaration]
.../php_memcached.c:2647:5: warning: implicit declaration of function 'memcached_server_minor_version' [-Wimplicit-function-declaration]
.../php_memcached.c:2648:5: warning: implicit declaration of function 'memcached_server_micro_version' [-Wimplicit-function-declaration]
So build succeed, but created extension is unusable.
PHP Warning: PHP Startup: Unable to load dynamic library 'modules/memcached.so' - modules/memcached.so: undefined symbol: memcached_server_micro_version in Unknown on line 0
1/ I think this should be documented
2/ it will be great to detect this at configure time
Per example, adding in config.m4, after AC_MSG_RESULT([$PHP_LIBMEMCACHED_DIR])
O_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -L$PHP_LIBMEMCACHED_DIR/$PHP_LIBDIR"
AC_CHECK_LIB(memcached, memcached_server_major_version, , AC_MSG_ERROR([memcached support requires libmemcached >= 1.0.10]))
LDFLAGS=$O_LDFLAGS