php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9856 Missing run path in shared object library
Submitted: 2001-03-20 00:29 UTC Modified: 2001-06-04 04:38 UTC
From: bill dot roberts at anu dot edu dot au Assigned:
Status: Closed Package: Installation problem
PHP Version: 4.0.4pl1 OS: Solaris 8
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bill dot roberts at anu dot edu dot au
New email:
PHP Version: OS:

 

 [2001-03-20 00:29 UTC] bill dot roberts at anu dot edu dot au
The libtool call at the end of the build lists a lot of -R directives to the build to put the run path in libphp4.so, but the run path is not there.  I ran libtool without the --silent to see what it was doing and got this:

mizar</data/mizar/bill/php-4.0.4pl1>/bin/sh /data/mizar1/bill/php-4.0.4pl1/libtool 
 --mode=link cc  -I. -I/data/mizar1/bill/php-4.0.4pl1/ -I/data/mizar1/bill/php-4.0
.4pl1/main -I/data/mizar1/bill/php-4.0.4pl1 -I/usr/local/apache_1.3.19/include -I/
data/mizar1/bill/php-4.0.4pl1/Zend -I/usr/local/ssl/include -I/usr/local/ldap/incl
ude -I/usr/local/mysql/include/mysql -I/data/mizar1/bill/php-4.0.4pl1/ext/xml/expa
t/xmltok -I/data/mizar1/bill/php-4.0.4pl1/ext/xml/expat/xmlparse -I/usr/local/incl
ude -I/data/mizar1/bill/php-4.0.4pl1/TSRM  -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=2
80 -DMOD_SSL=208101 -DEAPI -DUSE_EXPAT -DSHARED_CORE -DHAVE_NSLDAP -DXML_BYTE_ORDE
R=21 -xO3 -I/usr/local/ssl -DHAVE_NSLDAP -I/usr/include   -o libphp4.la -rpath /da
ta/mizar1/bill/php-4.0.4pl1/libs -avoid-version -L/usr/ucblib -L/usr/local/ssl/lib
 -L/usr/local/ldap/lib -L/usr/local/mysql/lib/mysql -L/usr/local/lib  -R /usr/ucbl
ib -R /usr/local/ssl/lib -R /usr/local/ldap/lib -R /usr/local/mysql/lib/mysql -R /
usr/local/lib stub.lo  Zend/libZend.la  sapi/apache/libsapi.la  main/libmain.la  r
egex/libregex.la  ext/ldap/libldap.la ext/mysql/libmysql.la ext/openssl/libopenssl
.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standa
rd/libstandard.la ext/xml/libxml.la ext/zlib/libzlib.la  TSRM/libtsrm.la -lpam -ld
l -lz -lmysqlclient -lldap -llber -lcrypto -lssl -lresolv -lresolv -lm -ldl -lcryp
t -lnsl -lsocket -lsocket


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/apache/.libs/libsapi.al main/.libs/libmain.al regex/.libs/libregex.al ext/ldap/.libs/libldap.al ext/mysql/.libs/libmysql.al ext/openssl/.libs/libopenssl.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/ucblib -L/usr/local/ssl/lib -L/usr/local/ldap/lib -L/usr/local/mysql/lib/mysql -L/usr/local/lib -lpam -ldl -lz -lmysqlclient -lldap -llber -lcrypto -lssl -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket -lpam -ldl -lz -lmysqlclient -lldap -llber -lcrypto -lssl -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket -lc 
creating libphp4.la
(cd .libs && rm -f libphp4.la && ln -s ../libphp4.la libphp4.la)

Note there are no -R directives in the generated ld command.  This leads to:

mizar</data/mizar/bill/php-4.0.4pl1>ldd -s .libs/libphp4.so

   find library=.libs/libphp4.so; required by /usr/lib/lddstub

   find library=libpam.so.1; required by .libs/libphp4.so
    search path=/usr/lib  (default)
    trying path=/usr/lib/libpam.so.1
        libpam.so.1 =>   /usr/lib/libpam.so.1

   find library=libdl.so.1; required by .libs/libphp4.so
    search path=/usr/lib  (default)
    trying path=/usr/lib/libdl.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1

   find library=libz.so; required by .libs/libphp4.so
    search path=/usr/lib  (default)
    trying path=/usr/lib/libz.so
        libz.so =>       /usr/lib/libz.so

   find library=libmysqlclient.so.6; required by .libs/libphp4.so
    search path=/usr/lib  (default)
    trying path=/usr/lib/libmysqlclient.so.6
        libmysqlclient.so.6 =>   (file not found)

... other stuff deleted...

i.e. libmysqlclient.so.6 is not found

Note:  I had no LD_LIBRARY_PATH set 

mysql is installed as /usr/local/mysql

I eventually fixed this by cutting and pasting the generated ld command and adding the necessary -R directives

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-04 04:38 UTC] sniper@php.net
Not a PHP bug but libtool 'feature'. 
Report it to the libtool developers.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 13:01:30 2024 UTC