php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49122 undefined reference to mysqlnd_stmt_next_result on compile with --with-mysqli
Submitted: 2009-07-31 13:27 UTC Modified: 2010-08-18 12:27 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: gabrycucciolo84pv at fastwebnet dot it Assigned: mysql
Status: No Feedback Package: MySQL related
PHP Version: 5.3, 6 (2009-08-04) OS: Centos 4
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-07-31 13:27 UTC] gabrycucciolo84pv at fastwebnet dot it
Description:
------------
i have this error while 'make'ing php 5.3.0 with centos 4 (no problems with 5.2.9): undefined reference to 'mysqlnd_stmt_next_result'

Box: CentOS 4.7 Final
Apache: 2.2.12
PHP: (trying to compile 5.3.0, originally 5.2.9)
MySQL: 6.0.11 alpha

Reproduce code:
---------------
/usr/bin/ld: warning: libssl.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libssl.so.0.9.8
/usr/bin/ld: warning: libssl.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libssl.so.0.9.8
/usr/bin/ld: warning: libssl.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libssl.so.0.9.8
/usr/bin/ld: warning: libssl.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libssl.so.0.9.8
/usr/bin/ld: warning: libssl.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libssl.so.0.9.8
/usr/bin/ld: warning: libcrypto.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libcrypto.so.0.9.8
/usr/bin/ld: warning: libcrypto.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libcrypto.so.0.9.8
/usr/bin/ld: warning: libcrypto.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libcrypto.so.0.9.8
/usr/bin/ld: warning: libcrypto.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libcrypto.so.0.9.8
/usr/bin/ld: warning: libcrypto.so.4, needed by /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libcurl.so, may conflict with libcrypto.so.0.9.8
ext/mysqli/.libs/mysqli_api.o(.text+0x304a): In function `zif_mysqli_stmt_more_results':
/root/php-5.3.0/ext/mysqli/mysqli_api.c:1500: undefined reference to `mysqlnd_stmt_more_results'
ext/mysqli/.libs/mysqli_api.o(.text+0x30da): In function `zif_mysqli_stmt_next_result':
/root/php-5.3.0/ext/mysqli/mysqli_api.c:1516: undefined reference to `mysqlnd_stmt_more_results'
ext/mysqli/.libs/mysqli_api.o(.text+0x30ef):/root/php-5.3.0/ext/mysqli/mysqli_api.c:1522: undefined reference to `mysqlnd_stmt_next_result'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Expected result:
----------------
Compilation success


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-31 16:56 UTC] jani@php.net
What was the full configure line you used?
 [2009-08-01 21:44 UTC] gabrycucciolo84pv at fastwebnet dot it
./configure --with-openssl --disable-mbregex --enable-ctype --with-curl --enable-exif --with-iconv --enable-json --enable-libxml --enable-mbstring --with-bz2 --enable-soap --enable-bcmath --enable-calendar --enable-ftp --with-gd --with-mcrypt --with-mhash --enable-zip --enable-xmlreader --enable-xmlwriter --with-mysql --with-mysqli --with-apxs2=/usr/local/apache2/bin/apxs --with-pear --with-zlib --with-servlet --enable-gd-native-ttf)
 [2009-08-02 01:07 UTC] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286640
Log: - Fixed bug #49122 (undefined reference to mysqlnd_stmt_next_result on compile with  --with-mysqli and MySQL 6.0)
 [2009-08-02 01:46 UTC] jani@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2009-08-04 12:53 UTC] gabrycucciolo84pv at fastwebnet dot it
I am now getting 

4.6/../../../libcurl.so, may conflict with libcrypto.so.0.9.8
ext/mysqli/.libs/mysqli_api.o(.text+0x304a): In function `zif_mysqli_stmt_more_results':
/root/php5.3-200908040430/ext/mysqli/mysqli_api.c:1500: undefined reference to `mysql_stmt_more_results'
ext/mysqli/.libs/mysqli_api.o(.text+0x30da): In function `zif_mysqli_stmt_next_result':
/root/php5.3-200908040430/ext/mysqli/mysqli_api.c:1516: undefined reference to `mysql_stmt_more_results'

making dev build 200908040430 with the same configure as above
 [2009-08-04 14:47 UTC] jani@php.net
Apparently this is some mysqlnd-only thing. Assigning to Andrey who added it but didn't test it.
 [2009-08-04 14:49 UTC] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286807
Log: - Revert bad fix for bug #49122 and only enable this when mysqlnd is used
 [2009-08-04 14:51 UTC] gabrycucciolo84pv at fastwebnet dot it
forgot to mention the same problem happens with php6-dev actual build and following ones.
 [2009-08-05 15:11 UTC] andrey@php.net
Jani, only libmysql6 has mysql_stmt_more_results . mysqlnd has it always. I suppose the people compile with libmysql which is not 6 and get this unresolved symbols.

Andrey
 [2009-08-05 15:21 UTC] andrey@php.net
The code is under
#if defined(HAVE_STMT_NEXT_RESULT) && defined(MYSQLI_USE_MYSQLND) 


which means tha mysqli_stmt_more_results and mysqli_stmt_next_result are not available in libmysql builds. Strangely one of the functions call mysqlnd_xxxx but the other mysql_ ->jani's change. mysqlnd defines macros, so one doesn't need to use mysqlnd_xxx but mysql_xxx. This should be some misconfiguration. Can you try with --with-mysqli=mysqlnd instead of --with-mysqli ?

Andrey
 [2009-08-06 09:00 UTC] jani@php.net
Please use fresh sources and preferrably build outside source tree. "make clean" after configure with different options might help too..
 [2009-08-06 14:06 UTC] gabrycucciolo84pv at fastwebnet dot it
It does not even start stating that it can't find mysql installation and to reinstall it.
With 5.2.10 everything works like a charm...
 [2009-08-06 14:07 UTC] gabrycucciolo84pv at fastwebnet dot it
fresh sources you mean latest cvn snapshot?
 [2009-08-06 20:10 UTC] jani@php.net
Using fresh sources means "grab latest snapshot, untar, configure, 
compile". Try that.
 [2009-08-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-08-18 12:27 UTC] andrey@php.net
-Assigned To: andrey +Assigned To: mysql
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 07:02:14 2014 UTC