From: agould at ucop dot edu Operating system: linux 2.6.5, SuSE 9.1 PHP version: 5.0.4 PHP Bug Type: Compile Failure Bug description: compile fails when configured with both --with-mysql and --with-mysqli flags
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 bug report at http://bugs.php.net/?id=33328&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33328&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33328&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33328&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33328&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33328&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33328&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33328&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33328&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33328&r=support Expected behavior: http://bugs.php.net/fix.php?id=33328&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33328&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33328&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33328&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33328&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33328&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33328&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33328&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33328&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33328&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33328&r=mysqlcfg