[PHP-DEV] Bug #1288 Updated: ld: unrecognized option `-Wl,-rpath,/usr/lib/mysql' From: Bug Database (php-dev <email protected>)
Date: 04/04/99

ID: 1288
User Update by: dlambert <email protected>
Status: Open
Bug Type: Compile Failure
Description: ld: unrecognized option `-Wl,-rpath,/usr/lib/mysql'

I'm having this problem both with 3.0.7 and the latest CVS (that why I downloaded it..)

When I compile PHP with --with-mysql and then compile apache 1.3.6 with --enable-shared=php3 I get the following error:

===> src/modules/php3
gcc -c -I../../os/unix -I../../include -DLINUX=2 -DUSE_HSREGEX `../../apaci` -fpic -DSHARED_MODULE mod_php3.c && mv mod_php3.o mod_php3.so-o
rm -f libphp3.so
ld -Bshareable -o libphp3.so mod_php3.so-o libmodphp3-so.a -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -lmysqlclient -L/usr/local/lib /usr/local/lib/c-client.a -lgd -lpam -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt -lndbm -ldb -lgdbm -ldl
ld: unrecognized option `-Wl,-rpath,/usr/lib/mysql'
make[4]: *** [libphp3.so] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.6/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/apache_1.3.6'
make: *** [build] Error 2

I found a similar bug in the bug track system that reported the same error with 3.0.6 I think, and the response was it was fixed in 3.0.7. I encountered the same error when I tried to compile mod_perl as a module along with php. I am not compiling mod_perl at all now. PHP works fine when I don't compile it as a module, but I'd like to have this functionality.

php config:

./configure \
        --with-mysql=/usr \
        --with-shared-apache=../apache_1.3.6 \
        --enable-track-vars \
        --with-config-file-path=/etc/httpd/conf \
        --with-imap=/usr/local

apache config:

./configure --prefix=/etc/httpd \
        --sbindir=/usr/sbin \
        --mandir=/usr/man \
        --bindir=/usr/bin \
        --libexecdir=/usr/lib/apache \
        --sysconfdir=/etc/httpd/conf \
        --datadir=/home/httpd \
        --includedir=/usr/include/apache \
        --logfiledir=/var/log/httpd \
        --localstatedir=/var \
        --runtimedir=/var/run \
        --proxycachedir=/var/cache/httpd \
        --enable-module=all \
        --enable-shared=max \
        --disable-rule=WANTHSREGEX \
        --activate-module=src/modules/php3/libphp3.a \
        --enable-shared=php3

make --version
GNU Make version 3.76.1

gcc --version
2.7.2.3

autoconf --version
Autoconf version 2.12

bison --version
GNU Bison version 1.25

flex --version
flex version 2.5.4

ld --version
GNU ld 2.9.1

(anything else??) :)

-----------------------------
more info:

Since I started with the CVS version and ran autoconf I imagine the problem lies in build-defs.h or configure.in (found by going a grep search in the php3 source tree root). It also looks like there is a test in the configure script for the -Wl,-rpath, ld option. Could this test be bad, or do I have a bad version of ld???

Full Bug description available at: http://beta.php.net/bugs.php3?id=1288

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>