How to fix “the C++ compiler is not able to compile a simple tst program” with Cmake and Android-NDK












0















When trying to compile a project using Cmake and Android NDK, it says the following:
The C++ Comnpiler "/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" is not able to compile a simple test program.



Im using Cmake 3.8 and Android NDK r18.
In CMakelists the CXX compiler is set to g++, so I dont know why it wants to use clang++.



CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)



-- Check for working CXX compiler: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler



"/opt/android-ndk/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: /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_48d2d/fast"
gmake[3]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_48d2d.dir/build.make CMakeFiles/cmTC_48d2d.dir/build
gmake[4]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o
/usr/bin/ccache /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --sysroot=/opt/android-ndk/sysroot -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++abi/include -isystem /opt/android-ndk/sysroot/usr/include/aarch64-linux-android -target aarch64-none-linux-android21 -gcc-toolchain /opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIE -o CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o -c /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied
gmake[4]: *** [CMakeFiles/cmTC_48d2d.dir/build.make:66: CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o] Error 1
gmake[4]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
gmake[3]: *** [Makefile:126: cmTC_48d2d/fast] Error 2
gmake[3]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'




CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeError.log".
make[2]: *** [android/CMakeFiles/android-app_armeabi-v7a.dir/build.make:106: android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-stamp/android-app_armeabi-v7a-configure] Error 1
make[2]: *** [android/CMakeFiles/android-system_armeabi-v7a.dir/build.make:106: android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-stamp/android-system_armeabi-v7a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1098: android/CMakeFiles/android-app_armeabi-v7a.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1396: android/CMakeFiles/android-system_armeabi-v7a.dir/all] Error 2
make[2]: *** [android/CMakeFiles/android-app_arm64-v8a.dir/build.make:106: android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-stamp/android-app_arm64-v8a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1322: android/CMakeFiles/android-app_arm64-v8a.dir/all] Error 2
make: *** [Makefile:163: all] Error 2









share|improve this question




















  • 2





    What stands out in the output is ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied. What environment are you running this under, and how does it involve CCache?

    – Botje
    Jan 3 at 13:38











  • Since you are cross compiling using CMake you should provide the cmake command line AND the CMakeToolchainFile you used...

    – Mizux
    Jan 3 at 14:04











  • please note that by default project() enable language CXX so cmake check the compiler on it reach the project() line -> did you set CXX before the project(), command ? otherwise you coulde use project(... LANGUAGES NONE) then later enable_language(CXX) IIRC

    – Mizux
    Jan 3 at 14:06











  • @Botje Im running Ubuntu 18.10, Cmake is running in a docker container. I dont know how this involves Ccache, im a noob in programming. Im just following the instructions to build this, but it only gives errors and errors.

    – Simon
    Jan 27 at 14:08













  • @Mizux The Cmake command is: cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf and this is the toolchain file: pastebin.com/cmu9sG48

    – Simon
    Jan 27 at 14:12
















0















When trying to compile a project using Cmake and Android NDK, it says the following:
The C++ Comnpiler "/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" is not able to compile a simple test program.



Im using Cmake 3.8 and Android NDK r18.
In CMakelists the CXX compiler is set to g++, so I dont know why it wants to use clang++.



CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)



-- Check for working CXX compiler: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler



"/opt/android-ndk/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: /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_48d2d/fast"
gmake[3]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_48d2d.dir/build.make CMakeFiles/cmTC_48d2d.dir/build
gmake[4]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o
/usr/bin/ccache /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --sysroot=/opt/android-ndk/sysroot -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++abi/include -isystem /opt/android-ndk/sysroot/usr/include/aarch64-linux-android -target aarch64-none-linux-android21 -gcc-toolchain /opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIE -o CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o -c /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied
gmake[4]: *** [CMakeFiles/cmTC_48d2d.dir/build.make:66: CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o] Error 1
gmake[4]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
gmake[3]: *** [Makefile:126: cmTC_48d2d/fast] Error 2
gmake[3]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'




CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeError.log".
make[2]: *** [android/CMakeFiles/android-app_armeabi-v7a.dir/build.make:106: android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-stamp/android-app_armeabi-v7a-configure] Error 1
make[2]: *** [android/CMakeFiles/android-system_armeabi-v7a.dir/build.make:106: android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-stamp/android-system_armeabi-v7a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1098: android/CMakeFiles/android-app_armeabi-v7a.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1396: android/CMakeFiles/android-system_armeabi-v7a.dir/all] Error 2
make[2]: *** [android/CMakeFiles/android-app_arm64-v8a.dir/build.make:106: android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-stamp/android-app_arm64-v8a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1322: android/CMakeFiles/android-app_arm64-v8a.dir/all] Error 2
make: *** [Makefile:163: all] Error 2









