php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20621 enable-sockets results in undefined symbols
Submitted: 2002-11-25 08:30 UTC Modified: 2002-11-25 08:33 UTC
From: xyrafo at germanynet dot de Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.2.1 OS: Solaris 5.7
Private report: No CVE-ID: None
 [2002-11-25 08:30 UTC] xyrafo at germanynet dot de
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!


Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-25 08:33 UTC] iliaa@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Aug 19 19:01:28 2024 UTC