build_sdk.py tool "#error "C++11 is not supported"

asked 2018-02-04 05:05:02 -0500

9261 gravatar image

updated 2018-02-20 18:57:57 -0500

I am trying to compile opencv4android with opencv's extra modules, but during the build, it eventually crashed. In the CMakeError file, it gave an unrecognized command line option error.

Here is the start of the CMakeError file:

Compilation failed: source file: 'C:/opencv-master/platforms/android/test/o4a/CMakeFiles/CMakeTmp/src.cxx' check option: ' -fsigned-char -mstackrealign' ===== BUILD LOG ===== Change Dir: C:/opencv-master/platforms/android/test/o4a/CMakeFiles/CMakeTmp

Run Build Command:"C:/Android/sdk/cmake/3.6.4111459/bin/ninja.exe" "cmTC_e2f23" [1/2] Building CXX object CMakeFiles/cmTC_e2f23.dir/src.cxx.o

FAILED: C:\android-ndk-r10e\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe -DANDROID -isystem C:/android-ndk-r10e/platforms/android-9/arch-arm/usr/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include/backward -fexceptions -frtti -fpic -Wno-psabi --sysroot=C:/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -DANDROID -D__ANDROID_API__=9 -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG -fsigned-char -mstackrealign -o CMakeFiles/cmTC_e2f23.dir/src.cxx.o -c C:\opencv-master\platforms\android\test\o4a\CMakeFiles\CMakeTmp\src.cxx

arm-linux-androideabi-g++.exe: error: unrecognized command line option '-mstackrealign'

ninja: build stopped: subcommand failed.

===== END =====

Compilation failed: source file: 'C:/opencv-master/platforms/android/test/o4a/CMakeFiles/CMakeTmp/src.c' check option: ' -fsigned-char -mstackrealign' ===== BUILD LOG ===== Change Dir: C:/opencv-master/platforms/android/test/o4a/CMakeFiles/CMakeTmp

Run Build Command:"C:/Android/sdk/cmake/3.6.4111459/bin/ninja.exe" "cmTC_46922" [1/2] Building C object CMakeFiles/cmTC_46922.dir/src.c.o

FAILED: C:\android-ndk-r10e\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gcc.exe -DANDROID -isystem C:/android-ndk-r10e/platforms/android-9/arch-arm/usr/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include/backward -fexceptions -fpic -Wno-psabi --sysroot=C:/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack -DANDROID -D__ANDROID_API__=9 -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG -fsigned-char -mstackrealign -o CMakeFiles/cmTC_46922.dir/src.c.o -c C:\opencv-master\platforms\android\test\o4a\CMakeFiles\CMakeTmp\src.c

arm-linux-androideabi-gcc.exe: error: unrecognized command line option '-mstackrealign'

ninja: build stopped: subcommand failed.

===== END =====

Compilation failed: source file: 'C:/opencv-master/platforms/android/test/o4a/CMakeFiles/CMakeTmp/src.cxx' check option: ' -fsigned-char -mpreferred-stack-boundary=2' ===== BUILD LOG ===== Change Dir: C:/opencv-master/platforms/android/test/o4a/CMakeFiles/CMakeTmp

Run Build Command:"C:/Android/sdk/cmake/3.6.4111459/bin/ninja.exe" "cmTC_7edb1" [1/2] Building CXX object CMakeFiles/cmTC_7edb1.dir/src.cxx.o

FAILED: C:\android-ndk-r10e\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe -DANDROID -isystem C:/android-ndk-r10e/platforms/android-9/arch-arm/usr/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -isystem C:/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include/backward -fexceptions -frtti -fpic -Wno-psabi --sysroot=C:/android-ndk-r10e/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 ... (more)

edit retag flag offensive close merge delete