473,761 Members | 8,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Configuring PHP 5.2.3 with GD support for Mac OS X

pbmods
5,821 Recognized Expert Expert
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 13914
Motoma
3,237 Recognized Expert Specialist
I think it's appalling that $GD_LIB, $GD_SHARED_LIBA DD, 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 New Member
Dude, I owe you a beer or three.
Jul 16 '07 #3
pbmods
5,821 Recognized Expert Expert
I think it's appalling that $GD_LIB, $GD_SHARED_LIBA DD, 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 New Member
You're a lifesaver; the fix works like a charm.
Aug 13 '07 #5
coolgames
169 New Member
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
5318
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 should configured to work, how memory is shared or not, etc. I can not seem to find any good links to this information. Thanks, Mike
10
4377
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 thru one install and config, with a lot of handholding from IBM Support. I'm comfortable in unix but have never dealt with DB2 Connect there. (my main job is as an Oracle DBA, and most of my db's are on Solaris or AIX) I've found the install...
1
1744
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 XP now, right?) vs. having a development server, etc. I will want to eventually maintain several websites using ASP.NET and SQL Server and I have my own development box with W2003 server and IIS6 running. Anybody got some good reference material...
0
2224
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 help me... I've scoured all the documentation, google, and mailing lists to no avail. I believe the problem may lay in a jpeglib problem with OSX 10.3.9, or a python paths problem.
1
2228
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 Preferences/Language/PHP in debugger configuration, I am getting the following error message: WARNING! PHP is not configured for debugging. You can use the configuration wizard to configure PHP for debugging.
1
1847
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 /usr/lib/php/gd-2.0.35. I followed the instructions to install it which is as follows. Firstly ./configure --with-gd then make and lastly make install.. Everything installed with no errors. But now when i look at the phpinfo i still get the --without-gd. I really am...
1
2618
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 Linux gains increasing acceptance in corporate datacenters and
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9923
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.