ID:               29537
 Comment by:       wkaiser at mpimf-heidelberg dot mpg dot de
 Reported By:      martinkuria at hotmail dot com
 Status:           Open
 Bug Type:         MySQL related
 Operating System: Solaris9
 PHP Version:      4.3.8
 New Comment:

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; }


Previous Comments:
------------------------------------------------------------------------

[2004-08-05 15:08:50] martinkuria at hotmail dot com

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?



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29537&edit=1

Reply via email to