Error running MacPorts

Ryan Schmidt ryandesign at macports.org
Thu Aug 30 16:24:25 PDT 2007


On Aug 30, 2007, at 18:06, Richard Connamacher wrote:

> On Aug 30, 2007, at 3:23 PM, Ryan Schmidt wrote:
>
>> On Aug 30, 2007, at 16:46, Richard Connamacher wrote:
>>
>>> I'm having a problem with MacPorts (though for all I know it may  
>>> be gcc rather than MacPorts itself). After restoring my system  
>>> from a crash, port now can't compile anything.
>>>
>>> I've reinstalled MacPorts 1.5, and I've reinstalled XCode 2.4.1  
>>> (BSD Tools). Still no dice.
>>>
>>> The error I'm getting is like this:
>>>
>>> --------------------
>>>
>>> MacG5:~ root# /opt/local/bin/port install jpeg
>>> ---> Configuring jpeg
>>> Error: Target org.macports.configure returned: configure failure:  
>>> shell command " cd "/opt/local/var/macports/build/ 
>>> _opt_local_var_macports_sources_rsync.macports.org_release_ports_gra 
>>> phics_jpeg/work/jpeg-6b" && ./configure --prefix=/opt/local -- 
>>> enable-shared --enable-static " returned error 1
>>> Command output: checking for gcc... gcc
>>> checking whether the C compiler (gcc -O2 -L/opt/local/lib)  
>>> works... no
>>> configure: error: installation or configuration problem: C  
>>> compiler cannot create executables.
>>>
>>> Error: Status 1 encountered during processing.
>>
>> Usually, "C compiler cannot create executables" means you haven't  
>> installed the C compiler, as in, you haven't installed gcc.
>>
>> What do you mean you reinstalled "XCode 2.4.1 (BSD Tools)"? You  
>> should have installed the BSD Subsystem from the Mac OS X DVD  
>> (it's installed by default when you install Mac OS X), and you  
>> should have installed Xcode 2.4.1 which can be downloaded from  
>> http://developer.apple.com/tools/xcode/
>>
>> What do you get if you type "which gcc"? It should say "/usr/bin/gcc"
>>
>> What do you get if you type "gcc --version"? It should mention  
>> "4.0.1 (Apple Computer, Inc. build 5367)"
>
> Yep, I have GCC 4.0.1 installed. It's at /usr/bin/gcc and --version  
> gives:
>
> powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.  
> build 5367)
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There  
> is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
> PURPOSE.
>
> I did reinstall XCode 1.4.1 (the BSD SDK only) already. It did fix  
> one error I was having (it wasn't finding gcc at all before), but  
> that was before I sent the previous email and started getting the  
> "C compiler can't create executables" message. This current  
> problem's got me stumped.
>
>>> To get the exact GCC error:
>>>
>>> MacG5:~ root# gcc -O2 -L/opt/local/lib
>>> powerpc-apple-darwin8-gcc-4.0.1: no input files
>>
>> Well that again makes it look like you have installed gcc 4.0.1  
>> somehow. So I don't know why it's not working for you.
>>
>> Have you selfupdated MacPorts to 1.5.2? Have you tried installing  
>> other ports? Do they fail with the same error?
>
> port selfupdate gives me the same exact error: C compiler can't  
> create executables.
>
>
> I can only think that something got royally screwed up when I  
> restored my Mac from a backup, since it used to work before. Maybe  
> some critical libraries used by GCC were corrupted in the process?  
> I was planning to hold off until Leopard before I do a full clean  
> reinstall of the OS, since it's going to take a long time to get  
> everything back in...

Possible that some permissions weren't properly preserved during your  
backup/restore. Or some other problem occurred. I recommend you  
uninstall Xcode (using the uninstall script found on the Xcode disk  
image). Then install all of Xcode again.




More information about the macports-users mailing list