share|improve this question




















  • 2





    What stands out in the output is ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied. What environment are you running this under, and how does it involve CCache?

    – Botje
    Jan 3 at 13:38











  • Since you are cross compiling using CMake you should provide the cmake command line AND the CMakeToolchainFile you used...

    – Mizux
    Jan 3 at 14:04











  • please note that by default project() enable language CXX so cmake check the compiler on it reach the project() line -> did you set CXX before the project(), command ? otherwise you coulde use project(... LANGUAGES NONE) then later enable_language(CXX) IIRC

    – Mizux
    Jan 3 at 14:06











  • @Botje Im running Ubuntu 18.10, Cmake is running in a docker container. I dont know how this involves Ccache, im a noob in programming. Im just following the instructions to build this, but it only gives errors and errors.

    – Simon
    Jan 27 at 14:08













  • @Mizux The Cmake command is: cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf and this is the toolchain file: pastebin.com/cmu9sG48

    – Simon
    Jan 27 at 14:12














0












0








0








When trying to compile a project using Cmake and Android NDK, it says the following:
The C++ Comnpiler "/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" is not able to compile a simple test program.



Im using Cmake 3.8 and Android NDK r18.
In CMakelists the CXX compiler is set to g++, so I dont know why it wants to use clang++.



CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)



-- Check for working CXX compiler: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler



"/opt/android-ndk/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: /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_48d2d/fast"
gmake[3]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_48d2d.dir/build.make CMakeFiles/cmTC_48d2d.dir/build
gmake[4]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o
/usr/bin/ccache /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --sysroot=/opt/android-ndk/sysroot -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++abi/include -isystem /opt/android-ndk/sysroot/usr/include/aarch64-linux-android -target aarch64-none-linux-android21 -gcc-toolchain /opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIE -o CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o -c /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied
gmake[4]: *** [CMakeFiles/cmTC_48d2d.dir/build.make:66: CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o] Error 1
gmake[4]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
gmake[3]: *** [Makefile:126: cmTC_48d2d/fast] Error 2
gmake[3]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'




CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeError.log".
make[2]: *** [android/CMakeFiles/android-app_armeabi-v7a.dir/build.make:106: android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-stamp/android-app_armeabi-v7a-configure] Error 1
make[2]: *** [android/CMakeFiles/android-system_armeabi-v7a.dir/build.make:106: android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-stamp/android-system_armeabi-v7a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1098: android/CMakeFiles/android-app_armeabi-v7a.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1396: android/CMakeFiles/android-system_armeabi-v7a.dir/all] Error 2
make[2]: *** [android/CMakeFiles/android-app_arm64-v8a.dir/build.make:106: android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-stamp/android-app_arm64-v8a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1322: android/CMakeFiles/android-app_arm64-v8a.dir/all] Error 2
make: *** [Makefile:163: all] Error 2









share|improve this question
















When trying to compile a project using Cmake and Android NDK, it says the following:
The C++ Comnpiler "/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" is not able to compile a simple test program.



Im using Cmake 3.8 and Android NDK r18.
In CMakelists the CXX compiler is set to g++, so I dont know why it wants to use clang++.



CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)



-- Check for working CXX compiler: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler



"/opt/android-ndk/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: /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_48d2d/fast"
gmake[3]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_48d2d.dir/build.make CMakeFiles/cmTC_48d2d.dir/build
gmake[4]: Entering directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o
/usr/bin/ccache /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --sysroot=/opt/android-ndk/sysroot -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++abi/include -isystem /opt/android-ndk/sysroot/usr/include/aarch64-linux-android -target aarch64-none-linux-android21 -gcc-toolchain /opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fPIE -o CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o -c /builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied
gmake[4]: *** [CMakeFiles/cmTC_48d2d.dir/build.make:66: CMakeFiles/cmTC_48d2d.dir/testCXXCompiler.cxx.o] Error 1
gmake[4]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'
gmake[3]: *** [Makefile:126: cmTC_48d2d/fast] Error 2
gmake[3]: Leaving directory '/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeTmp'




CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-build/CMakeFiles/CMakeError.log".
-- Configuring incomplete, errors occurred!
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeOutput.log".
See also "/builder/DualBootPatcher/builder/android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-build/CMakeFiles/CMakeError.log".
make[2]: *** [android/CMakeFiles/android-app_armeabi-v7a.dir/build.make:106: android/android-app_armeabi-v7a-prefix/src/android-app_armeabi-v7a-stamp/android-app_armeabi-v7a-configure] Error 1
make[2]: *** [android/CMakeFiles/android-system_armeabi-v7a.dir/build.make:106: android/android-system_armeabi-v7a-prefix/src/android-system_armeabi-v7a-stamp/android-system_armeabi-v7a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1098: android/CMakeFiles/android-app_armeabi-v7a.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1396: android/CMakeFiles/android-system_armeabi-v7a.dir/all] Error 2
make[2]: *** [android/CMakeFiles/android-app_arm64-v8a.dir/build.make:106: android/android-app_arm64-v8a-prefix/src/android-app_arm64-v8a-stamp/android-app_arm64-v8a-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:1322: android/CMakeFiles/android-app_arm64-v8a.dir/all] Error 2
make: *** [Makefile:163: all] Error 2






