-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Build command failed. #510
Comments
not what I could see through it. if you comment out the detection in your CMakeLists.txt, while it get error later on? if you get a small portion of your app somewhere, that would be good. thanks |
thanks! unfortunately I could not see through it. paste 2 files? .../.externaNativeBuild/cmake/debug/armeabi-v7a/cmake_build_command.txt |
Got some expert mind: it might be that your SDK installed to a place that is too deep in the path, the overall path for some internal temp directory crossed 240 character limit, hence the error. May you try one thing:
then check your Android Studio version and update here ( I tried to include that CakeTestCCompiler module in one of the sample's Cmakelists.txt, it is ok ). |
assume you get this one nailed down already. It is an annoyance problem -- if it still happens on your end, please share the code somewhere, thanks |
@ggfan The problem is disappeared, thanks for your help! |
Hi @zeshaoaaa . |
Hi @zeshaoaaa . |
this is more like compiler mis-match: cmake tries to generate a simple C/C++ program and compiling it to make sure the settings/compiling flags are correct. It is pretty serious one, are you seeing this when you are compiling the sample? if you could cut out a simple program, please let me know. Also some details would help ( studio versions, ndk versions etc. ) |
Hi @ggfan my path to sdk is near root - D:\AndroidSDK |
Description
Is there anyone know how to fix this problem? Thanks in advance.
Software
OS: Windows10
Error info
Build command failed.
Error while executing process C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Users\Administrator\AndroidStudioProjects\WatermelonKnows\app -BC:\Users\Administrator\AndroidStudioProjects\WatermelonKnows\app.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Administrator\AndroidStudioProjects\WatermelonKnows\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
It fails with the following output:
Change Dir: C:/Users/Administrator/AndroidStudioProjects/WatermelonKnows/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp
Run Build
Command:"C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe"
"cmTC_2c138"
[1/2] Building C object CMakeFiles/cmTC_2c138.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_2c138
FAILED: cmd.exe /C "cd . &&
C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe
--target=armv7-none-linux-androideabi
--gcc-toolchain=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64
--sysroot=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/sysroot
-isystem
C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi
-D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables
-fstack-protector-strong -no-canonical-prefixes -march=armv7-a
-mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb
-Wa,--noexecstack -Wformat -Werror=format-security
-Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot
C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm
-Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings
-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack
-Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections
-Wl,-z,nocopyreloc CMakeFiles/cmTC_2c138.dir/testCCompiler.c.o -o
cmTC_2c138 -latomic -lm && cd ."
The system cannot find the path specified.
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/AndroidStudioProjects/WatermelonKnows/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Administrator/AndroidStudioProjects/WatermelonKnows/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeError.log".
Build command failed.
Error while executing process C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Users\Administrator\AndroidStudioProjects\WatermelonKnows\app -BC:\Users\Administrator\AndroidStudioProjects\WatermelonKnows\app.externalNativeBuild\cmake\release\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Administrator\AndroidStudioProjects\WatermelonKnows\app\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
It fails with the following output:
Change Dir: C:/Users/Administrator/AndroidStudioProjects/WatermelonKnows/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeTmp
Run Build
Command:"C:\Users\Administrator\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe"
"cmTC_c924f"
[1/2] Building C object CMakeFiles/cmTC_c924f.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_c924f
FAILED: cmd.exe /C "cd . &&
C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe
--target=armv7-none-linux-androideabi
--gcc-toolchain=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64
--sysroot=C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/sysroot
-isystem
C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi
-D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables
-fstack-protector-strong -no-canonical-prefixes -march=armv7-a
-mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb
-Wa,--noexecstack -Wformat -Werror=format-security
-Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot
C:/Users/Administrator/AppData/Local/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm
-Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings
-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack
-Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections
-Wl,-z,nocopyreloc CMakeFiles/cmTC_c924f.dir/testCCompiler.c.o -o
cmTC_c924f -latomic -lm && cd ."
The system cannot find the path specified.
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/AndroidStudioProjects/WatermelonKnows/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Administrator/AndroidStudioProjects/WatermelonKnows/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeError.log".
The text was updated successfully, but these errors were encountered: