Bug #1643: Failure when compiling/linking with PDFlib2.0
| From: | Jan dot Dubiec at alcatel dot pl | Date: | Thu, 01 Jul 1999 14:31:07 +0000 |
| Subject: | Bug #1643: Failure when compiling/linking with PDFlib2.0 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7938@lists.php.net to get a copy of this message | ||
From: Jan.Dubiec@alcatel.pl
Operating system: Solaris 2.5.1
PHP version: 3.0.11
PHP Bug Type: Compile Failure
Bug description: Failure when compiling/linking with PDFlib2.0
I noticed today following error when I was compiling Apache 1.36 with PHP (and other third party
modules):
gcc -DSOLARIS2=251 -DMOD_SSL=203105 -DMOD_PERL -DUSE_PERL_SSI -I/usr/local/incl
ude -DUSE_HSREGEX -DEAPI
./apaci -L/usr/local/lib \
-o httpd buildmark.o modules.o modules/ssl/libssl.a modules/perl/libperl.a
modules/php3/libphp3.a modules/extra/libextra.a modules/standard/libstandard.a
main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a -lsmbvalid -R/usr/l
ocal/lib -R/usr/local/pgsql/lib -Lmodules/php3 -L../modules/php3 -L../../modules
/php3 -lmodphp3 -lpcre -L/usr/local/lib -lz -L/usr/local/li
b -lz -L/usr/local/lib -lpdf -lm -lsocket -lnsl -lresolv -lsocket -lnsl -lssl
-lcrypto -L/usr/local/lib /usr/local/lib/perl5/5.00502/sun4-solaris/auto/Dyn
aLoader/DynaLoader.a -L/usr/local/lib/perl5/5.00502/sun4-solaris/CORE -lperl -ls
ocket -lnsl -ldl -lm -lc -lcrypt -ldb /usr/local/lib/c-client.a -L/usr/local/l
ib -lgd -L/usr/local/pgsql/lib -lpq -lldap -llber
modules/php3/libphp3.a(pdf.o): In function `_free_pdf_doc':
pdf.o(.text+0xc): undefined reference to `PDF_close_fp'
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/export/home0/jdx/apache_1.3.6/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/export/home0/jdx/apache_1.3.6'
make: *** [build] Error 2
File pdf.c from PHP sources contains following few lines:
static void _free_pdf_doc(PDF *pdf)
{
#if HAVE_PDFLIB2
PDF_close_fp(pdf);
PDF_delete(pdf);
#else
PDF_close(pdf);
#endif
}
Header file pdflib.h (from PDFlib2.0) doesn't contain declaration of PDF_close_fp(). Simple
change PDF_close_fp()
for PDF_close() guard against that annoying error but it isn't, IMHO, good job. :-)
Regards,
Jan