Closed johnwason closed 7 years ago
Oh yeah. I forgot that’s a thing that happened every year when they release new OSes, and every year I don’t remember what I have to do to fix it. I should probably take notes one of these times. I’ll take a look & see what’s what.
On Oct 10, 2017, at 14:31, johnwason notifications@github.com wrote:
I am getting a strange error building 1.65.1 using Xcode 9.0
error: "iphone-11.0" is not a known value of feature error: legal values: "iphonesim-11.0"
I am getting a similar error trying to build macos. I am not sure if the problem is with boost itself or the build script.
I ran this command to do the build:
./boost.sh -ios --boost-version 1.65.1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hmm, I ran the same command and the script ran without a problem, so I'm not sure what is going on. Any other information you can provide? Which version of Xcode 9 are you using (release / beta)?
Also, I just noticed the title of the issue says "macosx-version build error". The command & errors you provided is for iOS, so I'm guessing this should be "iOS version build error"?
That is odd. I am using Xcode 9.0 (9A235). As far as I can tell it is the latest release, however I am not as knowledgeable on OSX. Do I need to force OSX to update the toolchains and platforms?
Here is the full error log:
error: "iphone-11.0" is not a known value of feature <macosx-version>
error: legal values: "iphonesim-11.0"
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/build/feature.jam:364: in expand-subfeatures-aux from module feature
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/build/feature.jam:425: in feature.expand-subfeatures from module feature
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/build/build-request.jam:20: in apply-to-property-set from module build-request
(builtin):-1: in sequence.transform from module sequence
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/build/build-request.jam:32: in build-request.expand-no-defaults from module build-request
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/build-system.jam:692: in load from module build-system
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/kernel/modules.jam:295: in import from module modules
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/Users/myusername/boost/Apple-Boost-BuildScript/src/boost_1_65_1/boost-build.jam:17: in module scope from module
I re-cloned your script and ran it again with the same result. The command was:
./boost.sh -ios --boost-version 1.65.1
Yeah, no problems at all here. Using iphone-11.0
and iphonesim-11
as well.
sigh... ok. Let's dig in more.
boost.sh
to a new, empty directory and run the script againApple-Boost-BuildScrip/build/boost/1.65.1/ios/ios-build.log
& create a new paste at pastebin.com & send that url as well.(I like pastebin for stuff like this so we don't wind up with a 20 mile long thread of log output)
Ok, I did a fresh build. Here is the terminal output:
And here is the error log:
Here is the output of clang++ -v
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Wow, ok. Well, the only thing I see different is in the output from clang++ -v
I have Target: x86_64-apple-darwin17.0.0
, where you have darwin16.7.0
. Which version of macOS are you running? (I really don't think that matters...)
Possibly silly question, but have you actually launched Xcode 9 after installing it? If not, do that because it has to extract a bunch of stuff (like the iPhone & macOS SDKs, amongst other things).
Have you installed the Xcode command line tools? I think with recent versions of Xcode those get installed when you run Xcode, but I'm not certain. You can install them as a stand-alone with xcode-select --install
.
Yes, I have used Xcode after the update and my other projects compile fine. Everything is up to date according to the update utility. I am running OSX 10.12.6 on a Late 2012 mac mini. I can build boost if I just run ./b2 in the extracted directory with no options provided.
I'm pretty sure if you just run b2 without any arguments it will build for the system architecture (macOS / darwin), not iPhone (but... that might be wrong).
There's obviously some discrepancy between our systems. Lets see if we can figure it out.
Do you have multiple versions of Xcode installed?
What is the output of xcode-select -p
?
What is the output of xcrun --sdk iphoneos --show-sdk-version
?
What is the contents of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
?
xcode-select -p
/Applications/Xcode.app/Contents/Developer
xcrun --sdk iphoneos --show-sdk-version
11.0
ls Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
iPhoneOS.sdk iPhoneOS11.0.sdk
This appears to be the "stock" configuration for Xcode. I am not a power-user for Xcode as I am typically just cross compiling software for Apple products that were developed on Windows and Linux. There is no real customization to my system beyond installing CMake and Meld.
Ok, try this. You'll have to modify the script. In the function buildBoost_iOS
, after the very first ./b2
command (after the "Install this one" comment), add -d 11
, so the command now looks like:
echo Building Boost for iPhone
# Install this one so we can copy the headers for the frameworks...
./b2 -d 11 $DEBUG_CMD $THREADS --build-dir=iphone-build --stagedir=iphone-build/stage \
--prefix="$IOS_OUTPUT_DIR/prefix" toolset=darwin cxxflags="${CXX_FLAGS}" architecture=arm target-os=iphone \
macosx-version=iphone-${IOS_SDK_VERSION} define=_LITTLE_ENDIAN \
link=static stage >> "${IOS_OUTPUT_DIR}/ios-build.log" 2>&1
if [ $? != 0 ]; then echo "Error staging iPhone. Check log."; exit 1; fi
Open the resulting ios-build.log file (build/boost/1.65.1/ios/ios-build.log) in the Console app (it's the default for *.log files, so it should open automatically), search for "is not a known value of". This will filter the (enormous) log down to just a few lines. You should see something similar to this:
(builtin):>>>>|>>>>|>>>>|>>>>| errors.error "iphone-10.0" is not a known value of feature <macosx-version> : legal values: "iphone-11.0" "iphonesim-11.0"
(builtin):>>>>|>>>>|>>>>|>>>>|>> errors.error-skip-frames 3 "iphone-10.0" is not a known value of feature <macosx-version> : legal values: "iphone-11.0" "iphonesim-11.0" : : : : : : : : : : : : : : : : :
(builtin):>>>>|>>>>|>>>>|>>>>|>>>> errors.backtrace 3 error: "iphone-10.0" is not a known value of feature <macosx-version> : legal values: "iphone-11.0" "iphonesim-11.0" : : : : : : : : : : : : : : : : :
get messages = "iphone-10.0" is not a known value of feature <macosx-version>
get messages = "iphone-10.0" is not a known value of feature <macosx-version>
(builtin):>>>>|>>>>|>>>>|>>>>|>>>>|> ECHO error: "iphone-10.0" is not a known value of feature <macosx-version>
error: "iphone-10.0" is not a known value of feature <macosx-version>
What is shown where it says legal values: "iphone-XX.X" "iphonesim-XX.X" ... etc
? You should be able to re-run the script using the version number indicated there.
e.g. if, for legal values, it says "iphone-10.3", try this:
./boost.sh -ios --boost-version 1.65.1 --ios-sdk 10.3
This is the output:
(builtin):>>>>|>>>>|>>>>|>>>>| errors.error "iphone-11.0" is not a known value of feature <macosx-version> : legal values: "iphonesim-11.0"
(builtin):>>>>|>>>>|>>>>|>>>>|>> errors.error-skip-frames 3 "iphone-11.0" is not a known value of feature <macosx-version> : legal values: "iphonesim-11.0" : : : : : : : : : : : : : : : : :
(builtin):>>>>|>>>>|>>>>|>>>>|>>>> errors.backtrace 3 error: "iphone-11.0" is not a known value of feature <macosx-version> : legal values: "iphonesim-11.0" : : : : : : : : : : : : : : : : :
get messages = "iphone-11.0" is not a known value of feature <macosx-version>
get messages = "iphone-11.0" is not a known value of feature <macosx-version>
(builtin):>>>>|>>>>|>>>>|>>>>|>>>>|> ECHO error: "iphone-11.0" is not a known value of feature <macosx-version>
error: "iphone-11.0" is not a known value of feature <macosx-version>
There doesn't appear to be a listed version of iphone listed, it is just showing iphonesim. I am stumped as to why.
Oh, nevermind, it looks like I had an old version of user-config.jam that it was picking up. I guess the update must have made the download script and the old user-config.jam incompatible. Thanks for the help, and sorry for the user error.
phew Glad you got it figured out.
In some of my other build tools I have used the environmental variable BOOST_BUILD_USER_CONFIG
to specify an alternative user-config.jam file so it ignores any existing ones that may exist in the user home directory. The current issue was my mistake, however it may be useful to implement this in the script so other people don't fall into the same trap.
Could you elborate? Is BOOST_BUILD_USER_CONFIG
an environment variable that Boost.Build looks for, or is it just something that you define & use?
It is used by Boost.Build. It specifies a file name to use for user-config.jam and overrides the default search path.
I am getting a strange error building boost 1.65.1 using Xcode 9.0
error: "iphone-11.0" is not a known value of feature
error: legal values: "iphonesim-11.0"
I am getting a similar error trying to build macos. I am not sure if the problem is with boost itself or the build script.
I ran this command to do the build:
./boost.sh -ios --boost-version 1.65.1