Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64-v8a boost compilation failed #14

Open
thomaswinckell opened this issue Jun 30, 2020 · 3 comments
Open

arm64-v8a boost compilation failed #14

thomaswinckell opened this issue Jun 30, 2020 · 3 comments

Comments

@thomaswinckell
Copy link

Hello,

I have compilation error when running ./pcl-build-for-android.sh arm64-v8a. For armeabi-v7a and x86_64 it's working well.

The error occurs when compiling boost. You can see a part of the error log below. This might be related to boostorg/context#5 but I don't think because it's fixed since a while.

I am using the exact versions of boost and conan that are described in Readme. I am running this on MacOS.

The error log :

warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: warning for library: bin.v2/libs/container/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_container.a the table of contents is empty (no object file members in the library define global symbols)
common.copy /Users/thomas/.conan/data/boost/1.70.0/bashbug/stable/build/837b8b15700337e070bce7d978d7be2a5fc61d31/boost_1_70_0/armv8/lib/libboost_container.a
clang-darwin.compile.asm bin.v2/libs/context/build/clng-drwn-andrd/rls/abi-apcs/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/asm/make_arm64_aapcs_macho_gas.o
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:59:21: error: unexpected token in argument list
    ; shift address in x0 (allocated stack) to lower 16 byte boundary
                    ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:62:21: error: unexpected token in argument list
    ; reserve space for context-data on context-stack
                    ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:65:17: error: unexpected token in argument list
    ; third arg of make_fcontext() == address of context-function
                ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:66:21: error: unexpected token in argument list
    ; store address as a PC to jump in
                    ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:69:19: error: unexpected token in argument list
    ; compute abs address of label finish
                  ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:70:7: error: unexpected token at start of statement
    ; 0x0c = 3 instructions * size (4) before label 'finish'
      ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:72:28: error: unexpected token in argument list
    ; TODO: Numeric offset since llvm still does not support labels in ADR. Fix:
                           ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:76:20: error: unexpected token in argument list
    ; save address of finish as return-address for context-function
                   ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:77:15: error: unexpected token in argument list
    ; will be entered after context-function returns (LR register)
              ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:80:29: error: unexpected token in argument list
    ret lr ; return pointer to context-data (x0)
                            ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:83:17: error: unexpected token in argument list
    ; exit code is zero
                ^
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:85:7: error: unrecognized instruction mnemonic, did you mean: ext, extr?
    ; exit application

Thank you for your work

@BillCai06
Copy link

I have similar issues :
....
...failed clang-linux.compile.c++.without-pch bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/junit_log_formatter.o...
clang-linux.compile.c++.without-pch bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_log_formatter.o
/bin/sh: 2: /home/bill/.conan/data/android-toolchain/r16/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++: not found

"/home/bill/.conan/data/android-toolchain/r16/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++" -c -x c++ -fvisibility-inlines-hidden -fPIC -std=c++11 -stdlib=libc++ -O3 -Wall -fvisibility=hidden -Wno-inline -Wno-c99-extensions -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -o "bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_log_formatter.o" "libs/test/src/xml_log_formatter.cpp"

...failed clang-linux.compile.c++.without-pch bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_log_formatter.o...
clang-linux.compile.c++.without-pch bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_report_formatter.o
/bin/sh: 2: /home/bill/.conan/data/android-toolchain/r16/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++: not found

"/home/bill/.conan/data/android-toolchain/r16/bashbug/stable/package/be241241e9d4718e5bab4eb33935bbb69606bb0c/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++" -c -x c++ -fvisibility-inlines-hidden -fPIC -std=c++11 -stdlib=libc++ -O3 -Wall -fvisibility=hidden -Wno-inline -Wno-c99-extensions -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -o "bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_report_formatter.o" "libs/test/src/xml_report_formatter.cpp"

