PHP 4.0 Bug #2339: Compile failure with Apache 1.3.9 - order of lib in libphp4.module
| From: | work at wilfried dot net | Date: | Tue, 21 Sep 1999 13:21:34 +0000 |
| Subject: | PHP 4.0 Bug #2339: Compile failure with Apache 1.3.9 - order of lib in libphp4.module | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11145@lists.php.net to get a copy of this message | ||
From: work@wilfried.net
Operating system: BSDI
PHP version: 4.0 Latest CVS (21/09/1999)
PHP Bug Type: Compile Failure
Bug description: Compile failure with Apache 1.3.9 - order of lib in libphp4.module
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.