From: amiroot at yahoo dot com
Operating system: RedHat EL5 64bit
PHP version: 5.2.10
PHP Bug Type: *General Issues
Bug description: Configure php with mysql result "configure: error: mysql
configure failed"
Description:
------------
While doing configure in php-5.2.10 (also happened in PHP 5.3 RC4 and the
latest CSV). It works prefectly okay in PHP 5.2.9.
I installed both 32 and 64 version of libmysqlclient.so which located in
/usr/lib/mysql and /usr/lib64/mysql respectively. Sounds like the
configure script seek for only /usr/lib/mysql. Here is the error in
config.log
configure:60459: gcc -o conftest -I/usr/include -g -O2 -pthread
-D_REENTRANT -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib
-Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -Wl,-rpath,/usr
-L/usr conftest.c -lmysqlclient_r -lz -lmcrypt -lltdl -lcrypt -lpam
-lfreetype -lpng -lz -ljpeg -lgdbm -lcurl -lz -lresolv -lm -ldl -lnsl
-lxml2 -lz -lm -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv
-ldl -lidn -lssl -lcrypto -lz -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lssl -lcrypto -ldl -lz 1>&5
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient_r.so
when searching for -lmysqlclient_r
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient_r.a
when searching for -lmysqlclient_r
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
configure: failed program was:
#line 60448 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();
int main() {
mysql_error()
; return 0; }
Reproduce code:
---------------
./configure --with-apxs2=/usr/local/httpd/bin/apxs --with-gd
--with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr
--with-freetype-dir=/usr --with-zlib --enable-ftp --enable-sockets
--enable-mbstring=all --enable-zip --enable-soap --with-iconv --with-gdbm
--with-mcrypt --with-imap --with-kerberos --with-imap-ssl --with-curl
--with-mysql
Expected result:
----------------
No error
Actual result:
--------------
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more
information.
--
Edit bug report at http://bugs.php.net/?id=48715&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48715&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48715&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48715&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48715&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48715&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48715&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48715&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48715&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48715&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48715&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48715&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48715&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48715&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48715&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48715&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48715&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48715&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48715&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48715&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48715&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48715&r=mysqlcfg