microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.33k stars 6.45k forks source link

[boost-context] Build error aarch64 #41580

Open winterz opened 1 month ago

winterz commented 1 month ago

boost-context looks like its trying to build for x86_64 on an aarch64 Linux Ubuntu system. uname -m is aarch64

I tried setting the environment variable VCPKG_FORCE_SYSTEM_BINARIES=1

Here's the assembler failure:

FAILED: libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o
/usr/bin/g++-13 -DBOOST_CONTEXT_DYN_LINK="" -DBOOST_CONTEXT_EXPORT=EXPORT -DBOOST_CONTEXT_NO_LIB="" -DBOOST_CONTEXT_SOURCE="" -Dboost_context_EXPORTS -I/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/include -isystem /home/build/tmp/foo/bar/build-iui-master-manifest-gcc13-ninja-ci-orin-incremental/vcpkg_installed/x64-linux-dynamic/include -g -fPIC -x assembler-with-cpp -MD -MT libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o -MF libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o.d -o libs/context/CMakeFiles/boost_context.dir/src/asm/make_x86_64_sysv_elf_gas.S.o -c /home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S
make_x86_64_sysv_elf_gas.S: Assembler messages:
make_x86_64_sysv_elf_gas.S:58: Error: unknown mnemonic `movq' -- `movq %rdi,%rax'
make_x86_64_sysv_elf_gas.S:61: Error: unknown mnemonic `andq' -- `andq $-16,%rax'
make_x86_64_sysv_elf_gas.S:65: Error: unknown mnemonic `leaq' -- `leaq -0x48(%rax),%rax'
make_x86_64_sysv_elf_gas.S:69: Error: unknown mnemonic `movq' -- `movq %rdx,0x30(%rax)'
make_x86_64_sysv_elf_gas.S:72: Error: unknown mnemonic `stmxcsr' -- `stmxcsr (%rax)'
make_x86_64_sysv_elf_gas.S:74: Error: unknown mnemonic `fnstcw' -- `fnstcw 0x4(%rax)'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:83: Error: unknown mnemonic `leaq' -- `leaq trampoline(%rip),%rcx'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:86: Error: unknown mnemonic `movq' -- `movq %rcx,0x40(%rax)'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:89: Error: unknown mnemonic `leaq' -- `leaq finish(%rip),%rcx'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:92: Error: unknown mnemonic `movq' -- `movq %rcx,0x38(%rax)'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:174: Error: unknown mnemonic `push' -- `push %rbp'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:177: Error: unknown mnemonic `jmp' -- `jmp *%rbx'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:182: Error: unknown mnemonic `xorq' -- `xorq %rdi,%rdi'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:184: Error: unknown mnemonic `call' -- `call _exit@PLT'
/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/asm/make_x86_64_sysv_elf_gas.S:185: Error: missing immediate expression at operand 1 -- `hlt'
[4/7] /usr/bin/g++-13 -DBOOST_CONTEXT_DYN_LINK="" -DBOOST_CONTEXT_EXPORT=EXPORT -DBOOST_CONTEXT_NO_LIB="" -DBOOST_CONTEXT_SOURCE="" -Dboost_context_EXPORTS -I/home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/include -isystem /home/build/tmp/foo/bar/build-iui-master-manifest-gcc13-ninja-ci-orin-incremental/vcpkg_installed/x64-linux-dynamic/include -fPIC -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/context/CMakeFiles/boost_context.dir/src/posix/stack_traits.cpp.o -MF libs/context/CMakeFiles/boost_context.dir/src/posix/stack_traits.cpp.o.d -o libs/context/CMakeFiles/boost_context.dir/src/posix/stack_traits.cpp.o -c /home/build/tmp/foo/bar/src/goo/3rdparty/vcpkg/buildtrees/boost-context/src/ost-1.85.0-aafc13249c.clean/libs/context/src/posix/stack_traits.cpp
ninja: build stopped: subcommand failed.
Mengna-Li commented 1 month ago

I'm not able to repro this issue on x64-linux.