...failed clang-linux.compile.c++.without-pch bin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_report_formatter.o...
...skipped <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>libboost_test_exec_monitor.a(clean) for lack of <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>compiler_log_formatter.o...
...skipped <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>libboost_test_exec_monitor.a for lack of <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>compiler_log_formatter.o...
...skipped <p/home/bill/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca/boost_1_70_0/armv8/lib>libboost_test_exec_monitor.a for lack of <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>libboost_test_exec_monitor.a...
...skipped <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>libboost_unit_test_framework.a(clean) for lack of <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>compiler_log_formatter.o...
...skipped <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>libboost_unit_test_framework.a for lack of <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>compiler_log_formatter.o...
...skipped <p/home/bill/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca/boost_1_70_0/armv8/lib>libboost_unit_test_framework.a for lack of <pbin.v2/libs/test/build/clng-lnx-andrd/rls/adrs-mdl-64/archt-arm/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn>libboost_unit_test_framework.a...
...failed updating 194 targets...
...skipped 180 targets...
...updated 250 targets...
boost/1.70.0@bashbug/stable:
boost/1.70.0@bashbug/stable: ERROR: Package '4317d68676204855daddf9e93e50d037f61575ca' build failed
boost/1.70.0@bashbug/stable: WARN: Build folder /home/bill/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca
ERROR: boost/1.70.0@bashbug/stable: Error in build() method, line 56
self._build_boost()
while calling '_build_boost', line 47
self.run(b2_comd)
ConanException: Error 1 while executing ./b2 link=static variant=release threading=multi --without-python --debug-configuration --abbreviate-paths architecture=arm --stagedir=armv8 target-os=android address-model=64 abi=aapcs

@BillCai06
Copy link

Also after switching to NDK r20, boost compiled successfully.

@bingkangzhang
Copy link

Also after switching to NDK r20, boost compiled successfully.

I hava the same issues.I have already used NDK r20 to compile it but still failed.

Configuration:
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=12.0
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

clang-darwin.compile.c++ bin.v2/libs/serialization/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/xml_woarchive.o
In file included from libs/serialization/src/xml_woarchive.cpp:28:
In file included from ./boost/archive/impl/xml_woarchive_impl.ipp:41:
./boost/archive/iterators/wchar_from_mb.hpp:168:31: warning: unused variable 'r' [-Wunused-variable]
std::codecvt_base::result r = m_codecvt_facet.in(
^
1 warning generated.
clang-darwin.compile.c++ bin.v2/libs/serialization/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/polymorphic_xml_wiarchive.o
clang-darwin.compile.c++ bin.v2/libs/serialization/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/polymorphic_xml_woarchive.o
clang-darwin.archive bin.v2/libs/serialization/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_wserialization.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: bin.v2/libs/serialization/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_wserialization.a the table of contents is empty (no object file members in the library define global symbols)
common.copy /Users/bingkang.zhang/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca/boost_1_70_0/armv8/lib/libboost_wserialization.a
clang-darwin.compile.c++ bin.v2/libs/stacktrace/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/noop.o
clang-darwin.archive bin.v2/libs/stacktrace/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_stacktrace_noop.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: bin.v2/libs/stacktrace/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_stacktrace_noop.a the table of contents is empty (no object file members in the library define global symbols)
common.copy /Users/bingkang.zhang/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca/boost_1_70_0/armv8/lib/libboost_stacktrace_noop.a
clang-darwin.compile.c++ bin.v2/libs/stacktrace/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/basic.o
clang-darwin.archive bin.v2/libs/stacktrace/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_stacktrace_basic.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: bin.v2/libs/stacktrace/build/clng-drwn-andrd/rls/lnk-sttc/trgt-os-andrd/thrd-mlt/vsblt-hdn/libboost_stacktrace_basic.a the table of contents is empty (no object file members in the library define global symbols)
common.copy /Users/bingkang.zhang/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca/boost_1_70_0/armv8/lib/libboost_stacktrace_basic.a
...failed updating 3 targets...
...skipped 3 targets...
...updated 649 targets...
boost/1.70.0@bashbug/stable:
boost/1.70.0@bashbug/stable: ERROR: Package '4317d68676204855daddf9e93e50d037f61575ca' build failed
boost/1.70.0@bashbug/stable: WARN: Build folder /Users/bingkang.zhang/.conan/data/boost/1.70.0/bashbug/stable/build/4317d68676204855daddf9e93e50d037f61575ca
ERROR: boost/1.70.0@bashbug/stable: Error in build() method, line 55
self._build_boost()
while calling '_build_boost', line 46
self.run(b2_comd)
ConanException: Error 1 while executing ./b2 link=static variant=release threading=multi --without-python --debug-configuration --abbreviate-paths architecture=arm --stagedir=armv8 target-os=android address-model=64 abi=aapcs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants