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

Fail! Building tracetools abort for missing libc++_shared.so #211

Open
aitazhixin opened this issue Apr 20, 2022 · 1 comment
Open

Fail! Building tracetools abort for missing libc++_shared.so #211

aitazhixin opened this issue Apr 20, 2022 · 1 comment

Comments

@aitazhixin
Copy link

I have set ANDROID_NDK and ANDROID_HOME, ABI is arm64-v8a, ANDROID API is android-28.

@aitazhixin
Copy link
Author

INPUT:
#!/bin/bash
declare -a ANDROID_ABI_LIST=("arm64-v8a" "x86" "x86_64")
export PYTHON3_EXEC="$( which python3 )"
export PYTHON3_LIBRARY="$( ${PYTHON3_EXEC} -c 'import os.path; from distutils import sysconfig; print(os.path.realpath(os.path.join(sysconfig.get_config_var("LIBPL"), sysconfig.get_config_var("LDLIBRARY"))))' )"
export PYTHON3_INCLUDE_DIR="$( ${PYTHON3_EXEC} -c 'from distutils import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))' )"
export ANDROID_NDK=/nvroot/Android/Sdk/ndk/20.0.5594570
export ANDROID_HOME=/nvroot/Android/Sdk
export ANDROID_NATIVE_API_LEVEL=android-21
export ANDROID_STL=c++_shared

ANDROID_ABI="arm64-v8a"

export ANDROID_TOOLCHAIN_NAME=llvm

colcon build
--packages-ignore cyclonedds rcl_logging_log4cxx rosidl_generator_py
--packages-up-to rcljava
--cmake-args
-DPYTHON_EXECUTABLE=${PYTHON3_EXEC}
-DPYTHON_LIBRARY=${PYTHON3_LIBRARY}
-DPYTHON_INCLUDE_DIR=${PYTHON3_INCLUDE_DIR}
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
-DANDROID_FUNCTION_LEVEL_LINKING=OFF
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}
-DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME}
-DANDROID_STL=${ANDROID_STL}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_NDK=${ANDROID_NDK}
-DTHIRDPARTY=ON
-DCOMPILE_EXAMPLES=OFF
-DCMAKE_FIND_ROOT_PATH="${PWD}/install"

OUTPUT:
--- stderr: tracetools
/nvroot/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: warning: libc++_shared.so, needed by libtracetools.so, not found (try using -rpath or -rpath-link)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/status.dir/build.make:86: status] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/status.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:141: all] Error 2

Failed <<< tracetools [1.17s, exited with code 2]
Aborted <<< launch_testing [0.85s]

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

1 participant