Skip to content

Conversation

@christianchristensen
Copy link

Ref: #33

@giac
Copy link
Contributor

giac commented Mar 22, 2013

Hi,

This pull request seems to fix the compilation of r2.1.0 on Precise but it fails on Master with a different error:

/home/god/src/php-memcached/php_memcached_session.c: In function 'ps_open_memcached':
/home/god/src/php-memcached/php_memcached_session.c:189:24: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/god/src/php-memcached/php_memcached_session.c:238:54: error: 'MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS' undeclared (first use in this function)
/home/god/src/php-memcached/php_memcached_session.c:238:54: note: each undeclared identifier is reported only once for each function it appears in
make: *** [php_memcached_session.lo] Error 1

@auroraeosrose
Copy link

Pretty simple fix for the second issue - php_memcached_session.c is missing an ifdef on line 237

#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x00049000

around that whole block fixes the compile issue

@mkoppanen
Copy link
Member

There are quite a few issues even then, mainly missing functions (compile -Wimplicit-function-declaration).

@auroraeosrose
Copy link

It compiles with that one liner change and all the tests are passing - so either the stuff that's missing isn't tested, or something else is going on

@mkoppanen
Copy link
Member

hmmm, i wonder how that works. Looking at the following entry from config.m4:

AC_MSG_CHECKING([for libmemcached location])
if test "$PHP_LIBMEMCACHED_DIR" != "no" && test "$PHP_LIBMEMCACHED_DIR" != "yes"; then
  if ! test -r "$PHP_LIBMEMCACHED_DIR/include/libmemcached-1.0/memcached.h"; then
    AC_MSG_ERROR([Can't find libmemcached 1.0.x headers under "$PHP_LIBMEMCACHED_DIR"])
  fi

This should fail already in configure phase if the header is not there. Is it picking up header from different installation?

@mkoppanen
Copy link
Member

It compiles with some changes and ifdefs but still quite a few undefined symbols. It is quite a while since 1.0.x series have been release: 1.0.2 release from the 1.0 series released 2011-10-27.

I can review a patch if someone produces one. The current PR is dangerous to apply as is.

@mkoppanen
Copy link
Member

Added preliminary support here: 47f6ff1

Passes tests with 0.44 and 0.53 for now. Not sure how stable it is, was a bit involved

@mkoppanen
Copy link
Member

This has been fixed

@mkoppanen mkoppanen closed this Oct 27, 2013
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

Successfully merging this pull request may close these issues.

4 participants