php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2339 Compile failure with Apache 1.3.9 - order of lib in libphp4.module
Submitted: 1999-09-21 09:21 UTC Modified: 1999-09-21 10:52 UTC
From: work at wilfried dot net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Latest CVS (21/09/1999) OS: BSDI
Private report: No CVE-ID: None
 [1999-09-21 09:21 UTC] work at wilfried dot net
When linking apache, I get these errors

/usr/local/mysql/lib/libmysqlclient.a(getopt.o)(.data+0x4): multiple definition of `optind'
/usr/lib/libc.a(getopt_data.o)(.data+0x4): first defined here
/usr/local/mysql/lib/libmysqlclient.a(getopt.o)(.data+0x8): multiple definition of `opterr'
/usr/lib/libc.a(getopt_data.o)(.data+0x0): first defined here
/usr/local/mysql/lib/libmysqlclient.a(getopt.o)(.text+0xa38): multiple definition of `getopt'
/usr/lib/libc.a(getopt.o)(.text+0x44): first defined here

I have tracked it down to the order of lib i libphp4.module

configuration:
./configure --prefix=/usr/local --with-apache=../apache_1.3.9 --with-mysql=/usr/local/mysql --with-gd=/usr/local --with-ldap=/usr/local
--with-zlib=/usr/local --with-ndbm --with-snmp=/usr/local --enable-track-vars


LIBS in libphp4.module looks like this:
LIBS=" -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/local/mysql/lib -Lmodules/php4 -L../module
s/php4 -L../../modules/php4 -lmodphp4 -L/var/php4/ext/pcre/pcrelib -lpcre -L/var/php4/regex -lregex -lc  -L/usr/local/lib -lgd -lpng -lldap -llber -L/usr/local/mysql/lib -lmysqlclient -lsnmp -l
z -ldl -lm  -lresolv  $LIBS"

If I move -lc last it compiles ok.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-21 10:52 UTC] sas at cvs dot php dot net
Thanks, this should be fixed. Please update your CVS checkout.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 09:00:01 2026 UTC