[boost-context] Build error
SRHMorris opened this issue · 11 comments
Host Environment
- OS: macOS Big Sur (M1)
- Compiler: Apple clang version 13.0.0 (clang-1300.0.29.3)
To Reproduce
Steps to reproduce the behavior:
The specific command I ran was the following, though replacing openimageio with boost-context results in the same.
./vcpkg install openimageio[gif,webp] --triplet x64-osx --host-triplet x64-osx
Note this is on an M1 arm machine, but I am trying to compile for only amd64.
Failure logs
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:158 (message):
Command failed: /Users/samuelmorris/Development/vcpkg/downloads/tools/cmake-3.21.1-osx/cmake-3.21.1-macos-universal/CMake.app/Contents/bin/cmake --build . --config Debug --target install -- -v -j9
Working Directory: /Users/samuelmorris/Development/vcpkg/buildtrees/boost-context/x64-osx-dbg
See logs for more information:
/Users/samuelmorris/Development/vcpkg/buildtrees/boost-context/install-x64-osx-dbg-out.log
Call Stack (most recent call first):
installed/x64-osx/share/vcpkg-cmake/vcpkg_cmake_build.cmake:111 (vcpkg_execute_build_process)
installed/x64-osx/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
installed/x64-osx/share/boost-build/boost-modular-build.cmake:124 (vcpkg_cmake_install)
ports/boost-context/portfile.cmake:24 (boost_modular_build)
scripts/ports.cmake:145 (include)
Error: Building package boost-context:x64-osx failed with: BUILD_FAILED
package: boost-context[core]:x64-osx -> 1.78.0
vcpkg-tool version: 2022-02-03-457b0309cefb58fae0dcb2e4c06de9bd7582967f
vcpkg-scripts version: afb2279 2022-02-07 (10 hours ago)
install-x64-osx-dbg-out.log
Probably only happens on arm macs.
Probably, I've updated the description to clarify that I am on an arm mac but compiling for amd64.
The problem is probably that -arch x86_64
is not passed to the compiler.
It looks like it is to me. In the log file it gives the command as
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++" -x c++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -fPIC -g -std=c++11 -stdlib=libc++ -m64 -O0 -fno-inline -Wall -g -D_DARWIN_C_SOURCE -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -I"../include" -I"/Users/samuelmorris/Development/vcpkg/installed/x64-osx/include" -c -o "/Users/samuelmorris/Development/vcpkg/buildtrees/boost-context/x64-osx-dbg/boost/build/871eed1ad314e3fe7b41c3cf2fde70f0/posix/stack_traits.o" "../src/posix/stack_traits.cpp"
And for the assembler files the -arch
is missing:
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++" -x assembler-with-cpp -m64 -O0 -fno-inline -Wall -g -D_DARWIN_C_SOURCE -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -I"../include" -I"/Users/samuelmorris/Development/vcpkg/installed/x64-osx/include" -c -o "/Users/samuelmorris/Development/vcpkg/buildtrees/boost-context/x64-osx-dbg/boost/build/871eed1ad314e3fe7b41c3cf2fde70f0/asm/ontop_x86_64_sysv_macho_gas.o" "../src/asm/ontop_x86_64_sysv_macho_gas.S"
../src/asm/ontop_x86_64_sysv_macho_gas.S:32:10: error: unknown token in expression
movq %rdx, %r8
It seems upstream bug was fixed: bfgroup/b2#136
yes, I will update boost-build
once the new version is released.
yes, I will update
boost-build
once the new version is released
Any updates on this?
boost
has been updated to v1.08, could you please get the latest vcpkg and try again.
Yes. When setting the baseline commit to the latest master and removing versions from boost pkgs, it seems to build on macOS arm64. The version I see being compiled is v1.80 --you might have meant that instead of v1.08.
Now the latest version of boost
is 1.81, please update vcpkg and rebuild new version of boost-context
.