[Boost-bugs] [Boost C++ Libraries] #7101: b2 defines multiple isysroot on Mac OSX 10.6 when targeting SDK versions earlier than 10.6

Subject: [Boost-bugs] [Boost C++ Libraries] #7101: b2 defines multiple isysroot on Mac OSX 10.6 when targeting SDK versions earlier than 10.6
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-08 08:57:53


#7101: b2 defines multiple isysroot on Mac OSX 10.6 when targeting SDK versions
earlier than 10.6
---------------------------------+------------------------------------------
 Reporter: mikko.vainio@… | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: build
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 Building Boost 1.50.0 on Mac OSX 10.6 included multiple SDK versions when
 targeting SDK versions 10.5 adn/or 10.4;

 ./b2 toolset=darwin link=static threading=multi stage --with-
 program_options architecture=combined macosx-version=10.5 macosx-version-
 min=10.5 -d3

 produces

     "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"

 and targeting 10.4 SDK

 ./b2 toolset=darwin link=static threading=multi stage --with-
 program_options architecture=combined macosx-version=10.4 macosx-version-
 min=10.4 -d3

 produces

     "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"

 that is, {{{isysroot}}} 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.

 A quick workaround is to hide the later SDK from b2:
 {{{
 sudo mv /Developer/SDKs/MacOSX10.6.sdk /Developer/SDKs/bak.MacOSX10.6.sdk
 }}}
 then run b2 as usual, and finally revert the renaming of the SDK
 {{{
 sudo mv /Developer/SDKs/bak.MacOSX10.6.sdk /Developer/SDKs/MacOSX10.6.sdk
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7101>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC