php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11505 --enable-sockets - uses obsolete hstrerror function which is not exported
Submitted: 2001-06-15 13:15 UTC Modified: 2001-06-19 14:51 UTC
From: james_melter at globalcrossing dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.5 OS: Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: james_melter at globalcrossing dot com
New email:
PHP Version: OS:

 

 [2001-06-15 13:15 UTC] james_melter at globalcrossing dot com
## This problem only occurs if --enable-sockets option is used in the php configure script. I think this problem is the root of many of the problems described in the following bug reports(everyone seems to get the same or a similar "hstrerror" linkage symbol error):
6959,7625,9436,10402,10616,10617,10947 and 11369

## Here's the configure:

./configure --with-sybase-ct=/data/sybase --with-apache=../apache_1.3.19 --enable-bcmath --enable-calendar --enable-ctype --enable-exif --enable-ftp --enable-gd-imgstrttf --with-gd=/opt/TWWfsw/libgd --enable-trans-sid --enable-shmop --enable-sysvsem --enable-sysvshm --enable-wddx --with-jpeg-dir=/opt/TWWfsw/jpeg --with-xpm-dir=/opt/TWWfsw/xpm --enable-sockets  

## Here's the linker error(hstrerror symbol or fcn on solaris 2.6 can be found in libresolv.so.2 and libsocket.so but is not apparently exported so link fails):


gcc -c  -I./os/unix -I./include   -DSOLARIS2=260 -I/data/jmelter/php/php-4.0.5 -I/data/jmelter/php/php-4.0.5/main -I/data/jmelter/php/php-4.0.5/main -I/data/jmelter/php/php-4.0.5/Zend -I/data/jmelter/php/php-4.0.5/Zend -I/data/jmelter/php/php-4.0.5/TSRM -I/data/jmelter/php/php-4.0.5/TSRM -I/data/jmelter/php/php-4.0.5 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DSOLARIS2=260 -I/data/jmelter/php/php-4.0.5 -I/data/jmelter/php/php-4.0.5/main -I/data/jmelter/php/php-4.0.5/main -I/data/jmelter/php/php-4.0.5/Zend -I/data/jmelter/php/php-4.0.5/Zend -I/data/jmelter/php/php-4.0.5/TSRM -I/data/jmelter/php/php-4.0.5/TSRM -I/data/jmelter/php/php-4.0.5 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` buildmark.c
gcc  -DSOLARIS2=260 -I/data/jmelter/php/php-4.0.5 -I/data/jmelter/php/php-4.0.5/main -I/data/jmelter/php/php-4.0.5/main -I/data/jmelter/php/php-4.0.5/Zend -I/data/jmelter/php/php-4.0.5/Zend -I/data/jmelter/php/php-4.0.5/TSRM -I/data/jmelter/php/php-4.0.5/TSRM -I/data/jmelter/php/php-4.0.5 -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  -R/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -R/opt/TWWfsw/jpeg/lib -R/opt/TWWfsw/xpm/lib -R/opt/TWWfsw/libgd/lib -R/data/sybase/lib  -L/usr/ucblib -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -L/opt/TWWfsw/jpeg/lib -L/opt/TWWfsw/xpm/lib -L/opt/TWWfsw/libgd/lib -L/data/sybase/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4  -lpam  -ldl -ltcl -lintl -lcomn -lct -lcs -lgd -lX11 -lXpm -ljpeg -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket  -lsocket -lgcc -L/opt/TWWfsw/jpeg/lib -ljpeg -L/opt/TWWfsw/xpm/lib -lXpm -L/opt/TWWfsw/xpm/lib -lX11   -lsocket -lnsl
Undefined                       first referenced
 symbol                             in file
hstrerror                           modules/php4/libphp4.a(sockets.o)
ld: fatal: Symbol referencing errors. No output written to httpd
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `target_static'
Current working directory /data/jmelter/php/apache_1.3.19/src
*** Error code 1
make: Fatal error: Command failed for target `build-std'
Current working directory /data/jmelter/php/apache_1.3.19
*** Error code 1
make: Fatal error: Command failed for target `build'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-15 13:26 UTC] james_melter at globalcrossing dot com
By the way I also tried the latest snapshot from http://snaps.php.net:8000; specifically php4-200106111635.tar.gz. The same problem exists. It can easily be corrected by removing the call to hstrerror in $PHP_SOURCE_TREE/ext/sockets/sockets.c

 [2001-06-19 14:51 UTC] sniper@php.net
The snapshots didn't get updated before the CVS server
went down. :(

But this is fixed in CVS and also in PHP 4.0.6RC4:

http://www.php.net/~andi/php-4.0.6RC4.tar.gz


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 01:01:30 2025 UTC