php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7426 libtool links without -R options
Submitted: 2000-10-24 07:27 UTC Modified: 2000-10-27 08:23 UTC
From: lupe at lupe-christoph dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.3pl1 OS: Solaris 8 x86
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lupe at lupe-christoph dot de
New email:
PHP Version: OS:

 

 [2000-10-24 07:27 UTC] lupe at lupe-christoph dot de
libtool is called thusly:

/bin/sh /sw/WORK/www/php-4.0.3pl1/libtool --silent --mode=link gcc  -I. -I/sw/WORK/www/php-4.0.3pl1/ -I/sw/WORK/www/php-4.0.3pl1 -I/sw/WORK/www/php-4.0.3pl1/main -I/opt/local/i386/apache/include -I/sw/WORK/www/php-4.0.3pl1/Zend -I/sw/WORK/www/php-4.0.3pl1 -I/opt/local/i386/include -I/opt/local/i386/include/freetype -I/opt/local/i386/imap/include -I/opt/local/i386/mysql/include -I/sw/WORK/www/php-4.0.3pl1/ext/xml/expat/xmltok -I/sw/WORK/www/php-4.0.3pl1/ext/xml/expat/xmlparse -I/sw/WORK/www/php-4.0.3pl1/TSRM  -I/opt/local/i386/include/bind -I/opt/local/i386/include -D_POSIX_PTHREAD_SEMANTICS -DEAPI -DXML_BYTE_ORDER=12 -g -O2   -o libphp4.la -rpath /sw/WORK/www/php-4.0.3pl1/libs -avoid-version -L/usr/ucblib -L/opt/local/i386/lib -L/opt/local/i386/imap/lib -L/opt/local/i386/mysql/lib -L/opt/local/i386/postgres/lib  -R/usr/ucblib -R/opt/local/i386/lib -R/opt/local/i386/imap/lib -R/opt/local/i386/mysql/lib -R/opt/local/i386/postgres/lib stub.lo  Zend/libZend.la  sapi/apache/libsapi.la  main/libmain.la  regex/libregex.la  ext/dba/libdba.la ext/gd/libgd.la ext/imap/libimap.la ext/ldap/libldap.la ext/mcrypt/libmcrypt.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pgsql/libpgsql.la ext/posix/libposix.la ext/session/libsession.la ext/shmop/libshmop.la ext/standard/libstandard.la ext/sysvsem/libsysvsem.la ext/sysvshm/libsysvshm.la ext/xml/libxml.la ext/zlib/libzlib.la  TSRM/libtsrm.la -lpam -lc-client -ldl -lz -lpq -lmysqlclient -lmcrypt -lmcrypt -lldap -llber -lttf -lpng -lz -lgd -lgdbm -lm -ldl -lcrypt -lnsl -lbind -lsocket

The actual linker call from a trace to libtool:

+ /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/dba/.libs/libdba.al ext/gd/.libs/libgd.al ext/imap/.libs/libimap.al ext/ldap/.libs/libldap.al ext/mcrypt/.libs/libmcrypt.al ext/mysql/.libs/libmysql.al ext/pcre/.libs/libpcre.al ext/pgsql/.libs/libpgsql.al ext/posix/.libs/libposix.al ext/session/.libs/libsession.al ext/shmop/.libs/libshmop.al ext/standard/.libs/libstandard.al ext/sysvsem/.libs/libsysvsem.al ext/sysvshm/.libs/libsysvshm.al ext/xml/.libs/libxml.al ext/zlib/.libs/libzlib.al TSRM/.libs/libtsrm.al -z defaultextract -L/usr/ucblib -L/opt/local/i386/lib -L/opt/local/i386/imap/lib -L/opt/local/i386/mysql/lib -L/opt/local/i386/postgres/lib -lpam -lc-client -ldl -lz -lpq -lmysqlclient -lmcrypt -lmcrypt -lldap -llber -lttf -lpng -lz -lgd -lgdbm -lm -ldl -lcrypt -lnsl -lbind -lsocket -lpam -lc-client -ldl -lz -lpq -lmysqlclient -lmcrypt -lmcrypt -lldap -llber -lttf -lpng -lz -lgd -lgdbm -lm -ldl -lcrypt -lnsl -lbind -lsocket -lc 

The -R options have been removed, rendering the resultant shared library
(Apache APXS, BTW) unusable:

ldd /opt/local/i386/apache/libexec/libphp4.so
        libpam.so.1 =>   /usr/dt/lib/libpam.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libz.so =>       /opt/local/i386/lib/libz.so
        libpq.so =>      (file not found)
        libmysqlclient.so.6 =>   (file not found)
        libmcrypt.so.2 =>        /opt/local/i386/lib/libmcrypt.so.2
        libttf.so.2 =>   /opt/local/i386/lib/libttf.so.2
        libpng.so.2 =>   /opt/local/i386/lib/libpng.so.2
        libm.so.1 =>     /usr/lib/libm.so.1
        libcrypt_i.so.1 =>       /usr/lib/libcrypt_i.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libgen.so.1 =>   /usr/lib/libgen.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libthread.so.1 =>        /usr/lib/libthread.so.1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-27 08:23 UTC] sniper@php.net
Like Sascha wrote, the libtool 1.3.x doesn't support hardcoded libpaths
in libraries, only in executables.

You should add those paths to LD_LIBRARY_PATH before starting Apache.
e.g. 
# export LD_LIBRARY_PATH=/opt/i386/mysql/lib:/opt/i386/postgres/lib

and it will work.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 23:00:01 2026 UTC