Build_sdk.py "is not able to compile a simple test program"

asked 2018-12-07 05:23:12 -0500

Simontraww gravatar image

updated 2018-12-07 07:35:17 -0500

Hello everyone,

I've encoutered an error when I want to build with build_sdk.py script : The outpout of the script :

Package configuration:
================================================================================
ABIs = [
    ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
    ABI("3", "arm64-v8a",   None),
    ABI("5", "x86_64",      None),
    ABI("4", "x86",         None),
]
================================================================================
Android NDK path: /home/simontraww/Android/Sdk/ndk-bundle/
Android SDK path: /home/simontraww/Android/Sdk/
Check dir /home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01 (create: True, clean: False)
Check dir /home/simontraww/Documents/opencv-3.4.4 (create: False, clean: False)
Check dir /home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/o4a (create: True, clean: True)
Check dir /home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/OpenCV-android-sdk (create: True, clean: True)
Check dir /home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/OpenCV-android-sdk/sdk/java/javadoc (create: True, clean: True)
Detected OpenCV version: 3.4.4
Detected Engine version: 3.44
Check dir /home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/build_service_armeabi-v7a (create: True, clean: True)
=====
===== Building library for armeabi-v7a (None)
=====
Executing: ['cmake', '-GNinja', "-DOPENCV_EXTRA_MODULES_PATH='/home/simontraww/Documents/opencv_contrib-3.4.4/modules/'", '-DNDK_CCACHE=ccache', '-DBUILD_TESTS=ON', '-DINSTALL_TESTS=ON', "-

DBUILD_ANDROID_EXAMPLES='ON'", "-DINSTALL_ANDROID_EXAMPLES='ON'", "-DBUILD_DOCS='OFF'", "-DBUILD_TESTS='OFF'", "-DANDROID_TOOLCHAIN='clang'", "-DANDROID_ABI='armeabi-v7a with NEON'", "-DANDROID_PLATFORM_ID='2'", "-DBUILD_PERF_TESTS='OFF'", "-DBUILD_EXAMPLES='OFF'", "-DWITH_TBB='ON'", "-DANDROID_STL='c++_static'", "-DWITH_OPENCL='OFF'", "-

DCMAKE_TOOLCHAIN_FILE='/home/simontraww/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake'", "-DWITH_IPP='OFF'", '/home/simontraww/Documents/opencv-3.4.4']
Executing: cmake -GNinja -DOPENCV_EXTRA_MODULES_PATH='/home/simontraww/Documents/opencv_contrib-3.4.4/modules/' -DNDK_CCACHE=ccache -DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DBUILD_ANDROID_EXAMPLES='ON' -DINSTALL_ANDROID_EXAMPLES='ON' -DBUILD_DOCS='OFF' -DBUILD_TESTS='OFF' -DANDROID_TOOLCHAIN='clang' -DANDROID_ABI='armeabi-v7a with NEON' -DANDROID_PLATFORM_ID='2' -DBUILD_PERF_TESTS='OFF' -DBUILD_EXAMPLES='OFF' -DWITH_TBB='ON' -DANDROID_STL='c++_static' -DWITH_OPENCL='OFF' -DCMAKE_TOOLCHAIN_FILE='/home/simontraww/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake' -DWITH_IPP='OFF' /home/simontraww/Documents/opencv-3.4.4
-- ANDROID_PLATFORM not set. Defaulting to minimum supported version
16.
-- Check for working CXX compiler: /home/simontraww/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-- Check for working CXX compiler: /home/simontraww/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- broken
CMake Error at /usr/local/share/cmake-3.11/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/home/simontraww/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/o4a/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/ninja" "cmTC_e9541"
    [1/2] Building CXX object CMakeFiles/cmTC_e9541.dir/testCXXCompiler.cxx.o
    FAILED: CMakeFiles/cmTC_e9541.dir/testCXXCompiler.cxx.o 


      ccache /home/simontraww/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-

none-linux-androideabi16 --gcc-toolchain=/home/simontraww/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/simontraww/Android/Sdk/ndk-bundle/sysroot   -isystem /home/simontraww/Android/Sdk ...
(more)
edit retag flag offensive close merge delete