Changes between Version 69 and Version 70 of ProblemHotlist


Ignore:
Timestamp:
Nov 2, 2011, 2:31:23 PM (13 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Add section about llvm/clang build failures and workarounds

Legend:

Unmodified
Added
Removed
Modified
  • ProblemHotlist

    v69 v70  
    44
    55If you had MacPorts installed before upgrading to Snow Leopard, see [wiki:Migration].
     6
     7== A port fails to build when using Xcode 4 == #compiler
     8
     9gcc has been the compiler collection MacPorts has used by default up until Xcode 4, in which Apple has switched to the llvm/clang compiler collection. These are new compilers and many programs have not yet been tested with them, and some ports will fail as a result. Using a different compiler may work better for a particular port. If the below workarounds enable you to install a port that failed with its default compiler, file a ticket and let us know so we can fix it. Portfile authors, see wiki:PortfileRecipes#compiler.
     10
     11=== Xcode 4.2 and later === #xcode42
     12
     13If a port ''foo'' fails to build and you're using Xcode 4.2 or later, the default compiler is clang; try compiling with llvm-gcc-4.2 instead:
     14
     15{{{
     16sudo port clean foo
     17sudo port install foo configure.compiler=llvm-gcc-4.2
     18}}}
     19
     20If that fails, try installing the apple-gcc42 port and compiling with that:
     21
     22{{{
     23sudo port clean foo
     24sudo port install apple-gcc42
     25sudo port install foo configure.compiler=apple-gcc-4.2 configure.cxx=/opt/local/bin/gcc-apple-4.2
     26}}}
     27
     28=== Xcode 4.0 and 4.1 === #xcode40
     29
     30If a port ''foo'' fails to build and you're using Xcode 4.0 or 4.1, the default compiler is llvm-gcc-4.2; try compiling with clang instead:
     31
     32{{{
     33sudo port clean foo
     34sudo port install foo configure.compiler=clang
     35}}}
     36
     37If that fails, try using gcc-4.2:
     38
     39{{{
     40sudo port clean foo
     41sudo port install foo configure.compiler=gcc-4.2
     42}}}
    643
    744== man port fails with error message == #manpath