Bug #15916 | PHP configure failed with MySQLi library error. | ||
---|---|---|---|
Submitted: | 21 Dec 2005 20:55 | Modified: | 22 Jan 2007 7:25 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.16 | OS: | IBM AIX (AIX 5.2) |
Assigned to: | CPU Architecture: | Any |
[21 Dec 2005 20:55]
[ name withheld ]
[23 Dec 2005 8:34]
Valeriy Kravchuk
Thank you for a problem report. Please, send the results of the following commands from your machine: find / -name libmysqlclient* 2>/dev/null echo $PATH echo $LIBPATH (Correct me if LIBPATH is not a right environment variable for AIX. I need to know, where dynamic linking libraries are supposed to be found.)
[23 Dec 2005 14:22]
[ name withheld ]
>> find / -name libmysqlclient* 2>/dev/null /usr/local/mysql-standard-5.0.16-aix5.2-powerpc-64bit/lib/libmysqlclient.a /usr/local/mysql-standard-5.0.16-aix5.2-powerpc-64bit/lib/libmysqlclient_r.a >> echo $PATH /usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java131/jre/bin:/usr/java131/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/apache2/bin (MySQL's Bin directory was manually added, just for crontab purpose and easier use of manual command by hand) >> echo $LIBPATH (blank response) --------------------------- One thing here that would help to explain the difference with PHP's configure command and the "find / -name libmysqlclient* 2>/dev/null" command. 1) I used symbolic link to make a mysql directory and link it to the pre-compiled directory. With the ls -la command for mysql.. # ls -la /usr/local/mysql I get this... lrwxrwxrwx 1 root system 53 Nov 23 11:27 /usr/local/mysql -> /usr/local/mysql-standard-5.0.16-aix5.2-powerpc-64bit This symbolic link worked fine with older mysql version on a different machine, MySQL Version 4.0.18 when compiling PHP there 2 or 3 years ago.
[23 Dec 2005 14:34]
[ name withheld ]
>> (Correct me if LIBPATH is not a right environment variable for AIX. I need to know, where dynamic linking libraries are supposed to be found.) LIBPATH is the common environment variable for AIX. Since AIX 5.x is moving toward the linux style so not sure if LIBPATH is becoming a less important thing for AIX now as LIB might will be in the long run. For our convience here, I did this command... >> echo $LIB (blank response) >> I need to know, where dynamic linking libraries are supposed >> to be found. What are the example of dynamic linking libraries, filenames, etc.? So, I would know where to look.
[30 Dec 2005 18:32]
Valeriy Kravchuk
I'll be able to work on this report only next week. In the meantime, can you, please, try to install and compile with 5.0.18 just released and/or with 5.0.17 compiled from sources as described in Bug #15938. Inform about the results, if anything new will be discovered...
[31 Jan 2006 0:00]
Bugs System
No feedback was provided for this bug for over a month, 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".
[5 May 2006 11:56]
Lou Picciano
This bug persists - have reverted back to php v 5.0.4, still with no luck. Is the issue on of incompatility with newer versions of MySQL? (We are using 5.0.13) A different architecture of the mysqlclient file? Lou
[8 Nov 2006 7:42]
文 中
I met the same bug!
[8 Nov 2006 8:27]
Valeriy Kravchuk
What versions of OS, MySQL server, libmysqlclient and PHP do you use?
[9 Dec 2006 0:00]
Bugs System
No feedback was provided for this bug for over a month, 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".
[20 Dec 2006 15:15]
alex -
adding --enable-embedded-mysqli=shared to the configure command line of php seems to solve that problem.
[21 Dec 2006 10:25]
Valeriy Kravchuk
All reporters: Please, check that adding --enable-embedded-mysqli=shared to the PHP configure command line makes any difference in your cases.
[10 Jan 2007 23:02]
[ name withheld ]
the --enable-embedded-mysqli=shared did nothing for me. what fixed mine was editing the --with-mysqli to read --with-mysqli-dir=/usr/lib/mysql... or where ever your libraries are. mysql was originally installed from a centos repo and apparently does not install to the folder php has in its default settings.
[22 Jan 2007 0:00]
Bugs System
No feedback was provided for this bug for over a month, 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".
[22 Jan 2007 7:25]
Valeriy Kravchuk
So, it looks like not a bug in MySQL code. You just have to provide proper options for configure while building PHP.
[7 May 2008 7:49]
Pradeep V
Yes, i had the same issue and adding --with-mysqli-dir=/usr/lib/mysql fixed it.
[24 Jun 2010 18:33]
Michael Felt
The import error message in config.log is: configure:61242: xlc -o conftest -I/usr/include -L/usr/local/ssl/lib -L/usr/local/lib -L/u sr/lib -L/usr/local/mysql/lib -R/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -b libpath:/usr/local/lib:/usr/lib:/usr/local/ssl/lib:/usr/local/mysql/lib -R/usr/local/lib - L/usr/local/lib -R/usr/local/mysql/lib -L/usr/local/mysql/lib -lmysqld -lz -lnsl_r -lm -lr t conftest.c -lmysqlclient -lmysqlclient -lfreetype -lpng -lz -ljpeg -lcurl -lm -lxml2 - liconv -lm -lcurl -lxml2 -liconv -lm 1>&5 ld: 0706-027 The -R /usr/local/mysql/lib flag is ignored. ld: 0706-027 The -R /usr/local/lib flag is ignored. ld: 0706-027 The -R /usr/local/mysql/lib flag is ignored. ld: 0706-006 Cannot find or open library file: -l mysqld ==== I spent some time looking for where the text mysqld cam from and I found this sequence in PHP configure script: ======== if test "$PHP_MYSQLI" != "no"; then if test "$PHP_MYSQLI" = "yes"; then MYSQL_CONFIG=`$php_shtool path mysql_config` else MYSQL_CONFIG=$PHP_MYSQLI fi MYSQL_LIB_NAME='mysqlclient' if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then cat >> confdefs.h <<\EOF #define HAVE_EMBEDDED_MYSQLI 1 EOF MYSQL_LIB_CFG='--libmysqld-libs' elif test "$enable_maintainer_zts" = "yes"; then MYSQL_LIB_CFG='--libs_r' MYSQL_LIB_NAME='mysqlclient_r' else MYSQL_LIB_CFG='--libs' fi ======= The key line is: MYSQL_LIB_CFG='--libmysqld-libs' when mysql_config is called it returns: /usr/local/mysql/bin/mysql_config --libmysqld-libs -Wl,-brtl -L/usr/local/mysql/lib -lmysqld -lz -lnsl_r -lm -lrt And the script tries to link to a non-existing library mysqld I'll try the solution above, or otherwise link the client library. If that does not work I'll edit the mysql_config script. No idea if this is mysql, or php 'bug' - but at least we have the code causing the issue.