Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcached 2.1.0 requires libmemcached 1.0.10 #25

Closed
remicollet opened this issue Aug 7, 2012 · 9 comments
Closed

memcached 2.1.0 requires libmemcached 1.0.10 #25

remicollet opened this issue Aug 7, 2012 · 9 comments

Comments

@remicollet
Copy link
Collaborator

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
@skirpichev
Copy link

or apply patch from debian to reduce version requirements:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684949

@remicollet
Copy link
Collaborator Author

See pull request #27 which seems a better solution.

@iliaal
Copy link
Member

iliaal commented Nov 10, 2012

Fixed.

@iliaal iliaal closed this as completed Nov 10, 2012
@giac
Copy link
Contributor

giac commented Mar 22, 2013

Hi,

I didn't get this compilation warning on master, but I get the same warning message when executing php:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/memcached.so' - /usr/lib/php5/20100525/memcached.so: undefined symbol: memcached_server_micro_version in Unknown on line 0

Should this be reopened or shall I open a new issue?

My system:
Ubuntu precise with php 5.4 and libmemcached 1.0.8 packaged by Ondřej Surý:
https://launchpad.net/~ondrej/+archive/php5?field.series_filter=precise

Using the default php and libmembached packages shipped with Ubuntu Precise the compilation fails, but that's issue #33

@giac
Copy link
Contributor

giac commented Mar 26, 2013

I found what the problem was, see pull request #68
Those symbols have been introduced in libmemcached 1.0.9 but php_memcached.c was trying to use them from version 1.0.8.

@seyfer
Copy link

seyfer commented Nov 6, 2013

@mkoppanen mkoppanen reopened this Nov 6, 2013
mkoppanen added a commit that referenced this issue Nov 6, 2013
@mkoppanen
Copy link
Member

@seyfer,

are you testing with currently released version or master? This has been fixed in master but it is a known issue for 2.1.0

@seyfer
Copy link

seyfer commented Nov 6, 2013

@mkoppanen , hi. I'm install with pecl
And in pecl 2.1.0 is current release.

How i can build master?

@mkoppanen
Copy link
Member

git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
phpize
./configure
make
make install

Closing this issue because it has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants