|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74045 memcache: compile warnings and runtime failure wrt. weirdly inlined functions
Submitted: 2017-02-05 10:22 UTC Modified: -
From: php at bof dot de Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 5.6.30 OS: openSUSE tumbleweed
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-02-05 10:22 UTC] php at bof dot de
PECL memcache-3.0.8 fails with GCC 6 ("gcc version 6.2.1 20161209 [gcc-6-branch revision 243481] (SUSE Linux)" in openSUSE tumbleweed current)

There are clear build warnings wrt. inline functions in memcache_pool.h and memcache_queue.h, as shown below. At runtime, use of any real memcache operation after connect, results in "symbol lookup failure" messages, and aborts the script run.

The attached patch fixes the issue, by removing the "inline" in the four memcache_{pool,queue}.{c,h} files.

In file included from /usr/src/phb/build/release-5.6.28/memcache/php_memcache.h:34:0,
                 from /usr/src/phb/build/release-5.6.28/memcache/memcache.c:30:
/usr/src/phb/build/release-5.6.28/memcache/memcache.c: At top level:
/usr/src/phb/build/release-5.6.28/memcache/memcache_pool.h:395:12: warning: inline function ‘mmc_prepare_key’ declared but never defined
 inline int mmc_prepare_key(zval *, char *, unsigned int *);

Test script:
$mc = new Memcache();
$mc->connect('', '11211', 5);
$mc->set('a', 23); # or any other real operation

Expected result:

Actual result:
/usr/bin/php5: symbol lookup error: /opt/php/extensions/ undefined symbol: mmc_queue_pop


memcache-uninline.patch (last revision 2017-02-05 10:24 UTC by php at bof dot de)

Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jan 18 14:01:25 2021 UTC