#33328 [Opn->Fbk]: compile fails when configured with both --with-mysql and --with-mysqli flags
| From: | tony2001@php.net | Date: | Mon, 13 Jun 2005 22:12:15 +0000 |
| Subject: | #33328 [Opn->Fbk]: compile fails when configured with both --with-mysql and --with-mysqli flags | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80266@lists.php.net to get a copy of this message | ||
ID: 33328
Updated by: tony2001@php.net
Reported By: agould at ucop dot edu
-Status: Open
+Status: Feedback
Bug Type: Compile Failure
Operating System: linux 2.6.5, SuSE 9.1
PHP Version: 5.0.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-06-13 23:57:28] agould at ucop dot edu
Description:
------------
Building php5.0.4 with both mysql and mysqli support fails during final
stage of compile with the error:
[cut]
: multiple definition of `my_net_read'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x9f0): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xc60): In function
`my_net_init':
: multiple definition of `my_net_init'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xc60): first defined
here
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
It appears libtool is trying to source mysql client library
/usr/lib/mysql/libmysqlclient.a twice.
I found I could correct this error by editing the Makefile line
"EXTRA_LIBS=" and removing one of the iterations of the string
-lmysqlclient
before:
EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lresolv -lm -ldl -lnsl
-lxml2 -lz -lm -lxml2 -lz -lm -lmysqlclient -lz -lcrypt -lnsl -lm
-lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt
after:
EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lresolv -lm -ldl -lnsl
-lxml2 -lz -lm -lxml2 -lz -lm -lz -lcrypt -lnsl -lm -lxml2 -lz -lm
-lcrypt -lxml2 -lz -lm -lcrypt
Reproduce code:
---------------
I'm building against mysql provided rpm:
MySQL-server-standard-4.1.12-0.sles9.i586.rpm.
./configure --with-apxs=/usr/local/apache/bin/apxs \
--with-mysqli=/usr/bin/mysql_config \ --with-mysql=/usr/lib/mysql
make
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33328&edit=1