Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"no acceptable C compiler found in $PATH"

After upgrading to OS 10.8, and to Xcode 4.4, when I try to compile a source code, the ./configure command in Terminal ends with:

"no acceptable C compiler found in $PATH".

I have to *assume* that Xcode includes C compilers, but I can't figure out why there's no "acceptable C compiler in $PATH. Maybe that's a bug or a new function of which I am not aware.


How do I get a C compiler (gcc?) in the $PATH?


Thanks in advance.

MacBook, OS X Mountain Lion, MacBook5,1 Aluminum Late 2008

Posted on Aug 1, 2012 6:51 AM

Reply
Question marked as Best reply

Posted on Aug 1, 2012 7:11 AM

I am replying to myself :-) because I couldn't edit my own post.


I copied gcc from /Developper to /usr/bin, where it wasn't present (I assume it was not installed by Xcode).


When I try (again) ./configure, I get in Terminal:

checking for gcc... gcc

checking whether the C compiler works... no

configure: error: in `/Users/admin/gnupg-2.0.19':

configure: error: C compiler cannot create executables

See `config.log' for more details


So gcc is found, but it cannot create executables.

Does all this mean that copying gcc to /usr/bin is not enough, and that I have to include gdd in $PATH?


All help will be greatly appreciated.

4 replies
Question marked as Best reply

Aug 1, 2012 7:11 AM in response to Charly Avital

I am replying to myself :-) because I couldn't edit my own post.


I copied gcc from /Developper to /usr/bin, where it wasn't present (I assume it was not installed by Xcode).


When I try (again) ./configure, I get in Terminal:

checking for gcc... gcc

checking whether the C compiler works... no

configure: error: in `/Users/admin/gnupg-2.0.19':

configure: error: C compiler cannot create executables

See `config.log' for more details


So gcc is found, but it cannot create executables.

Does all this mean that copying gcc to /usr/bin is not enough, and that I have to include gdd in $PATH?


All help will be greatly appreciated.

Aug 1, 2012 8:33 AM in response to etresoft

Thanks!

I couldn't uninstall that old copy of Xcode because as I explained sooner, I was running the latest available release 4.4,

I trashed the installed Xcode 4.4 with all its dependencies, emptied Trash.

Then in App Store I could re-download Xcode 4.4, install it, and install its command line tools.

Now ./configure is working as expected.

Thanks again, this solves my problem.

"no acceptable C compiler found in $PATH"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.