PHP 4.0 Bug #8575: && [PHP-INST] PHP 4.0.4 - unable to configure under Solaris 2.6 (explanation)
| From: | Maciek Uhlig | Date: | Mon, 08 Jan 2001 20:02:14 +0000 |
| Subject: | PHP 4.0 Bug #8575: && [PHP-INST] PHP 4.0.4 - unable to configure under Solaris 2.6 (explanation) | ||
| Groups: | php.dev php.install | ||
| Request: | Send a blank email to php-dev+get-43448@lists.php.net to get a copy of this message | ||
Introduction:
OK, so you don't believe PHP 4.0.4 configure fails under Solaris 2.6? :-) Ju
st read on. You'll get known how it is possible at all. Below you'll find th
e complete history as well as the description what was going on and why it f
ailed (even two times).
Summary:
there are at least 2 problems with PHP configure. These problems prevent con
figure from correctly completing in certain circumstances.
History:
1. zlib 1.1.3 was installed:
# cd /usr/local/lib
# ls -l libz.a
-rwxr-xr-x 1 root other 71276 Oct 21 18:30 libz.a
2. mysql-3.23.27-beta was installed:
# cd /usr/local/lib/mysql
# ls -l libmysqlclient*
-rwxr-xr-x 1 root other 186824 Nov 23 19:14 libmysqlclient.a
-rwxr-xr-x 1 root other 730 Nov 23 19:14 libmysqlclient.la
lrwxrwxrwx 1 root other 24 Nov 23 19:14 libmysqlclient.so -> l
ibmysqlclient.so.10.0.0
lrwxrwxrwx 1 root other 24 Nov 23 19:14 libmysqlclient.so.10 -
> libmysqlclient.so.10.0.0
-rwxr-xr-x 1 root other 135916 Nov 23 19:14 libmysqlclient.so.10.0
.0
3. we can make two remarks here:
-- both MySQL client object and shared object libraries were installed
-- MySQL was installed with support for compressed communication protocol (s
ee MySQL manual - 4.12.1), so MySQL client libraries contain references to c
ompress and uncompress. MySQL installation was succesful - it was -lz used t
here.
4. then PHP 4.0.4 was attempted to be configured:
./configure --with-zlib --with-mysql=/usr/local --with-apache=../../apache/a
pache_1.3.12 --with-ldap=/usr/local/ldap --enable-track-vars --enable-magic-
quotes --enable-bcmath
5. configure failed while checking for gzgets(). This is described as bug #8
575. The problem was remedied with manually changing library order in config
ure script (from: -lz -lmysqlclient to: -lmysqlclient -lz)
6. configure failed once more while checking for seteuid(). This was describ
ed in previous post to PHP-INSTALL. The debug log shows (among others):
gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -R/usr/ucblib -L/usr/ucb
lib
-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -L/usr/local/lib/gcc-li
b/sp
arc-sun-solaris2.6/2.95.2 -R/usr/local/ldap/lib -L/usr/local/ldap/lib -R/usr
/loc
al/lib/mysql -L/usr/local/lib/mysql conftest.c -lmysqlclient -lldap -llber -
lres
olv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket -lgcc 1>&5
Undefined first referenced
symbol in file
uncompress /usr/local/lib/mysql/libmysqlclient.so
compress /usr/local/lib/mysql/libmysqlclient.so
ld: fatal: Symbol referencing errors. No output written to conftest
7. what we can see is:
-- while checking for seteuid() (and more) and gzgets(), PHP configure does
this check without -B static option. This is a reason why we see undefined s
ymbols in *.so libraries
-- while checking for gzgets(), PHP configure uses incorrect order of librar
ies, so reference to compress and uncompress from libmysqlclient can not be
resolved.
-- while checking for seteuid(), PHP configure completely misses -lz (rest a
s above). Alternatively, a question is: why all libraries are included while
checking for basic system calls? If additional libraries were not checked, n
o problem would arise.
Conclusion:
PHP configure fix is needed. I'll happily test it, just please provide data.
Thank you for your attention.
Maciek Uhlig
Computer Center, University of Silesia, Katowice, Poland