Boost C++ Libraries: Ticket #7101: b2 defines multiple isysroot on Mac OSX 10.6 when targeting SDK versions earlier than 10.6 https://svn.boost.org/trac10/ticket/7101 <p> Building Boost 1.50.0 on Mac OSX 10.6 included multiple SDK versions when targeting SDK versions 10.5 adn/or 10.4; </p> <p> ./b2 toolset=darwin link=static threading=multi stage --with-program_options architecture=combined macosx-version=10.5 macosx-version-min=10.5 -d3 </p> <p> produces </p> <blockquote> <p> "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -arch i386 -arch ppc -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/program_options/build/darwin-4.2.1/release/architecture-combined/link-static/macosx-version-min-10.5/macosx-version-10.5/threading-multi/cmdline.o" "libs/program_options/src/cmdline.cpp" </p> </blockquote> <p> and targeting 10.4 SDK </p> <p> ./b2 toolset=darwin link=static threading=multi stage --with-program_options architecture=combined macosx-version=10.4 macosx-version-min=10.4 -d3 </p> <p> produces </p> <blockquote> <p> "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.4 -arch i386 -arch ppc -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/program_options/build/darwin-4.2.1/release/architecture-combined/link-static/macosx-version-min-10.4/macosx-version-10.4/threading-multi/cmdline.o" "libs/program_options/src/cmdline.cpp" </p> </blockquote> <p> that is, <code>isysroot</code> is defined multiple times. That apparently causes the latest SDK to be used, which leads to linker errors when a project built against an earlier SDK tries to link Boost. </p> <p> A quick workaround is to hide the later SDK from b2: </p> <pre class="wiki">sudo mv /Developer/SDKs/MacOSX10.6.sdk /Developer/SDKs/bak.MacOSX10.6.sdk </pre><p> then run b2 as usual, and finally revert the renaming of the SDK </p> <pre class="wiki">sudo mv /Developer/SDKs/bak.MacOSX10.6.sdk /Developer/SDKs/MacOSX10.6.sdk </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7101 Trac 1.4.3 Aaron Simmons <paleozogt@…> Tue, 26 Mar 2013 16:23:18 GMT cc set https://svn.boost.org/trac10/ticket/7101#comment:1 https://svn.boost.org/trac10/ticket/7101#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">paleozogt@…</span> added </li> </ul> <p> This is happening for me as well with boost v1.52.0 </p> Ticket