php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59959 build issue with memcached and lib64
Submitted: 2011-09-18 04:43 UTC Modified: 2012-02-11 00:37 UTC
From: Fedora at FamilleCollet dot com Assigned: mysql (profile)
Status: Closed Package: mysqlnd_qc (PECL)
PHP Version: 5.3.6 OS: GNU/Linux (Fedora 15)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Fedora at FamilleCollet dot com
New email:
PHP Version: OS:

 

 [2011-09-18 04:43 UTC] Fedora at FamilleCollet dot com
Description:
------------
When building with --enable-mysqlnd-qc-memcache, libmemcached is not add
to linker option.

lib is hardcoded, when it should be PHP_LIBDIR to be able to use lib64.

This patch fixes this issue:
https://github.com/remicollet/remirepo/blob/master/php-pecl-mysqlnd-qc/mysqlnd_qc-build.patch

Reproduce code:
---------------
./configure --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib
--mandir=/usr/share/man --infodir=/usr/share/info --with-libdir=lib64
--enable-mysqlnd-qc --enable-mysqlnd-qc-memcache
--enable-mysqlnd-qc-sqlite --with-sqlite-dir=/usr
--with-php-config=/usr/bin/php-config

AND

php -n -q -d extension_dir=modules -d extension=mysqlnd.so -d extension=sqlite3.so -d extension=mysqlnd_qc.so --modules | grep
mysqlnd_qc


Expected result:
----------------
## Link with -lmemcached and lsqlite3
libtool: link: cc -shared  -fPIC -DPIC  .libs/php_mysqlnd_qc.o
.libs/mysqlnd_qc.o .libs/mysqlnd_qc_ps.o .libs/mysqlnd_qc_logs.o
.libs/mysqlnd_qc_zval_util.o .libs/mysqlnd_qc_user_handler.o
.libs/mysqlnd_qc_std_handler.o .libs/mysqlnd_qc_classes.o
.libs/mysqlnd_qc_object_handler.o .libs/mysqlnd_qc_nop_handler.o
.libs/mysqlnd_qc_tokenize.o .libs/mysqlnd_qc_memcache_handler.o
.libs/mysqlnd_qc_sqlite_handler.o   -lsqlite3 -lmemcached  -O2 -m64
-mtune=generic   -Wl,-soname -Wl,mysqlnd_qc.so -o .libs/mysqlnd_qc.so

## Load succeed
mysqlnd_qc

Actual result:
--------------
## Link without -lmemcached
libtool: link: cc -shared  -fPIC -DPIC  .libs/php_mysqlnd_qc.o
.libs/mysqlnd_qc.o .libs/mysqlnd_qc_ps.o .libs/mysqlnd_qc_logs.o
.libs/mysqlnd_qc_zval_util.o .libs/mysqlnd_qc_user_handler.o
.libs/mysqlnd_qc_std_handler.o .libs/mysqlnd_qc_classes.o
.libs/mysqlnd_qc_object_handler.o .libs/mysqlnd_qc_nop_handler.o
.libs/mysqlnd_qc_tokenize.o .libs/mysqlnd_qc_memcache_handler.o
.libs/mysqlnd_qc_sqlite_handler.o   -lsqlite3  -O2 -m64 -mtune=generic  
-Wl,-soname -Wl,mysqlnd_qc.so -o .libs/mysqlnd_qc.so

## Can't load
PHP Warning:  PHP Startup: Unable to load dynamic library
'modules/mysqlnd_qc.so' - modules/mysqlnd_qc.so: undefined symbol:
memcached_free in Unknown on line 0

Patches

build-1.1.0.patch (last revision 2012-01-30 09:41 UTC by remi@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-30 09:41 UTC] remi@php.net
The following patch has been added/updated:

Patch Name: build-1.1.0.patch
Revision:   1327916501
URL:        https://bugs.php.net/patch-display.php?bug=59959&patch=build-1.1.0.patch&revision=1327916501
 [2012-01-30 11:36 UTC] uw@php.net
Automatic comment from SVN on behalf of uw
Revision: http://svn.php.net/viewvc/?view=revision&revision=322930
Log: Fix Bug #59959 (64bit memcached library build issues). Thanks Remi... Please go ahead and either patch code directly or file bug reports, just as you do now. If you do not see a quick response to a minor bug report but need fast reaction, please feel free to commit to trunk yourself.
 [2012-02-11 00:37 UTC] johannes@php.net
Patch was applied by Ulf. Closing the bug.
 [2012-02-11 00:37 UTC] johannes@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC