ID: 29537 Updated by: [EMAIL PROTECTED] Reported By: martinkuria at hotmail dot com -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: Solaris9 PHP Version: 4.3.8 New Comment:
If you want to use 64-bit MySQL libraries you'll need to build a 64-bit PHP, i.e.: export CC="/path/to/gcc -m64" if you want to build a 32-bit PHP, you'll have to use 32-bit MySQL libraries. Previous Comments: ------------------------------------------------------------------------ [2004-11-02 00:07:54] epuening at cdir dot com Same error using Solaris 8, Apache 2.052, PHP 5.02, mysql 5.01 Configured with the following options ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --enable-dbase --with-libxml-dir=/usr/local/include/libxml2 Terminates with the following error char mysql_close(); int main() { mysql_close() ; return 0; } configure:54501: checking for mysql_errno in -lmysqlclient configure:54520: 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/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.1 -L/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.1 -R/us r/local/lib -L/usr/local/lib conftest.c -lmysqlclient -lz -lresolv -lm -ldl -lnsl -lsocket -lgcc -lxml2 -lz -liconv -lm - lsocket -lnsl -lxml2 -lz -liconv -lm -lsocket -lnsl 1>&5 ld: warning: file /usr/local/mysql//lib/libmysqlclient.a(client.o): wrong ELF class: ELFCLASS64 Undefined first referenced symbol in file mysql_errno /var/tmp//ccQGgMLT.o ld: fatal: Symbol referencing errors. No output written to conftest collect2: ld returned 1 exit status configure: failed program was: #line 54509 "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_errno(); int main() { mysql_errno() ; return 0; } ------------------------------------------------------------------------ [2004-10-19 13:13:30] royw at imsi dot com Sorry for being a dumbass, in the above i'm using Solaris 8, and php 5.0.1 Thanks -Roy ------------------------------------------------------------------------ [2004-10-19 13:11:25] royw at imsi dot com I am also seeing this and concur with the 64bit version of mysql the reason. from config.log ================== configure:54351: gcc -o conftest -g -O2 -pthreads -D_POSIX_PTHREAD_SEMANTICS -D _POSIX_PTHREAD_SEMANTICS -D_REENTRANT -R/usr/local/mysql/lib -L/usr/local/mysql/ lib -R/usr/local/lib -L/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/local/u1/l ocal/bin/../lib/gcc/sparc-sun-solaris2.8/3.4.0 -L/local/u1/local/bin/../lib/gcc/ sparc-sun-solaris2.8/3.4.0 -R/usr/local/lib -L/usr/local/lib -R/usr/local -L/usr /local conftest.c -lmysqlclient -lz -lldap -llber -lz -lresolv -lm -ldl -lnsl - lsocket -lgcc -lxml2 -liconv -lm -lsocket -lnsl -lxml2 -liconv -lm -lsocket -ln sl 1>&5 ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF c lass: ELFCLASS64 Undefined first referenced symbol in file mysql_error /var/tmp//ccOaQw7R.o ld: fatal: Symbol referencing errors. No output written to conftest collect2: ld returned 1 exit status configure: failed program was: #line 54340 "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; } ============================== Thanks -Roy ------------------------------------------------------------------------ [2004-10-18 03:54:14] rsm00th at hotmail dot com I am having the same problem. It appears as though it wont compile because we are running 64-bit MySQL. ------------------------------------------------------------------------ [2004-09-19 11:53:51] wkaiser at mpimf-heidelberg dot mpg dot de I experienced the same trying to upgrade my PHP / MySQL combination. I am using Solaris 9 (on a SunFire V240), Apache 1.3.29, MySQL 4.0.l8 and PHP 4.3.4. The MySQL Upgrade to 4.1.4-gamma worked fine (i just unpacked the binaries, moved them to /usr/local besides the old ones and changed the symbolic link). Then i unpacked the php-5.0.1 src file, adapted my PATH vars and started configure: bash-2.05# gunzip < php-5.0.1.tar.gz | /usr/local/bin/tar xovf - bash-2.05# cd php-5.0.1 bash-2.05# export CC=/usr/local/bin/gcc bash-2.05# export LDFLAGS="-L/usr/lib -L/usr/local -L/usr/local/lib -L/usr/local/mysql/lib -L/usr/local/ssl/lib -L/usr/local/lib/sasl2" bash-2.05# export CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/apache/include" bash-2.05# export PATH=/usr/sbin:/usr/bin:/usr/lib/nis:/usr/local/bin:/usr/ccs/bin:/usr/local/apache/bin/apxs:/usr/local/mysql/bin:/usr/local/mysql/bin/mysql_config bash-2.05# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysqli=/usr/local/mysql/bin/mysql_config --with-ssl=/usr/local/ssl --with-cyrus-sasl --with-zlib-dir=/usr/local/include --with-gd --with-jpeg-dir=/usr/local/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-curl=/usr/local/include/curl --with-curlwrappers I received exactly the same error message: checking for MySQL support... no checking for specified location of the MySQL UNIX socket... no checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... no configure: error: wrong mysql library version or lib not found. Check config.log for more information. The config.log says: -------------------- bash-2.05# cat config.log configure:53849: checking for MySQL support configure:53895: checking for specified location of the MySQL UNIX socket configure:54924: checking for MySQLi support configure:54970: checking whether to enable embedded MySQLi support configure:55103: checking for mysql_set_server_option in -lmysqlclient configure:55122: /usr/local/bin/gcc -o conftest -g -O2 -I/usr/include -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/apache/include -D_POSIX_PTHREAD_SEMANTICS -R/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/local -L/usr/local/lib -L/usr/local/mysql/lib -L/usr/local/ssl/lib -L/usr/local/lib/sasl2 -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2 -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2 -R/usr/local/lib -L/usr/local/lib -R/usr/openwin/lib -L/usr/openwin/lib -R/usr/local/ssl/lib -L/usr/local/ssl/lib -lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm conftest.c -lmysqlclient -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lsocket -lgcc -lxml2 -lz -liconv -lm -lsocket -lnsl -lcurl -lz -lssl -lcrypto -ldl -lsocket -lnsl -lxml2 -lz -liconv -lm -lsocket -lnsl 1>&5 ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64 Undefined first referenced symbol in file mysql_set_server_option /var/tmp//cc2SpwA0.o ld: fatal: Symbol referencing errors. No output written to conftest collect2: ld returned 1 exit status configure: failed program was: #line 55111 "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_set_server_option(); int main() { mysql_set_server_option() ; return 0; } ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29537 -- Edit this bug report at http://bugs.php.net/?id=29537&edit=1