|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18021 custom PDFlib not linked when building with a PDFlib in /usr/local/lib
Submitted: 2002-06-27 11:06 UTC Modified: 2002-06-27 12:25 UTC
From: prante at hbz-nrw dot de Assigned:
Status: Not a bug Package: PDF related
PHP Version: 4.2.1 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-06-27 11:06 UTC] prante at hbz-nrw dot de
It's not possible to override a system-wide PDFlib in /usr/local/lib by a custom PDFlib. This is a problem arising for PHP builders who don't have the possibility to install system libraries (with root access).

I'm builing PHP 4.2.1 on Solaris 8 and tried to link against PDFlib 4.0.3 and no longer the system-wide 4.0.2. 

Other operating systems may be affected, too.

./configure, make, make install work as usual. But phpinfo()  always shows the PDFlib version which is present in /usr/local/lib, no matter how hard I try to configure PHP for PDFlib. LDFLAGS are understood but are inserted in the wrong position.

The problem is visible in $BUILD/php-4.2.1/ where a "-R /usr/local/lib" precedes the custom PDFlib directory and followed by an obviously wrong resolved "/usr/local/lib/" (it should be "$LOCAL/pdflib/lib/")

I looked for /usr/local/lib dependencies in the whole PHP code but didn't find any. I even removed /usr/local/lib from LD_LIBRARY_PATH but it didn't help either. I edited the configure script, no way. I don't know how to get rid of PHP using /usr/local/lib.

I guess this is a bug in the new build system. Without "CC=gcc" configure didn't work at all.

CC=gcc \
CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I$LOCAL/openssl/include -I$LOCAL/pdflib/include" \
LDFLAGS="-L$LOCAL/openssl/lib -L$LOCAL/pdflib/lib" \
  ./configure \
  --prefix=$LOCAL/php \
  --with-apache=$BUILD_APACHE \
  --with-openssl=$LOCAL/openssl \
  --with-oci8=$ORACLE_HOME \
  --with-oracle=$ORACLE_HOME \
  --with-mysql=$LOCAL/mysql \
  --with-zlib \
  --with-zlib-dir=$LOCAL/zlib \
  --with-ftp \
  --enable-ftp \
  --with-ttf \
  --with-gd \
  --enable-gd-imgstrttf \
  --enable-gd-native-ttf \
  --with-gettext \
  --with-magic-quotes \
  --with-pdflib=$LOCAL/pdflib \  <--- this doesn't work!
  --with-png-dir=$LOCAL/libpng \
  --with-jpeg-dir=$LOCAL/libjpeg \
  --with-tiff-dir=$LOCAL/libtiff \
  --enable-versioning \
  --enable-memory-limit \
  --enable-track-vars \
  --enable-url-includes \
  --enable-sysvshm \


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-27 11:26 UTC] prante at hbz-nrw dot de
Same for 4.2.0
 [2002-06-27 12:25 UTC] prante at hbz-nrw dot de
OK, it was a very weird configuration issue with Apache/PHP builds.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jul 11 17:01:27 2020 UTC