Bug #1763: DSO php4 needs -lc at compile-time to resolve all symbols at runtime
| From: | sasha at forum dot swarthmore dot edu | Date: | Tue, 20 Jul 1999 19:34:16 +0000 |
| Subject: | Bug #1763: DSO php4 needs -lc at compile-time to resolve all symbols at runtime | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8798@lists.php.net to get a copy of this message | ||
From: sasha@forum.swarthmore.edu
Operating system: Linux 2.2.5-15 RH 6.0
PHP version: 4.0 Beta 1
PHP Bug Type: Dynamic loading related
Bug description: DSO php4 needs -lc at compile-time to resolve all symbols at runtime
when mod_php4 configured via
CFLAGS="-fPIC" ./configure --prefix=/usr \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/etc/httpd \
--enable-safe-mode \
--with-exec-dir=/usr/bin \
--with-system-regex \
--disable-debug \
--with-zlib \
--enable-debugger \
--enable-magic-quotes \
--enable-track-vars
httpd fails to load libphp3.so:
Cannot load /etc/httpd/modules/libphp4.so into server: /etc/httpd/modules/libphp4.so: undefined
symbol: fstat
adding the -lc flag during the last step of compile solves the problem:
ld -Bshareable -o libphp4.so ./mod_php4.o libmodphp4-so
.a -L/root/php-4.0b1/ext/pcre/pcrelib -lpcre -lgdbm -lpam -lz -Llibzend -lzend -Lext -lphpext
-L/root/php-4.0b1/ext/pcre/pcrelib -lpcre -lgdbm -lpam -lz -ldl -lttf -lgd -lm -lcrypt -lnsl
-lresolv -lc