php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7083 libtool drops -R directories during linking
Submitted: 2000-10-08 01:25 UTC Modified: 2000-11-29 04:28 UTC
From: dkluge at acm dot org Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.2 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: dkluge at acm dot org
New email:
PHP Version: OS:

 

 [2000-10-08 01:25 UTC] dkluge at acm dot org
I'm using gcc 2.7.2.2 on Solaris 2.6, and found that libtool will strip all -R directories from the input which leads to unresolved library links, see the following compiler output (removed --silent from $LIBTOOL command)

/bin/sh /local/tmp/php-4.0.2/libtool --mode=link gcc  -I. -I/local/tmp/php-4.0.2/ -I/local/tmp/php-4.0.2 -I/local/tmp/php-4.0.2/main -I/local/netscape/include -I/local/tmp/php-4.0.2/Zend -I/local/tmp/php-4.0.2 -I/local/gnu/include -I/local/mysql/include -I/local/ora816/rdbms/public -I/local/ora816/rdbms/demo -I/local/ora816/network/public -I/local/tmp/php-4.0.2/ext/xml/expat/xmltok -I/local/tmp/php-4.0.2/ext/xml/expat/xmlparse -I/local/tmp/php-4.0.2/TSRM  -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DXML_BYTE_ORDER=21 -I../TSRM -g -O2   -o libphp4.la -rpath /local/tmp/php-4.0.2/libs -avoid-version -L/usr/gnu/sun4-56/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.2 -L/local/gnu/lib -L/local/mysql/lib -L/local/ora816/lib  -R /usr/gnu/sun4-56/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.2 -R /local/gnu/lib -R /local/mysql/lib -R /local/ora816/lib stub.lo  Zend/libZend.la  sapi/nsapi/libsapi.la  main/libmain.la  regex/libregex.la  ext/db/libdb.la ext/dba/libdba.la ext/ftp/libftp.la ext/mysql/libmysql.la ext/oci8/liboci8.la ext/oracle/liboracle.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la ext/zlib/libzlib.la  TSRM/libtsrm.la -lgdbm -lpam -lstdc++ -lg++ -ldl -lz -lclntsh -lsched -ldl -lgen -lsocket -lnsl -lclntsh -lsched -ldl -lgen -lsocket -lnsl -lmysqlclient -lgdbm -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lpthread -lsocket -lgcc
rm -fr .libs/libphp4.la .libs/libphp4.* .libs/libphp4.*
/usr/ccs/bin/ld -G -h libphp4.so -o .libs/libphp4.so  stub.lo -z allextract Zend/.libs/libZend.al sapi/nsapi/.libs/libsapi.al main/.libs/libmain.al regex/.libs/libregex.al ext/db/.libs/libdb.al ext/dba/.libs/libdba.al ext/ftp/.libs/libftp.al ext/mysql/.libs/libmysql.al ext/oci8/.libs/liboci8.al ext/oracle/.libs/liboracle.al ext/pcre/.libs/libpcre.al ext/posix/.libs/libposix.al ext/session/.libs/libsession.al ext/standard/.libs/libstandard.al ext/xml/.libs/libxml.al ext/zlib/.libs/libzlib.al TSRM/.libs/libtsrm.al -z defaultextract  -L/usr/gnu/sun4-56/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.2 -L/local/gnu/lib -L/local/mysql/lib -L/local/ora816/lib -lgdbm -lpam -lstdc++ -lg++ -ldl -lz -lclntsh -lsched -ldl -lgen -lsocket -lnsl -lmysqlclient -lgdbm -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lpthread -lsocket -lgdbm -lpam -lstdc++ -lg++ -ldl -lz -lclntsh -lsched -ldl -lgen -lsocket -lnsl -lclntsh -lsched -ldl -lgen -lsocket -lnsl -lmysqlclient -lgdbm -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lpthread -lsocket -lgcc -lc 
creating libphp4.la
(cd .libs && rm -f libphp4.la && ln -s ../libphp4.la libphp4.la)

This is not really a bug in php, but an issue with libtool. It is possilbe to hard-code library-paths into shared libraries with the latest development release (1.3d) of libtool.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-29 04:28 UTC] sniper@php.net
This is known issue. And you should just
set LD_LIBRARY_PATH correctly. Hard-coding library
paths into library is bad thing.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jul 15 15:00:02 2026 UTC