Changed page "ProblemHotlist" by ryandesign@macports.org from 70.253.78.18* Page URL: <https://trac.macports.org/wiki/ProblemHotlist> Diff URL: <https://trac.macports.org/wiki/ProblemHotlist?action=diff&version=70> Revision 70 Comment: Add section about llvm/clang build failures and workarounds -------8<------8<------8<------8<------8<------8<------8<------8<-------- Index: ProblemHotlist ========================================================================= --- ProblemHotlist (version: 69) +++ ProblemHotlist (version: 70) @@ -3,6 +3,43 @@ == A port build fails on Snow Leopard with: "file is not of required architecture" == #wrongarch If you had MacPorts installed before upgrading to Snow Leopard, see [wiki:Migration]. + +== A port fails to build when using Xcode 4 == #compiler + +gcc 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. + +=== Xcode 4.2 and later === #xcode42 + +If 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: + +{{{ +sudo port clean foo +sudo port install foo configure.compiler=llvm-gcc-4.2 +}}} + +If that fails, try installing the apple-gcc42 port and compiling with that: + +{{{ +sudo port clean foo +sudo port install apple-gcc42 +sudo port install foo configure.compiler=apple-gcc-4.2 configure.cxx=/opt/local/bin/gcc-apple-4.2 +}}} + +=== Xcode 4.0 and 4.1 === #xcode40 + +If 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: + +{{{ +sudo port clean foo +sudo port install foo configure.compiler=clang +}}} + +If that fails, try using gcc-4.2: + +{{{ +sudo port clean foo +sudo port install foo configure.compiler=gcc-4.2 +}}} == man port fails with error message == #manpath -------8<------8<------8<------8<------8<------8<------8<------8<-------- * The IP shown here might not mean anything if the user or the server is behind a proxy. -- MacPorts <http://www.macports.org/> Ports system for Mac OS This is an automated message. Someone at http://www.macports.org/ added your email address to be notified of changes on ProblemHotlist. If it was not you, please report to .