php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32704 libmysqlclient twice?
Submitted: 2005-04-14 17:58 UTC Modified: 2005-04-15 14:14 UTC
From: red at icuii dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.0.4 OS: Fedora Core 2
Private report: No CVE-ID: None
 [2005-04-14 17:58 UTC] red at icuii dot com
Description:
------------
Linking fails because -lmysqlclient appears twice in the Makefile's EXTRA_LIBS.  I can remove one and it builds and runs fine.

Here's my configure command:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-curl --with-curlwrappers --enable-exif --enable-ftp --with-gd --with-mysql --enable-sockets --with-xsl --with-pic --with-mnogosearch=/usr --with-zlib

Then here's the line from the Makefile:
EXTRA_LIBS = -lcrypt -lexslt -lcrypt -lmysqlclient -lpng -lz -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lcurl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm -lm -lrt -lz -lmysqlclient -lmnogosearch -lmnogocharset -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-14 18:08 UTC] tony2001@php.net
As you can see, there are a lot of duplicated -lz, -lm and others, so I doubt that libmysqclient is an exception and can't be used twice.
So, where the error message?
Also, please describe the software used in the build system.
 [2005-04-14 18:45 UTC] red at icuii dot com
Right, I don't know why the duplication of -lmysqlclient causes problems.

But I get about 80 pages of this:

/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): multiple definition of `net_buffer_length'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x0): first defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of `max_allowed_packet'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): first defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): multiple definition of `net_read_timeout'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x8): first defined here
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0xc): multiple definition of `net_write_timeout'
/usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0xc): first defined here

Nothing weird in my build tools, they should all be the standard stuff that comes with FC2.
gcc 3.3.3 20040412
GNU Make 3.80

The only thing not stock involved is MySQL 4.1.11 installed from RPMs on the mysql website.
 [2005-04-15 14:14 UTC] sniper@php.net
It's caused most likely by the fact that mnogosearch uses also mysql libs -> you need to link PHP with the SAME libs:
Use: --with-mysql=/usr 

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 16:01:34 2025 UTC