Bug #67849 [Asn]: error compiling mysqlnd if zlib is compiled shared
Edit report at https://bugs.php.net/bug.php?id=67849&edit=1
ID: 67849
User updated by: public at grik dot net
Reported by: public at grik dot net
Summary: error compiling mysqlnd if zlib is compiled shared
Status: Assigned
Type: Bug
Package: MySQL related
-Operating System: OSX 10.9
+Operating System: Linux, OSX 10.9
PHP Version: 5.6.0RC4
Assigned To: mysql
Block user comment: N
Private report: N
New Comment:
reproduced in Linux
ext/mysqlnd/.libs/mysqlnd_net.o: In function `php_mysqlnd_net_encode_pub':
/usr/src/web/php-5.6.0RC4/ext/mysqlnd/mysqlnd_net.c:608: undefined reference to `compress'
ext/mysqlnd/.libs/mysqlnd_net.o: In function `php_mysqlnd_net_decode_pub':
/usr/src/web/php-5.6.0RC4/ext/mysqlnd/mysqlnd_net.c:584: undefined reference to `uncompress'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Previous Comments:
------------------------------------------------------------------------
[2014-08-15 17:15:34] aharvey@php.net
The trick here appears to be to force pdo_mysql and mysqlnd to be built as shared as well, via
./configure --disable-all --enable-mysqlnd=shared --enable-pdo --with-pdo-mysql=shared
--with-zlib=shared.
Reassigning to the MySQL team. I'm not sure if we can detect this in mysqlnd's config9.m4,
but it might be worth looking at.
------------------------------------------------------------------------
[2014-08-15 14:35:41] public at grik dot net
Description:
------------
trying to compile php 5.6 RC4
separately pdo-mysql and zlib extensions compile successfully, as well as if zlib is not shared, but
if zlib is configured as shared, pdo-mysql extension fails to be built
Test script:
---------------
php-5.6.0RC4 gri$ ./configure --disable-all --enable-pdo --with-pdo-mysql --with-zlib=shared
...
php-5.6.0RC4 gri$ make
...
Undefined symbols for architecture x86_64:
"_compress", referenced from:
_php_mysqlnd_net_encode_pub in mysqlnd_net.o
"_uncompress", referenced from:
_php_mysqlnd_net_decode_pub in mysqlnd_net.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cli/php] Error 1
Expected result:
----------------
build successful
Actual result:
--------------
Undefined symbols for architecture x86_64:
"_compress", referenced from:
_php_mysqlnd_net_encode_pub in mysqlnd_net.o
"_uncompress", referenced from:
_php_mysqlnd_net_decode_pub in mysqlnd_net.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cli/php] Error 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67849&edit=1
Thread (7 messages)