MacPorts Base doesn't build on 10.5 with GCC < 4.2 (Was: Re: MacPorts Test Framework - GSoC 13)

Clemens Lang cal at macports.org
Sun Sep 22 12:22:38 PDT 2013


On Sun, Sep 22, 2013 at 10:41:00AM -0700, Bradley Giesbrecht wrote:
> $ sw_vers -productVersion
> 10.5.8
> $ ./configure --prefix=/opt/local --enable-readline
> ...
> $ make
> ...
> ===> making all in src/darwintracelib1.0
> gcc -g -O2 -std=c99 -Wextra -Wall   -fPIC -Wno-deprecated-declarations -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include"  -c -o darwintrace.o darwintrace.c
> darwintrace.c:507:2: error: #error Please build with gcc-4.2 or later
> darwintrace.c: In function '__darwintrace_get_filemap':
> darwintrace.c:524: warning: implicit declaration of function '__sync_bool_compare_and_swap'
> make[2]: *** [darwintrace.o] Error 1
> ...

That's not related to the test code but is caused by other changes made
by me while working on the trace mode code. Please file a bug about
this, if there isn't one already, because I won't have time to look at
it before at least tomorrow afternoon, but probably rather Thursday the
week after next week.

> Using port select gcc did not help:
> $ port select gcc
> Available versions for gcc:
> 	gcc40
> 	gcc42 (active)
> 	llvm-gcc42
> 	none

Please make sure base' configure doesn't do magic things in order to
avoid $prefix/bin. I think at least when running selfupdate, the
configure script in base ignores binaries from $prefix/bin.

Try setting the compiler explicitly using
 ./configure ... CC=/usr/bin/llvm-gcc-4.2
and see if that helps.

-- 
Clemens Lang



More information about the macports-dev mailing list