PDA

View Full Version : Can't compile under Leopard (no C++ compiler?)?




msharp
Oct 26, 2007, 10:46 PM
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!



cmaier
Oct 26, 2007, 11:01 PM
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?

msharp
Oct 26, 2007, 11:10 PM
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?

cmaier
Oct 26, 2007, 11:57 PM
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?

JasonHears
Oct 28, 2007, 06:40 PM
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! :)

msharp
Oct 31, 2007, 02:39 PM
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
Nov 9, 2007, 12:06 PM
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!

Eraserhead
Nov 9, 2007, 12:22 PM
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?

msharp
Nov 9, 2007, 01:48 PM
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!!