MacPorts on Lion (common issues, fixes, and workarounds)

Jack Howarth howarth at bromo.med.uc.edu
Wed Jul 20 11:10:45 PDT 2011


On Wed, Jul 20, 2011 at 09:26:46AM -0700, Jeremy Huddleston wrote:
> 
> 4) compiler codegen issues
> 
> As discussed on this list over the past month or so, we've run into some codegen issues when using llvm-gcc-4.2.  This will appear as a segfault, timeout, bad visual artifacts, or just plain weird behavior.  If something new like this coprs up, try rebuilding the relevant ports with a different compiler (preferably gcc-4.2 since that was what created the "known good" version).  If you find that works, bisect the relevant ports to find which port was built wrong.  Once you know the actual port that has codegen issues, try using clang instead of llvm-gcc-4.2.  If that doesn't work, please file a bug with Apple and llvm (and reference the bug number in the Portfile), then fall back on gcc-4.2 until it is addressed.
> 

Jeremy,
   We avoided those issues on fink by defaulting 10.7 to use a path-prefix-clang which maps cc/gcc to clang
and cxx/g++ to clang++. So far we have seen very few instances of bad codegen (and we are adding InfoTest
whenever possible to validate the clang builds of packages against their testsuites). The only challenge has
been to correct existing code for the stricter language compliance of clang/clang++. Also, the fact that
clang/clang++ doesn't handle the *PATH environmentals has caused us to rework some builds that utilized that
feature. Overall the switch to the clang compilers is considered a net win (especially with the faster 
compile times and lower memory footprint).
                Jack


More information about the macports-dev mailing list