missing $CC and $LD settings in some packages

Ryan Schmidt ryandesign at macports.org
Thu May 22 20:24:07 PDT 2008


On May 22, 2008, at 20:59, Cameron Simpson wrote:

> Recent instance: I just rebuilt mercurial using "port upgrade". The  
> first
> attempt failed with a failure I see quite frequently: a command  
> line which
> commences with "-DNDEBUG ...". This is symptomatic of missing the  
> "cc/gcc"
> or "ld" commands, in turn symptomatic of a Makefile using $(CC)/$ 
> (LD) and
> expecting to inherit them from the shell environment. Dodgy but  
> common.
>
> My usual workaround is to export CC=gcc and LD=ld and rerun port.  
> And in
> turn, I had to add:
>   extra_env         CC LD
> to my macports.conf.
>
> Is this just an old busted config on my part, or is there a real
> configuration deficiency here?

This is a bug which affects Leopard users in some circumstances. A  
workaround is already in MacPorts base in trunk. You can either build  
MacPorts trunk from source, or when you encounter the error, simply  
issue the "port upgrade" (or "port install") command again and it  
should work the second time.




More information about the macports-users mailing list