php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29297 PDFLib 6 make error
Submitted: 2004-07-21 13:51 UTC Modified: 2005-04-28 08:31 UTC
Votes:25
Avg. Score:4.7 ± 0.7
Reproduced:24 of 24 (100.0%)
Same Version:11 (45.8%)
Same OS:10 (41.7%)
From: v_santhanam at ettimadai dot amrita dot edu Assigned: rjs (profile)
Status: Wont fix Package: Compile Failure
PHP Version: 4.3.8 OS: Redhat Enterprise Linux AS 3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-07-21 13:51 UTC] v_santhanam at ettimadai dot amrita dot edu
Description:
------------
Dear Friends,
     I am trying to compile php-4.3.8 with pdflib 6(latest version). But i am not able to make with the following error :
------------------------------------------------------

ext/pdf/pdf.lo(.text+0x5fd): In function `zif_pdf_open':
/usr/local/src/php-4.3.8/ext/pdf/pdf.c:472: undefined reference to `PDF_open_fp'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

------------------------------------------------------

My php configure command is :

-------------------------------------------------------

./configure  --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr --with-pdflib=/usr/local

--------------------------------------------------------

Please kindly help me.
Thanks in advance
With Regards
Santhanam


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-22 16:53 UTC] rjs@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The pdf wrapper in PHP 4.3.x is not compatible with PDFlib 6. Please try the PECL package for pdflib, this has the new wrappercode that works with PDFlib 6 too and it can be used with PHP 4.3.
 [2004-09-03 08:39 UTC] derick@php.net
If it's not supported then configure should check for it. Assigning to the maintainer.
 [2004-09-03 11:34 UTC] jacques@php.net
I think the changes in the PECL version which was a repo copy of ext/pdflib should have the PHP 4 changes MFH so that php 4.3.9 compiles cleanly with pdflib 6 support.
 [2004-09-13 17:14 UTC] rjs@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Removed the extension in ext/pdf as it is available from PECL.
 [2004-09-16 20:37 UTC] alvaro_php at adplabs dot com dot br
This is still happening as of php4-STABLE-200409161630. I too get 

ext/pdf/pdf.lo(.text+0x5fa): In function `zif_pdf_open':
/usr/src/php4-STABLE-200409161630/ext/pdf/pdf.c:472: undefined reference to `PDF_open_fp

while trying to compile on Fedora Core 2 x86.

No luck with PECL version either:


SRM -DHAVE_CONFIG_H -g -O2 -c /tmp/tmprYIopN/pdflib-2.0.2/pdf.c  -fPIC -DPIC -o .libs/pdf.o
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:87:28: ext/gd/php_gd.h: No such file or directory
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:89:31: ext/gd/libgd/gd.h: No such file or directory
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c: In function `zif_pdf_open_memory_image':
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:7081: error: `gdImagePtr' undeclared (first use in this function)
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:7081: error: (Each undeclared identifier is reported only once
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:7081: error: for each function it appears in.)
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:7081: error: syntax error before "im"
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:7099: error: `im' undeclared (first use in this function)
/tmp/tmprYIopN/pdflib-2.0.2/pdf.c:7099: error: syntax error before "zend_fetch_resource"
make: *** [pdf.lo] Error 1


Thanks in advance,

?lvaro
 [2004-10-05 02:01 UTC] alvaro_php at adplabs dot com dot br
I sucessfully compiled version 6 with 4.3.8.

here's what I did:

1) compiled pdflib with shared libs and installed. Added /usr/local/lib to /etc/ld.so.conf and ran ldconfig.

2) I discovered that the version of GD from PHP was newer than the one I had on my system, so I added --with-gd=/usr to tell PHP to use my installed GD instead of its bundled version. 

3)I copied php_gd.h to /usr/include/php/ext/gd/ and gd.h to /usr/include/php/ext/gd/libgd/.

4) typed pear install pdflib  (it downloaded the newest extension, compiled, and installed.

5) added extension=pdf.so to php.ini

No need to recompile PHP.
 [2004-11-14 00:42 UTC] rjs@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Configure now only allows to work with PDFlib up to PDFlib 4, as newer PDFlib versions need the code from the PDFlib PECL module.


 [2004-11-16 06:07 UTC] v_santhanam at ettimadai dot amrita dot edu
Dear Friends,
    very happy to know that the bug has been fixed. But i have one doubt. rjs has told "Configure now only allows to work with PDFlib up to PDFlib 4". But for my little brain tells that PHP can work perfectly upto PDFLib 5. Please kindly clarify. Thanks a lot in advance.
With Regards
Santhanam
 [2004-11-22 12:01 UTC] rjs@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

There is a wrapper that works with PDFlib 5 and PDFlib 6. You can find this wrapper at pecl.php.net.

The wrapper included here supports the PDFlib 4 API and not more. It is true, that it also would compile with PDFlib 5, but it does not support PDFlib 5, as the new API's from PDFlib 5 are not implemented. 

This is the reason why configure strictly checks this.
 [2004-11-22 13:05 UTC] derick@php.net
Reiner, you didn't not commit anything so don't use the quick fix "Fixed in CVS". Also, there is no good reason to block the use of PDFLIb 5 here, as it works fine, it just doesn't have a full implementation. That is not a problem as it is the case for most other bindings to libraries. I'm re-assigning this until the confiure check is fixed.
 [2004-11-29 10:14 UTC] derick@php.net
I reverted this fix in CVS now, please make a proper one that allows PDFLib 4 and 5 to work.
 [2005-04-28 08:31 UTC] sniper@php.net
Use the PECL extension if you need PDFLib 6 support.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 11:01:28 2024 UTC