Bug #1203: PHP fails to compile into Apache as a DSO when mod_perl is compiled in
| From: | sitz at onastick dot net | Date: | Thu, 04 Mar 1999 22:37:11 +0000 |
| Subject: | Bug #1203: PHP fails to compile into Apache as a DSO when mod_perl is compiled in | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4478@lists.php.net to get a copy of this message | ||
From: sitz@onastick.net
Operating system: Linux 2.0.36 (glibc)
PHP version: 3.0.7
PHP Bug Type: Compile Failure
Bug description: PHP fails to compile into Apache as a DSO when mod_perl is compiled in
When compiling PHP 3.0.7 as a shared module into Apache 1.3.4 (and at the same time compiling
mod_perl 1.18 into apache as a static module) the following errors occur:
===> src/modules/php3
gcc -c -I../.. -I/usr/lib/perl5/i386-linux/5.004/CORE -I../../os/unix -I../../include -DLINUX=2
-DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL -D_REENTRANT -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 -L/usr/lib
-lmysqlclient -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt -ldbm -lgdbm
-rdynamic -L/usr/local/lib /usr/lib/perl5/i386-linux/5.004/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl5/i386-linux/5.004/CORE -lperl -lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix
-lcrypt -ldl
ld: unrecognized option `-Wl,-rpath,/usr/lib'
make[4]: *** [libphp3.so] Error 1
Changing -Wl,-rpath,/usr/lib to -rpath /usr/lib in the LIBS1 line of src/modules/php3/Makefile
solves this problem, however the next error is:
===> src/modules/php3
rm -f libphp3.so
ld -Bshareable -o libphp3.so mod_php3.so-o libmodphp3-so.a -rpath /usr/lib -L/usr/lib -lmysqlclient
-lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt -ldbm -lgdbm -rdynamic
-L/usr/local/lib /usr/lib/perl5/i386-linux/5.004/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl5/i386-linux/5.004/CORE -lperl -lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix
-lcrypt -ldl
ld: -r and -shared may not be used together
make[4]: *** [libphp3.so] Error 1
Removing "-rdynamic" from the LIBS1 line of the same Makefile gets us past this hurdle,
and the compile finishes normally.
The first error can be eliminated if PHP is compiled without mysql support since the offending
"-Wl,-rpath" isn't placed in the Makefile at all at that point.
The second error is eliminated if mod_perl isn't compiled in at all.
That being said, it should be notes that I don't currently program/script in anything other
than perl, so if I'm missing something obvious, please let me know :)
gcc --version
2.7.2.3
make --version
GNU Make version 3.76.1
./configure --with-mysql --enable-track-vars --with-shared-apache=/usr/local/src/apache_1.3.4
Noah Robin
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net