Subject: php problems
To: NetBSD Users List <netbsd-users@netbsd.org>
From: Emre Yildirim <emre.yildirim@us.army.mil>
List: netbsd-users
Date: 09/14/2001 11:45:04
Hi,

Is there *anyone* using php 4.0.6 or php 4.0.5 (not out of pkgsrc)?  I'm 
getting an error which I can't seem to fix.
After making "make" I get:

Making all in Zend
Making all in main
/bin/sh /stuff/php-4.0.6/libtool --silent --mode=compile gcc  -I. 
-I/stuff/php-4.0.6/main -I/stuff/php-4.0.6/main -I/stuff/php-4.0.6 
-I/usr/local/include/httpd -I/stuff/php-4.0.6/Zend -I/usr/local/include 
-I/stuff/php-4.0.6/ext/mysql/libmysql -I/usr/local/include/ucd-snmp 
-I/stuff/php-4.0.6/ext/xml/expat/xmltok 
-I/stuff/php-4.0.6/ext/xml/expat/xmlparse -I/stuff/php-4.0.6/TSRM  
-DNETBSD -DEAPI -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2  
-c internal_functions.c
/bin/sh /stuff/php-4.0.6/libtool --silent --mode=link gcc  -I. 
-I/stuff/php-4.0.6/main -I/stuff/php-4.0.6/main -I/stuff/php-4.0.6 
-I/usr/local/include/httpd -I/stuff/php-4.0.6/Zend -I/usr/local/include 
-I/stuff/php-4.0.6/ext/mysql/libmysql -I/usr/local/include/ucd-snmp 
-I/stuff/php-4.0.6/ext/xml/expat/xmltok 
-I/stuff/php-4.0.6/ext/xml/expat/xmlparse -I/stuff/php-4.0.6/TSRM  
-DNETBSD -DEAPI -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2   
-o libmain.la  main.lo internal_functions.lo snprintf.lo php_sprintf.lo 
safe_mode.lo fopen_wrappers.lo alloca.lo php_ini.lo SAPI.lo rfc1867.lo 
php_content_types.lo strlcpy.lo strlcat.lo mergesort.lo reentrancy.lo 
php_variables.lo php_ticks.lo streams.lo network.lo 
php_open_temporary_file.lo php_logos.lo 
Making all in ext
Making all in zlib
Making all in ldap
Making all in mcrypt
Making all in mysql
Making all in libmysql
Making all in openssl
Making all in pcre
Making all in pcrelib
Making all in posix
Making all in sablot
Making all in session
Making all in snmp
Making all in standard
Making all in xml
Making all in expat
Making all in xmltok
Making all in xmlparse
Making all in sapi
Making all in apache
Making all in TSRM
Making all in regex
Making all in .
/bin/sh /stuff/php-4.0.6/libtool --silent --mode=link gcc  -I. 
-I/stuff/php-4.0.6/ -I/stuff/php-4.0.6/main -I/stuff/php-4.0.6 
-I/usr/local/include/httpd -I/stuff/php-4.0.6/Zend -I/usr/local/include 
-I/stuff/php-4.0.6/ext/mysql/libmysql -I/usr/local/include/ucd-snmp 
-I/stuff/php-4.0.6/ext/xml/expat/xmltok 
-I/stuff/php-4.0.6/ext/xml/expat/xmlparse -I/stuff/php-4.0.6/TSRM  
-DNETBSD -DEAPI -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2   
-o libphp4.la -rpath /stuff/php-4.0.6/libs -avoid-version 
-L/usr/local/lib  -R /usr/local/lib stub.lo  Zend/libZend.la  
sapi/apache/libsapi.la  main/libmain.la  regex/libregex.la  
ext/zlib/libzlib.la ext/ldap/libldap.la ext/mcrypt/libmcrypt.la 
ext/mysql/libmysql.la ext/openssl/libopenssl.la ext/pcre/libpcre.la 
ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la 
ext/snmp/libsnmp.la ext/standard/libstandard.la ext/xml/libxml.la  
TSRM/libtsrm.la -lsnmp -liconv -lexpat -lsablot -lmcrypt -lltdl -lldap 
-llber -lz -lcrypt -lssl -lcrypto -lresolv -lm -lresolv

*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
/usr/bin/ld: unrecognized option `-Wl,--whole-archive'
*** Error code 1

Stop.
make: stopped in /stuff/php-4.0.6
*** Error code 1

Stop.
make: stopped in /stuff/php-4.0.6


I looked at the ld manpage and it does not support the -Wl flag.  When 
compile PHP 4.0.5 from pkgsrc, it compiles fine without this error.
When I compile 4.0.5 by hand, I get the same error from above.  I 
applied the patches from the 4.0.5 pkgsrc to 4.0.6; all applied fine
except the first one.  But I'm still getting the error from above.  The 
configure command I used is:

./configure --with-mysql --with-apxs --with-openssl --with-zlib 
--with-ldap --with-mcrypt --with-pcre-regex --with-sablot --with-snmp

Which works fine without any errors.  The reason why I'm trying to 
compile PHP 4.0.6 is because the PHP 4.0.5 in pkgsrc will not
support perl regular expressions (pcre) even after I install php4-pcre 
under /usr/pkgsrc/www, and I really need that extension.  So does
anyone know why this isn't working?  I've been trying  for a while now.

Any help would be *much* appreciated