|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62833 pdflib doesn't compile statically
Submitted: 2012-08-15 20:34 UTC Modified: 2012-08-22 12:11 UTC
From: marcelo at tpn dot com dot br Assigned: rjs (profile)
Status: Closed Package: pdflib (PECL)
PHP Version: 5.3.15 OS: FreeBSD 8.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: marcelo at tpn dot com dot br
New email:
PHP Version: OS:


 [2012-08-15 20:34 UTC] marcelo at tpn dot com dot br
I tried to compile PHP with pdflib support:

cd /path-to-php-5.3.15-src
cd ext
pecl download pdflib
tar -xzf pdflib-2.1.9.tar.gz
mv pdflib-2.1.9 pdf
cd ..
rm configure
./buildconf --force

./configure -with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-
path=/usr/local/etc --with-config-file-scan-dir=/usr/local/etc/php --enable-
suhosin --with-mysql --with-zlib --with-gd --with-pdflib --with-jpeg-
dir=/usr/local/include --with-png-dir=/usr/local/include --with-xpm-
dir=/usr/local/include --enable-gd-native-ttf --with-freetype-
dir=/usr/local/include/freetype2/freetype --with-t1lib --with-mcrypt --with-
mysqli=mysqlnd --enable-mbstring --enable-bcmath --enable-calendar --enable-ftp -
-enable-exif --enable-dba --with-gettext --with-bz2 --with-curl --with-gmp --
with-mhash --enable-intl --with-pdo-mysql --enable-soap --enable-sockets --
enable-wddx --with-tidy --with-xsl --enable-zip --with-openssl --with-xmlrpc --
enable-xcache --enable-xcache-constant --with-imagick --disable-phar --with-

make install

Test script:



pdf extension isn't there.

Expected result:
pdf module should be compiled statically


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-22 11:02 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

newer PDFlib libraries contain some C++ code, so for linking the C++ compiler is 
needed (which pulls in the needed extra libraries).

I'm not aware how the PHP build system can be convinced to use the C++ compiler 
for linking.

A work around might be that you call make with CC set to the C++ compiler after 
the build failed when it tried to link. So the sequence:

make -i
make CC=g++
make install

should create the PHP binary.
 [2012-08-22 11:02 UTC]
-Status: Open +Status: Not a bug
 [2012-08-22 12:03 UTC] marcelo at tpn dot com dot br
You can close this bug report, because this problem was fixed with PHP 5.3.16.

Thank you.
 [2012-08-22 12:11 UTC]
-Status: Not a bug +Status: Closed -Assigned To: +Assigned To: rjs
 [2012-08-22 12:11 UTC]
user reported that it is fixed in 5.3.16
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 09 04:03:34 2021 UTC