Which GCC does macports use?

Ctalk Project ctalk at ctalklang.org
Sun Apr 4 06:41:58 PDT 2010


Greetings -

I installed macports (OS X 10.4) and then installed and built the  
gcc44 package without
any issues.  Per the macports installation, I guess, /opt/local/bin  
is now in the path, so the
macports GCC is the compiler in general use, and for non-macports  
sources it works okay.

When trying to build further macports packages, however, I get errors  
like the following:

checking for gcc... /usr/bin/gcc-4.0
checking for C compiler default output... configure: error: C  
compiler cannot create executables
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_devel_n 
cursesw/work/ncurses-5.7" && ./configure --prefix=/opt/local --enable- 
widec --disable-rpath --with-shared --without-debug --without-ada -- 
enable-safe-sprintf --enable-sigwinch --mandir=/opt/local/share/man -- 
with-manpage-format=normal " returned error 77
DEBUG: Backtrace: configure failure: shell command " cd "/opt/local/ 
var/macports/build/ 
_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_n 
cursesw/work/ncurses-5.7" && ./configure --prefix=/opt/local --enable- 
widec --disable-rpath --with-shared --without-debug --without-ada -- 
enable-safe-sprintf --enable-sigwinch --mandir=/opt/local/share/man -- 
with-manpage-format=normal " returned error 77
     while executing
"$procedure $targetname"

In short, the macports installer still wants to use the Xcode GCC in / 
usr/bin.  If it matters, here is
the value of $PATH after installing macports:

ctalk-projects-powerbook-g4:/ root# echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/opt/local/bin:/opt/ 
local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/gcc-current/bin:/ 
usr/local/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin
ctalk-projects-powerbook-g4:/ root#

So how do I tell macports to use the newly installed compiler?

Tnx,

Robert

-- 
Ctalk Home Page: http://www.ctalklang.org



More information about the macports-users mailing list