|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5906 PHP 4.0RC2 or higher with CLibPDF fails to compile on RedHat 5.2
Submitted: 2000-08-01 18:50 UTC Modified: 2001-03-18 13:39 UTC
From: nels at maei dot ca Assigned:
Status: Closed Package: ClibPDF related
PHP Version: 4.0RC2 through 4.0.3pl1 OS: Gnu/Linux
Private report: No CVE-ID: None
 [2000-08-01 18:50 UTC] nels at maei dot ca
When trying to compile PHP 4.0RC2 or higher (at the time of this submission,
PHP 4.0.1pl2 is the latest available) with CLibPDF support on RedHat 5.2, the
compile fails.  This problem occurs both when compiling as a DSO, or as a static
module.  The error occurs with Stronghold 2.4 (based on Apache 1.3.6) and
Stronghold 3.0 (based on Apache 1.3.12).  The problem does not occur on
RedHat 6.2 -- I've successfully compiled PHP 4.0.1pl2 with CLibPDF support
on that platform.

I ran a diff between the versions of cpdf.c included with RC1 vs. RC2, and it
appears that, among other things, several changes related to the module
interface with the Zend engine were made.

Error message:
/bin/sh /usr/src/redhat/BUILD/php/libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/src/redhat/BUILD/php/main -I/usr/src/redhat/BUILD/php -I/usr/src/redhat/BUILD/php/main -I/usr/local/stronghold/src/.includes-apxs -I/usr/src/redhat/BUILD/php/Zend -I/usr/src/redhat/BUILD/php -I/usr/local/include -I/usr/local/include/freetype -I/usr/src/redhat/BUILD/imap/include -I/usr/src/redhat/BUILD/php/ext/mysql/libmysql -I/usr/src/redhat/BUILD/php/ext/xml/expat/xmltok -I/usr/src/redhat/BUILD/php/ext/xml/expat/xmlparse  -DXML_BYTE_ORDER=12 -DSTRONHGOLD -I/usr/local/stronghold/ssl/include  -c internal_functions.c
In file included from /usr/src/redhat/BUILD/php/ext/cpdf/php_cpdf.h:36,
                 from internal_functions.c:47:
/usr/local/include/cpdflib.h:801: parse error before `1'
make[2]: *** [internal_functions.lo] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/php-4.0.1pl2/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.0.1pl2/main'
make: *** [all-recursive] Error 1
PHP configure line:
./configure --with-config-file-path=/usr/local/stronghold/conf --with-apxs=/usr/local/stronghold/bin/apxs --enable-versioning --disable-debug --with-zlib --with-gd --with-gdbm --with-db2 --with-mysql --with-xml --with-ldap --with-imap=/usr/src/redhat/BUILD/imap --with-cpdflib=/usr/local --with-png-dir=/usr/local --with-jpeg-dir=/usr --with-tiff-dir=/usr --enable-sysvshm=yes --enable-sysvsem=yes --enable-track-vars=yes --enable-bcmath=yes --enable-memory-limit=yes

The installed compiler is gcc


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-31 11:34 UTC]
Have you tried PHP4.0.2 yet? 

 [2000-08-31 20:53 UTC]
User feedback:

Problem still exists. 

 [2000-12-06 13:24 UTC] nels at maei dot ca
Update:  Problem occurs when both CLibPDF and IMAP support are included on the ./configure line, for
all versions of PHP 4 higher than 4.0RC1.

If I remove either of --with-cpdflib or --with-imap from the configure statement, then php
compiles just fine.

Problem has been verified on RedHat 6.2 platform and Mandrake 7.1, so my speculations about old 
versions of GCC or glibc were not correct.

Tested with Stronghold 3.0 and Apache 1.3.14.

Here's my "bare-bones" ./configure statement with just enough to replicate the problem:

./configure \
        --with-config-file-path=/usr/local/stronghold/conf \
        --with-apxs=/usr/local/stronghold/bin/apxs \
        --enable-versioning \
        --disable-debug \
        --without-gd \
        --without-mysql \
        --without-xml \
        --with-imap=/usr/src/redhat/BUILD/imap \
        --with-cpdflib=/usr/local \
        --with-png-dir=/usr \
        --with-jpeg-dir=/usr \
        --with-tiff-dir=/usr \
        --with-xpm-dir=/usr/X11R6 \
        --enable-sysvshm=yes \
        --enable-sysvsem=yes \
        --enable-track-vars=yes \

 [2000-12-08 11:13 UTC] nels at maei dot ca
If both IMAP and CLibPDF support are configured, then main/internal_functions.c
seems to always include the necessary header files for imap before cpdf.

If I move the #include "ext/imap/php_imap.h" line immediately AFTER
#include "ext/cpdf/php_cpdf.h", then I'm able to successfully build PHP

Tested on RH5.2 with PHP 4.0RC2 & PHP 4.0.3pl1, and on RH6.2 with
PHP 4.0.3pl1.

Looks like something in the imap headers is clobbering cpdf.
 [2001-03-18 13:39 UTC]
#define T 1 in mail.h clashes with a function declaration in cpdflib.h. Fixed in CVS.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 29 04:03:53 2023 UTC