|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-14 07:56 UTC] php_public at macfreek dot nl
Description:
------------
Hi,
Starting with pdflib 4.0.3, pdflib needs to be linked
with Carbon support on Mac OS X.
When configuring PHP, PHP will try to compile and link
a test program testing the PDF_show_boxed() function.
However, this test program will not link because the
Carbon libs are not included.
Therefor, PHP can't be ./configure'd on Mac OS X if --
with-pdflib is specified.
See reproduce code & expected result for details and
workaround.
Reproduce code:
---------------
Details from config.log:
From config.log
configure:61608: checking for PDF_show_boxed in -lpdf
configure:61627: gcc -o conftest -g -O2 -no-cpp-
precomp
-L/sw/lib
-L/sw/lib -L/sw/lib -L/usr/local/lib -L/usr/
local/lib conftest.c -lpdf -lz -ltiff -lpng -ljpeg -
lpanel -lncurses -lldap -llber -lpam -lintl -lt1 -
lfreetype -lpng -lz -ljpeg -lxsltbreakpoint -lxml2 -
lxslt -lz -lgdbm -lcurl -lbz2 -lz -lssl -lcrypto -lm -
lcurl -lz -ldl -lz -lxml2 -lz -liconv -lm 1>&5
ld: Undefined symbols:
_FSGetCatalogInfo
_FSPathMakeRef
_FSpGetFInfo
_FSpSetFInfo
configure: failed program was:
#line 61616 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char PDF_show_boxed();
int main() {
PDF_show_boxed()
; return 0; }
Expected result:
----------------
This can be fixed by adding these flags to the
configure script:
CFLAGS=-I/Developer/Headers/FlatCarbon
LDFLAGS="-framework CoreServices -framework
ApplicationServices"
Of course, you should only do that on Mac OS X!
I have made a quick dirty workaround by just adding the
above to the $LIBS variable, and now ./configure works
as expected.
Actual result:
--------------
See config.log details above
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
Can you please try the following patch applied to CVS HEAD? It should work with PHP v4.3 code as well, but the line numbers are probably different. I am not able to check if the include path is a default value on all installs or not yet. Index: config.m4 =================================================================== RCS file: /repository/php-src/ext/pdf/config.m4,v retrieving revision 1.36 diff -r1.36 config.m4 95a96,100 > if test "$platform" = "Darwin"; then > PHP_ADD_FRAMEWORK(CoreServices) > PHP_ADD_FRAMEWORK(ApplicationServices) > PHP_ADD_INCLUDE("/Developer/Headers/FlatCarbon") > fiIt should be something like this instead: case $host_alias in *darwin*) PHP_ADD_FRAMEWORK(CoreServices) PHP_ADD_FRAMEWORK(ApplicationServices) PHP_ADD_INCLUDE("/Developer/Headers/FlatCarbon") ;; esacHi, Thank you guys! I have been succesfull with your help. To compile PHP 4.3.2 with pdflib there was 2 problems: 1-You have to had this line in the config.nice LDFLAGS='-framework Carbon' \ JUST before this one: './configure' \ 2-You have to change the file hp-src/ext/pdf/ config.m4 and add after the comment "The main PDFlib configure" case $host_alias in *darwin*) PHP_ADD_FRAMEWORK(CoreServices) PHP_ADD_FRAMEWORK(ApplicationServices) PHP_ADD_INCLUDE("/Developer/Headers/FlatCarbon") ;; esac (thanks all of you for that!) 3-Then do: autoconf configure.in > configure ./config.nice then make, and sudo make installSo I guess there needs to be one extra PHP_ADD_FRAMEWORK line to not need that LDFLAGS to be set: case $host_alias in *darwin*) PHP_ADD_FRAMEWORK(Carbon) PHP_ADD_FRAMEWORK(CoreServices) PHP_ADD_FRAMEWORK(ApplicationServices) PHP_ADD_INCLUDE("/Developer/Headers/FlatCarbon") ;; esac (I can't really test this, I have no macosx.. :)