From:             [EMAIL PROTECTED]
Operating system: Solaris 5.7
PHP version:      4.2.1
PHP Bug Type:     Apache related
Bug description:  enable-sockets results in undefined symbols

Dear all!
In the end, I want to use "--with-ibm-db2", but I encounter several
problems, that I think I could narrow down to this:
When making the apache, I receive this:
Undefined                       first referenced
 symbol                             in file
in6addr_any                         modules/php4/libphp4.a(network.o)
getaddrinfo                         modules/php4/libphp4.a(network.o)
gai_strerror                        modules/php4/libphp4.a(network.o)
strlcat                             modules/php4/libphp4.a(SAPI.o)
strlcpy                             modules/php4/libphp4.a(php_apache.o)
freeaddrinfo                        modules/php4/libphp4.a(network.o)
dn_skipname                         modules/php4/libphp4.a(dns.o)
ld: fatal: Symbol referencing errors. No output written to httpd

our call to configure php is:

CC=gcc
LD_LIBRARY_PATH=/opt/IBMdb2/V7.1/lib
./configure \
--prefix=/var/applications/proj/bin/php_4.2.1 \
--exec-prefix=/var/applications/proj/bin/php_4.2.1 \
--enable-sockets \
--disable-ip6v \
--with-apache=/var/applications/proj/src/make/apache_1.3.26 \
--enable-track-vars

# --with-oracle=$ORACLE_HOME
# --with-ibm-db2=/opt/IBMdb2/V7.1

The configure for apache
./configure \
--prefix=/var/applications/proj/bin/apache_1.3.26_php4 \
--exec-prefix=/var/applications/proj/bin/apache_1.3.26_php4 \
--bindir=/var/applications/proj/bin/apache_1.3.26_php4 \
--activate-module=src/modules/php4/libphp4.a \
--with-port=8081

I put the "--disable-ip6v" in, because I have another machine with Solaris
5.8 that has IP6V enabled, while the one in question has not, but both of
them seem to ignore the switch. The thing can be compiled on the newer
machine, where I copied the IBMdb2 stuff to, but alas, when I transfer the
result back, it complains about versions and if I disable that, there is
another failure, so they seem to be too different. I don't dare to fool
around and copy libraries because I don't know enough about these things.
Unfortunately I cannot simply reinstall the 5.7 machine, or update it, or
use the other one :-(

Any idea is very much appreciated!

I did rm config.cache.
Here is a selection of checks:
checking host system type... sparc-sun-solaris2.7
checking for Apache 1.x module support... yes - Apache 1.3.x
checking for socket in -lsocket... yes
checking for gethostname in -lnsl... yes
checking for IPv6 support... no
checking for gai_strerror... no
checking for getaddrinfo... no
checking for socket... yes
checking whether to enable sockets support... yes
checking build system type... sparc-sun-solaris2.7
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking how to recognise dependant libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/ccs/bin/nm -p output... ok
checking for dlfcn.h... yes
checking for ranlib... (cached) ranlib
checking dynamic linker characteristics... solaris2.7 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes

The command failing is
cd src
cmd="\
gcc  -DSOLARIS2=270 \
-I/var/applications/pbstar/src/make/php-4.2.1 \
-I/var/applications/pbstar/src/make/php-4.2.1/main \
-I/var/applications/pbstar/src/make/php-4.2.1/Zend \
-I/var/applications/pbstar/src/make/php-4.2.1/TSRM \
-DUSE_EXPAT \
-I./lib/expat-lite \
-DNO_DL_NEEDED `./apaci` \
-o \
 httpd \
 buildmark.o \
 modules.o \
 modules/php4/libphp4.a \
 modules/standard/libstandard.a \
 main/libmain.a \
 ./os/unix/libos.a \
 ap/libap.a \
 lib/expat-lite/libexpat.a \
-lnsl \
-R/usr/ucblib \
-L/usr/ucblib \
-L/usr/lib \
-Lmodules/php4 \
-L../modules/php4 \
-L../../modules/php4 \
-lmodphp4 \
-L/opt/IBMdb2/V7.1/lib \
-lc \
-ldb2 \
-lpam \
-lresolv \
-lm \
-ldl \
-lnsl \
-lcrypt \
-lsocket \
-lpthread"
echo $cmd
$cmd

screenshot of expanded values:
gcc -DSOLARIS2=270 -I/var/applications/proj/src/make/php-4.2.1
-I/var/applicat
ions/proj/src/make/php-4.2.1/main
-I/var/applications/proj/src/make/php-4.2.
1/Zend -I/var/applications/proj/src/make/php-4.2.1/TSRM -DUSE_EXPAT
-I./lib/ex
pat-lite -DNO_DL_NEEDED
-DHTTPD_ROOT="/var/applications/proj/bin/apache_1.3.26
_php4"
-DSUEXEC_BIN="/var/applications/proj/bin/apache_1.3.26_php4/bin/suexec"
 -DSHARED_CORE_DIR="/var/applications/proj/bin/apache_1.3.26_php4/libexec"
-DD
EFAULT_PIDLOG="logs/httpd.pid"
-DDEFAULT_SCOREBOARD="logs/httpd.scoreboard" -DDE
FAULT_LOCKFILE="logs/httpd.lock" -DDEFAULT_ERRORLOG="logs/error_log"
-DTYPES_CON
FIG_FILE="conf/mime.types" -DSERVER_CONFIG_FILE="conf/httpd.conf"
-DACCESS_CONFI
G_FILE="conf/access.conf" -DRESOURCE_CONFIG_FILE="conf/srm.conf" -o httpd
buildm
ark.o modules.o modules/php4/libphp4.a modules/standard/libstandard.a
main/libma
in.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -lnsl
-R/usr/ucblib
-L/usr/ucblib -L/usr/lib -Lmodules/php4 -L../modules/php4
-L../../modules/php4 -
lmodphp4 -L/opt/IBMdb2/V7.1/lib -lc -ldb2 -lpam -lresolv -lm -ldl -lnsl
-lcrypt
-lsocket -lpthread

libsocket.a does not contain the symbols, while it does on the other
machine, but the configure recognized it properly, so I don't know why
this happens ...

Thank you very much for any hint or investigation in this!


-- 
Edit bug report at http://bugs.php.net/?id=20620&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20620&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20620&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20620&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20620&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20620&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20620&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20620&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20620&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20620&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20620&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20620&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20620&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20620&r=isapi

Reply via email to