php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26282 PHP Configure fails with "mysql configure failed"
Submitted: 2003-11-17 01:31 UTC Modified: 2003-11-27 00:12 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: greg at coltec dot com dot au Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.4 OS: Solaris 5.9 (112233-08)
Private report: No CVE-ID: None
 [2003-11-17 01:31 UTC] greg at coltec dot com dot au
Description:
------------
I'm trying to configure PHP to use the client libraries for MySQL 4.0.16, which I downloaded as a binary (Solaris 9 64-bit) and installed in /usr/local/mysql.

When I attempt to configure PHP using:

./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.29 --with-openssl=/usr/local/ssl --with-zlib-dir=./ext/zlib --enable-track-vars --enable-libgcc --disable-cgi

I get the following error:

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.

Config.log shows:

configure:55581: checking for mysql_error in -lmysqlclient
configure:55600: gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS -R/usr/local/mysql/lib -L/usr/local/mysql/lib  -R/usr/ucblib -L/usr/ucblib -R/opt/sfw/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.9/3.2 -L/opt/sfw/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.9/3.2 -R/usr/local/ssl/lib -L/usr/local/ssl/lib -R/usr -L/usr conftest.c -lmysqlclient  -lz -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lsocket  -lgcc 1>&5
ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Undefined                       first referenced
 symbol                             in file
mysql_error                         /var/tmp//cc4fDlj3.o
ld: fatal: Symbol referencing errors. No output written to conftest


These are not the final lines, but they seem most relevant; I can post more if necessary.

Is it possible that PHP is looking for a 32-bit MySQL binary and crashing when it finds a 64-bit? If so, are there plans to support 64-bit MySQL?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-17 14:33 UTC] iliaa@php.net
Sounds like a problem with your mysql library, have you tried compiling with bundled mysql libraries?
 [2003-11-17 18:43 UTC] greg at coltec dot com dot au
Yes, I've tried compiling with the bundled libraries, which works (sorry, should have said that), but would like to use the client libraries included with MySQL rather than PHP for the reasons outlined at http://www.php.net/mysql.

We're also using Apache's mod_perl on this server.
 [2003-11-17 18:45 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The problem is that your MySQL libs (external ones) have a problem, hence the compiler error you are seeing. This is not a PHP bug.
 [2003-11-17 18:52 UTC] sniper@php.net
btw. this is wrong: --with-zlib-dir=./ext/zlib

(ext/zlib is NOT the zlib library, it's the PHP extension that  uses zlib)


 [2003-11-26 00:36 UTC] greg at coltec dot com dot au
This is definately a problem with PHP. There are two versions of MySQL 4.0.16 available for Solaris on SPARC processors: 64-bit and 32-bit; both binaries are available for download from www.mysql.com.

The error this report relates to occurs ONLY with the 64-bit version of MySQL, the 32-bit version works perfectly.

Can PHP support the 64-bit binaries?
 [2003-11-27 00:12 UTC] sniper@php.net
No, this is not PHP problem.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 09 22:00:03 2025 UTC