cmake android-ndk clang clang++






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 0:40









adem

331311




331311










asked Jan 2 at 17:02









Simon Simon

62




62








  • 2





    What stands out in the output is ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied. What environment are you running this under, and how does it involve CCache?

    – Botje
    Jan 3 at 13:38











  • Since you are cross compiling using CMake you should provide the cmake command line AND the CMakeToolchainFile you used...

    – Mizux
    Jan 3 at 14:04











  • please note that by default project() enable language CXX so cmake check the compiler on it reach the project() line -> did you set CXX before the project(), command ? otherwise you coulde use project(... LANGUAGES NONE) then later enable_language(CXX) IIRC

    – Mizux
    Jan 3 at 14:06











  • @Botje Im running Ubuntu 18.10, Cmake is running in a docker container. I dont know how this involves Ccache, im a noob in programming. Im just following the instructions to build this, but it only gives errors and errors.

    – Simon
    Jan 27 at 14:08













  • @Mizux The Cmake command is: cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf and this is the toolchain file: pastebin.com/cmu9sG48

    – Simon
    Jan 27 at 14:12














  • 2





    What stands out in the output is ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied. What environment are you running this under, and how does it involve CCache?

    – Botje
    Jan 3 at 13:38











  • Since you are cross compiling using CMake you should provide the cmake command line AND the CMakeToolchainFile you used...

    – Mizux
    Jan 3 at 14:04











  • please note that by default project() enable language CXX so cmake check the compiler on it reach the project() line -> did you set CXX before the project(), command ? otherwise you coulde use project(... LANGUAGES NONE) then later enable_language(CXX) IIRC

    – Mizux
    Jan 3 at 14:06











  • @Botje Im running Ubuntu 18.10, Cmake is running in a docker container. I dont know how this involves Ccache, im a noob in programming. Im just following the instructions to build this, but it only gives errors and errors.

    – Simon
    Jan 27 at 14:08













  • @Mizux The Cmake command is: cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf and this is the toolchain file: pastebin.com/cmu9sG48

    – Simon
    Jan 27 at 14:12








2




2





What stands out in the output is ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied. What environment are you running this under, and how does it involve CCache?

– Botje
Jan 3 at 13:38





What stands out in the output is ccache: error: Failed to create directory /builder/.ccache/tmp: Permission denied. What environment are you running this under, and how does it involve CCache?

– Botje
Jan 3 at 13:38













Since you are cross compiling using CMake you should provide the cmake command line AND the CMakeToolchainFile you used...

– Mizux
Jan 3 at 14:04





Since you are cross compiling using CMake you should provide the cmake command line AND the CMakeToolchainFile you used...

– Mizux
Jan 3 at 14:04













please note that by default project() enable language CXX so cmake check the compiler on it reach the project() line -> did you set CXX before the project(), command ? otherwise you coulde use project(... LANGUAGES NONE) then later enable_language(CXX) IIRC

– Mizux
Jan 3 at 14:06





please note that by default project() enable language CXX so cmake check the compiler on it reach the project() line -> did you set CXX before the project(), command ? otherwise you coulde use project(... LANGUAGES NONE) then later enable_language(CXX) IIRC

– Mizux
Jan 3 at 14:06













@Botje Im running Ubuntu 18.10, Cmake is running in a docker container. I dont know how this involves Ccache, im a noob in programming. Im just following the instructions to build this, but it only gives errors and errors.

– Simon
Jan 27 at 14:08







@Botje Im running Ubuntu 18.10, Cmake is running in a docker container. I dont know how this involves Ccache, im a noob in programming. Im just following the instructions to build this, but it only gives errors and errors.

– Simon
Jan 27 at 14:08















@Mizux The Cmake command is: cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf and this is the toolchain file: pastebin.com/cmu9sG48

– Simon
Jan 27 at 14:12





@Mizux The Cmake command is: cd DualBootPatcher/builder && cmake .. -DMBP_BUILD_TARGET=android -DMBP_BUILD_TYPE=debug && make -j16 && rm -rf and this is the toolchain file: pastebin.com/cmu9sG48

– Simon
Jan 27 at 14:12












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54010320%2fhow-to-fix-the-c-compiler-is-not-able-to-compile-a-simple-tst-program-with-c%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54010320%2fhow-to-fix-the-c-compiler-is-not-able-to-compile-a-simple-tst-program-with-c%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Angular Downloading a file using contenturl with Basic Authentication

Olmecas

Can't read property showImagePicker of undefined in react native iOS