473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,403 developers and data experts.

Configuring PHP 5.2.3 with GD support for Mac OS X

pbmods
5,821 Expert 4TB
Configuring PHP 5.2.3 with GD support for Mac OS X

PHP 5.2.3 does not seem to want to configure with GD support on Mac OS X for some reason. When configuring, you may notice this error:

Expand|Select|Wrap|Line Numbers
  1. configure: error: GD build test failed. Please check the config.log for details.
Checking config.log yields the following:
Expand|Select|Wrap|Line Numbers
  1. configure:42434: gcc -o conftest -g -O2  -no-cpp-precomp  -L/usr/local/lib -L/usr/local/lib conftest.c  -L   -lfreetype -lpng -lz -ljpeg -lm  -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5
  2. /usr/bin/ld: -L: directory name missing
  3. collect2: ld returned 1 exit status
  4.  
Notice the '-L ' in the string above.

The easy solution is to remove that errant '-L', since it doesn't do anything (except crash the configure script, that is). But where is it?

Looking on line 42434 of the configure script doesn't look too helpful....
Expand|Select|Wrap|Line Numbers
  1. if { (eval echo configure:42434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2. then
  3.  
Looks like the problem is in $ac_link, which is defined on line 2152:
Expand|Select|Wrap|Line Numbers
  1. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2.  
Since the '-L ' showed up after 'conftest.c' in the ld arguments, we know the problem must be in $LIBS.

But where is $LIBS defined?

Moving backwards from line 42434, we encounter this definition on line 42415:
Expand|Select|Wrap|Line Numbers
  1.   LIBS=" -L$GD_LIB $GD_SHARED_LIBADD  $LIBS"
  2.  
If you were to echo $GD_LIB, you'd get an empty string. Bingo!

Simply remove that part of the string:
Expand|Select|Wrap|Line Numbers
  1.   LIBS=" $GD_SHARED_LIBADD  $LIBS"
  2.  
Then delete config.cache and reconfigure, and you're golden!
Jun 28 '07 #1
5 13885
Motoma
3,237 Expert 2GB
I think it's appalling that $GD_LIB, $GD_SHARED_LIBADD, and $LIBS are all empty, another alternative to the one you proposed would be to hunt down the appropriate locations and set them properly when you call your configure or make command.
Jul 10 '07 #2
mdarby
1
Dude, I owe you a beer or three.
Jul 16 '07 #3
pbmods
5,821 Expert 4TB
I think it's appalling that $GD_LIB, $GD_SHARED_LIBADD, and $LIBS are all empty, another alternative to the one you proposed would be to hunt down the appropriate locations and set them properly when you call your configure or make command.
Since PHP uses a bundled version of GD, there really aren't any additional library locations to search.
Jul 17 '07 #4
sojweb
1
You're a lifesaver; the fix works like a charm.
Aug 13 '07 #5
coolgames
169 100+
wow !

i;ve been wondering....
thankyou.
Oct 2 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings...
10
by: Ed Stevens | last post by:
A tale of woe, and a question . . . Last week my boss said to me "we've installed DB2 Connect on this Solaris box. Make it work." Now, I've barely seen DB2 Connect on Windows, having fumbled...
1
by: Ron Weldy | last post by:
So far, every book I have looks at on ASP.NET jumps right into creating a project. There is no discussion about setting up the environment, using a local IIS install (I think it can all be ran on...
0
by: Jack Wu | last post by:
Hi I've spent a good majority of my day trying to figure out how to have PIL 1.1.5 working on my OSX 10.3.9_PPC machine. I'm still stuck and I have not gotten anywhere. Could somebody please...
1
by: Scubadude | last post by:
I am looking for some assistance in 'fine-tuning' my preferences as I set-up my system to learn PHP. I am running Komodo professional, version 3.5.3, build 262321, platform win32-x86. Under...
1
by: RoyScripts | last post by:
Hi All.. I really need help configuring PHP with GD support. I am running Fedora 6, Apache and PHP 5.1.6, i have downloaded the gd-2.0.35 file and unpacked it under the directory...
1
by: rada.lambretha | last post by:
Configuring Linux as a Firewall * Making installation choices * Introducing iptables * Using iptables commands * Simplifying things with firewall GUIs * Adding proxy functionality As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.