Opened 9 years ago
Last modified 9 years ago
#8719 new Bugs
Not possible to target older iOS major version when using SDK from later version
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | Building Boost |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
Current example: I want to build using iOS SDK version 6.1, but with the minimum target OS version set to 5.1.
In order to achieve this I set macosx-version-min=5.1, macosx-version=6.1.
The code in darwin.jam, however, does not see 5.1 as a valid minimum version when the SDK version is 6.1. The code below appears to permit only 6.0 and 6.1.
if $(version[3]) > 0 { # We have a minor version of an SDK. We want to set up # previous minor versions, plus the current minor version. # So we recurse to set up the previous minor versions, up to # the current version. local minor-minus-1 = [ CALC $(version[3]) - 1 ] ; return [ init-sdk $(condition) : $(root) : $(version[1-2]) $(minor-minus-1) : [ version-to-feature $(version[1-2]) $(minor-minus-1) ] ] $(version-feature) ; }
The resulting error when attempting to target 5.1 while using the 6.1 SDK is:
/Users/williamg/Projects/Experimenta/universe/boost/boost_1_53_0/tools/build/v2/build/feature.jam:485: in validate-value-string from module feature error: "iphone-5.1" is not a known value of feature <macosx-version-min> error: legal values: "iphone-6.1" "iphone-6.0" "iphonesim-6.1" "iphonesim-6.0" "10.7" "10.6" "10.5" "10.4" "10.3" "10.2" "10.1" "10.0" "10.8"
This needs to change so that it's possible to target versions of the OS older than the same major release.
Discovered in Boost 1.53, but still present on trunk at time of writing.
I have currently fudged my way around this by adding the following code above the minor-version recursion that I quoted in the original report: