MacPorts Base doesn't build on 10.5 with GCC < 4.2 (Was: Re: MacPorts Test Framework - GSoC 13)
Ryan Schmidt
ryandesign at macports.org
Sun Sep 22 13:42:08 PDT 2013
On Sep 22, 2013, at 14:22, Clemens Lang wrote:
> 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.
On Leopard's Xcode, llvm-gcc-4.2 is in /Developer/usr/bin, not /usr/bin. However, gcc-4.2 is also available; perhaps that should be used. Since MacPorts chooses to build ports with gcc-4.2 by default on Leopard now, perhaps MacPorts base should compile itself with that compiler also, when available, in preference to gcc-4.0.
However, we already established that the gcc-4.2 requirement could be removed again, with some recoding:
https://lists.macosforge.org/pipermail/macports-dev/2013-September/024240.html
More information about the macports-dev
mailing list