php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at bof dot de
New email:
PHP Version: OS:

 

 [2017-02-05 10:22 UTC] php at bof dot de
Description:
------------
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('127.0.0.1', '11211', 5);
$mc->set('a', 23); # or any other real operation

Expected result:
----------------
works

Actual result:
--------------
/usr/bin/php5: symbol lookup error: /opt/php/extensions/memcache.so: undefined symbol: mmc_queue_pop


Patches

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-2020 The PHP Group
All rights reserved.
Last updated: Sun Sep 20 08:01:26 2020 UTC