|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37769 configure fails to link to specified libfreetype in /usr/local/X11R6
Submitted: 2006-06-09 18:18 UTC Modified: 2006-06-14 17:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: openmacnews at gmail dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.1.4, 5.2 cvs OS: osx
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: openmacnews at gmail dot com
New email:
PHP Version: OS:


 [2006-06-09 18:18 UTC] openmacnews at gmail dot com

i'm, building php-5.2 cvs-head on OSX 10.4.6.

as prereq, i've FreeType2 built into my /usr/local/X11R6 tree:

	cd /usr/local/X11R6/lib/
	ls -al *freetype*
		-rwxr-xr-x 1 root wheel 1975684 2006-06-05 21:50 libfreetype.6.3.10.dylib
		lrwxr-xr-x 1 root wheel      24 2006-06-05 21:50 libfreetype.6.dylib -> libfreetype.6.3.10.dylib
		-rw-r--r-- 1 root wheel 2093880 2006-06-05 21:50 libfreetype.a
		lrwxr-xr-x 1 root wheel      24 2006-06-05 21:50 libfreetype.dylib -> libfreetype.6.3.10.dylib
		-rwxr-xr-x 1 root wheel     901 2006-06-05 21:50

nonetheless, w/ ENV of:

	setenv CPPFLAGS "-I${ULDM}/mysql/include/mysql -I${ULDM}/berkeley-db/include -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/ncurses/include -I/usr/local/X11R6/include"
	setenv LDFLAGS "-bind_at_load -L${ULDM}/mysql/lib/mysql -lmysqlclient_r -L${ULDM}/berkeley-db/lib -ldb -L/usr/local/lib -lpcre -L/usr/local/ssl/lib -lssl -lcrypto -L/usr/local/ncurses/lib -lncurses -L/usr/local/X11R6/lib"

and config'ing as:

	./configure \
	--with-freetype-dir=/usr/local/X11R6 \

config output to console reports, as expected:

	checking for FreeType 2... /usr/local/X11R6

BUT, once built,checking the binary's linking,

otool -L ${ULDM}/php5/bin/php | grep freetype
        /usr/X11R6/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.8.0)

i.e., NOT the libfreetype we're targeting!

checking in the Makefile:

	grep X11R6 Makefile

i find:

CPPFLAGS = -I/usr/local/mysql/include/mysql -I/usr/local/berkeley-db/include -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/ncurses/include -I/usr/local/X11R6/include -no-cpp-precomp
EXTRA_LDFLAGS = -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/berkeley-db/lib -L/usr/X11R6/lib -L/usr/local/X11R6/lib -L/usr/local/gd/lib -L/usr/local/ncurses/lib/ -L/usr/local/mysql/lib/mysql -L/usr/local/ncurses/lib -L/usr/local/net-snmp/lib
EXTRA_LDFLAGS_PROGRAM = -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/berkeley-db/lib -L/usr/X11R6/lib -L/usr/local/X11R6/lib -L/usr/local/gd/lib -L/usr/local/ncurses/lib/ -L/usr/local/mysql/lib/mysql -L/usr/local/ncurses/lib -L/usr/local/net-snmp/lib
INCLUDES = -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/ssl/include -I/usr/ports/php-5.2cvs/ext/date/lib -I/usr/X11R6/include -I/usr/local/X11R6/include -I/usr/local/X11R6/include/freetype2 -I/usr/local/gd/include -I/usr/ports/php-5.2cvs/ext/mbstring/oniguruma -I/usr/ports/php-5.2cvs/ext/mbstring/libmbfl -I/usr/ports/php-5.2cvs/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/usr/local/ncurses/include/ncurses -I/usr/local/net-snmp/include -I$(top_builddir)/TSRM -I$(top_builddir)/Zend
NATIVE_RPATHS = -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/berkeley-db/lib -L/usr/X11R6/lib -L/usr/local/X11R6/lib -L/usr/local/gd/lib -L/usr/local/ncurses/lib/ -L/usr/local/mysql/lib/mysql -L/usr/local/ncurses/lib -L/usr/local/net-snmp/lib
PHP_LDFLAGS = -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/berkeley-db/lib -L/usr/X11R6/lib -L/usr/local/X11R6/lib -L/usr/local/gd/lib -L/usr/local/ncurses/lib/ -L/usr/local/mysql/lib/mysql -L/usr/local/ncurses/lib -L/usr/local/net-snmp/lib
PHP_RPATHS = -R /usr/local/lib -R /usr/local/ssl/lib -R /usr/local/berkeley-db/lib -R /usr/X11R6/lib -R /usr/local/X11R6/lib -R /usr/local/gd/lib -R /usr/local/ncurses/lib/ -R /usr/local/mysql/lib/mysql -R /usr/local/ncurses/lib -R /usr/local/net-snmp/lib

there needs to be a way to get php build to pick up freetype from where i tell it to ...



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-09 23:46 UTC] openmacnews at gmail dot com
also the case on v5.1.4
 [2006-06-14 16:32 UTC]
Search more information about "LD_LIBRARY_PATH" from web.
Or install the libs in sane paths. Not a bug.
 [2006-06-14 16:47 UTC] openmacnews at gmail dot com
/usr/local/X11R6 is not a sane path?

why provide a config option, then, if the build process ignores it?

per my post, the config script CLEARLY checks for / finds it:

   checking for FreeType 2... /usr/local/X11R6

regardless of LD_LIBRARY_PATH, but then ignores what it finds.

that's "not a bug"?
 [2006-06-14 16:51 UTC]
Please find out first what dynamic linking means.
 [2006-06-14 17:00 UTC] openmacnews at gmail dot com
you seem to be convinced that, despite the fact that this behavior is unlike ANY of the other myriad modules -- dynamic or otherwise -- we successfully build, that all's ok.

hmm ... one might think that specific config instructions:

   --with-freetype-dir=/usr/local/X11R6 \
   checking for FreeType 2... /usr/local/X11R6

might actually be followed.

but you must be right.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 23:01:31 2024 UTC