Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 26, 2007, 10:46 PM   #1
msharp
macrumors regular
 
Join Date: Jul 2004
Can't compile under Leopard (no C++ compiler?)?

Hy folks, I was trying to compile a php under terminal, leopard.

However, it ended up like this:

checking whether the C++ compiler (c++ ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

I've installed developer tools (xcode) that came with leopard disc.

I could do this when I was under Tiger...

Any clues? Thanks!
msharp is offline   0 Reply With Quote
Old Oct 26, 2007, 11:01 PM   #2
cmaier
macrumors G3
 
Join Date: Jul 2007
Location: California
Quote:
Originally Posted by msharp View Post
Hy folks, I was trying to compile a php under terminal, leopard.

However, it ended up like this:

checking whether the C++ compiler (c++ ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

I've installed developer tools (xcode) that came with leopard disc.

I could do this when I was under Tiger...

Any clues? Thanks!
this was running ./configure?
__________________
applenews.zone
Discussion of microprocessors and other technology, and reviews of tech products.
cmaier is offline   0 Reply With Quote
Old Oct 26, 2007, 11:10 PM   #3
msharp
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Quote:
Originally Posted by cmaier View Post
this was running ./configure?
Yes, I was running ./configure

Both of my powerbook and my macbook pro won't compile. Same error.

It seems that the c++ compiler in 10.5 has been changed?
msharp is offline   0 Reply With Quote
Old Oct 26, 2007, 11:57 PM   #4
cmaier
macrumors G3
 
Join Date: Jul 2007
Location: California
Quote:
Originally Posted by msharp View Post
Yes, I was running ./configure

Both of my powerbook and my macbook pro won't compile. Same error.

It seems that the c++ compiler in 10.5 has been changed?
it changed, but it should still work. probably just a minor change in the configure script is needed.

What's the code look like in the configure where it is generating that message?
__________________
applenews.zone
Discussion of microprocessors and other technology, and reviews of tech products.
cmaier is offline   0 Reply With Quote
Old Oct 28, 2007, 06:40 PM   #5
JasonHears
macrumors newbie
 
Join Date: Oct 2007
try exporting cflags

I just had this problem (which is how I came to this page, thanks Google). After playing a bit, I found something that worked for me. I did:

export CFLAGS="-arch i386"

Then I ran configure again (for me it was PHP5), and it worked. Hope that helps someone else out there!
JasonHears is offline   0 Reply With Quote
Old Oct 31, 2007, 02:39 PM   #6
msharp
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Quote:
Originally Posted by JasonHears View Post
I just had this problem (which is how I came to this page, thanks Google). After playing a bit, I found something that worked for me. I did:

export CFLAGS="-arch i386"

Then I ran configure again (for me it was PHP5), and it worked. Hope that helps someone else out there!
Thanks Jason!! I'll try whenever I got home!
msharp is offline   0 Reply With Quote
Old Nov 9, 2007, 12:06 PM   #7
msharp
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Thanks Jason:

Thanks for the tip and now I can configure without a problem! Hooray!

But now I can't make. (I'm building PHP 5.2.4 on Leopard, MBP SR 2.2).

It will report undefined symbols: _iconv_close and _iconv_open.

I guess it could possibly because I was using the fink lib which was compiled under tiger, intel mac.

But as fink doesn't support Leopard, how am I supposed to compile the GD library as well as the zlib, libgpng and libjpeg?

Thanks!
msharp is offline   0 Reply With Quote
Old Nov 9, 2007, 12:22 PM   #8
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
a) This should be in the programming forum (I've asked the mods to move it)

b) What did you install when you installed Xcode? Have you tried reinstalling it?
__________________
Actually it does make sense. Man created god, so if we exist, He exists. - obeygiant
Eraserhead is offline   0 Reply With Quote
Old Nov 9, 2007, 01:48 PM   #9
msharp
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Quote:
Originally Posted by Eraserhead View Post
a) This should be in the programming forum (I've asked the mods to move it)

b) What did you install when you installed Xcode? Have you tried reinstalling it?
Thanks for moving it!

I surely did install both of the SDKs (10.4u and 10.5), and I did install the gcc's of course. So it shouldn't be missing some components from Xcode I guess.

And an update to my compile progress:
with the help of Jason: export CFLAGS="-arch i386" I've already been able to ./configure without a problem.
I've managed to install fink on 10.5, install the gd libs as well as the png and jpeg libs.

Now the problem is that I can't make (for PHP5). It will always fail with "undefined symbols" and there seems to be something wrong with iconv. The detailed error message can be found in the attached image.

This only happens when I compile with gd. That means if I skip the gd library when ./configure, it will make perfectly.

Any ideas?

Thanks!!
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	54
Size:	15.8 KB
ID:	90808  
msharp is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Seeking an images-to-video compiler Morgan Stack Mac Applications and Mac App Store 4 Dec 31, 2013 11:18 PM
Where is my gcc and g++ compiler sysProgrammer Mac Programming 10 Nov 24, 2013 06:47 PM
LLVM-GCC Compiler issues rchaud10 iPhone/iPad Programming 1 Jun 12, 2013 12:12 PM
Assembly Compiler/IDE SuperMiguel Mac Programming 7 Jun 23, 2012 05:36 PM
Broken C compiler dancks Mac Programming 2 Jun 15, 2012 03:04 PM

Forum Jump

All times are GMT -5. The time now is 06:51 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC