Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 304

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

$
0
0
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/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /home/simontraww/Android/Sdk/ndk-bundle/sources/android/support/include -isystem /home/simontraww/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -isystem /home/simontraww/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIE -o CMakeFiles/cmTC_e9541.dir/testCXXCompiler.cxx.o -c testCXXCompiler.cxx /bin/sh: 1: ccache: not found ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:131 (project) -- Configuring incomplete, errors occurred! See also "/home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/o4a/CMakeFiles/CMakeOutput.log". See also "/home/simontraww/Documents/opencv-3.4.4/platforms/android/work_dir=/home/simontraww/Documents/opencv-3.4.4/build_01/o4a/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "./build_sdk.py", line 372, in builder.build_library(abi, do_install) File "./build_sdk.py", line 188, in build_library execute(cmd) File "./build_sdk.py", line 23, in execute raise Fail("Child returned: %s" % retcode) __main__.Fail: Child returned: 1 We can see : > 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. But Clang++ exist also and i want to tried something but I don't have any way to take. Thanks advance if someone who have an idea and Best Regards.

Viewing all articles
Browse latest Browse all 304

Trending Articles