Skip to content
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

[CXX1429] error when building with cmake using #21664

Open
jcy20001122 opened this issue Apr 1, 2024 · 1 comment
Open

[CXX1429] error when building with cmake using #21664

jcy20001122 opened this issue Apr 1, 2024 · 1 comment

Comments

@jcy20001122
Copy link

[CXX1429] error when building with cmake using C:\Users\Admini\AndroidStudioProjects\MyApplication\app\src\main\cpp\CMakeLists.txt: -- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: D:/AndroidSDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: D:/AndroidSDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - broken
-- Configuring incomplete, errors occurred!
See also "C:/Users/Admini/AndroidStudioProjects/MyApplication/app/.cxx/Debug/2zm6p4p1/x86/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Admini/AndroidStudioProjects/MyApplication/app/.cxx/Debug/2zm6p4p1/x86/CMakeFiles/CMakeError.log".

C++ build system [configure] failed while executing:
@echo off
"D:\AndroidSDK\cmake\3.22.1\bin\cmake.exe" ^
"-HC:\Users\Admini\AndroidStudioProjects\MyApplication\app\src\main\cpp" ^
"-DCMAKE_SYSTEM_NAME=Android" ^
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
"-DCMAKE_SYSTEM_VERSION=30" ^
"-DANDROID_PLATFORM=android-30" ^
"-DANDROID_ABI=x86" ^
"-DCMAKE_ANDROID_ARCH_ABI=x86" ^
"-DANDROID_NDK=D:\AndroidSDK\ndk\25.1.8937393" ^
"-DCMAKE_ANDROID_NDK=D:\AndroidSDK\ndk\25.1.8937393" ^
"-DCMAKE_TOOLCHAIN_FILE=D:\AndroidSDK\ndk\25.1.8937393\build\cmake\android.toolchain.cmake" ^
"-DCMAKE_MAKE_PROGRAM=D:\AndroidSDK\cmake\3.22.1\bin\ninja.exe" ^
"-DCMAKE_CXX_FLAGS=-std=c++11" ^
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Admini\AndroidStudioProjects\MyApplication\app\build\intermediates\cxx\Debug\2zm6p4p1\obj\x86" ^
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\Users\Admini\AndroidStudioProjects\MyApplication\app\build\intermediates\cxx\Debug\2zm6p4p1\obj\x86" ^
"-DCMAKE_BUILD_TYPE=Debug" ^
"-BC:\Users\Admini\AndroidStudioProjects\MyApplication\app\.cxx\Debug\2zm6p4p1\x86" ^
-GNinja
from C:\Users\Admini\AndroidStudioProjects\MyApplication\app
CMake Error at D:/AndroidSDK/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler

"D:/AndroidSDK/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/Admini/AndroidStudioProjects/MyApplication/app/.cxx/Debug/2zm6p4p1/x86/CMakeFiles/CMakeTmp

Run Build Command(s):D:\AndroidSDK\cmake\3.22.1\bin\ninja.exe cmTC_30550 && [1/2] Building C object CMakeFiles\cmTC_30550.dir\testCCompiler.c.o
FAILED: CMakeFiles/cmTC_30550.dir/testCCompiler.c.o 
D:\AndroidSDK\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe   -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -o CMakeFiles\cmTC_30550.dir\testCCompiler.c.o -c C:\Users\Admini\AndroidStudioProjects\MyApplication\app\.cxx\Debug\2zm6p4p1\x86\CMakeFiles\CMakeTmp\testCCompiler.c
error: unable to rename temporary 'CMakeFiles\cmTC_30550.dir\testCCompiler.c-b7459852.o.tmp' to output file 'CMakeFiles\cmTC_30550.dir\testCCompiler.c.o': 'Permission denied'
1 error generated.
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
Affected Modules: app
How to solve this problem?

@sbc100
Copy link
Collaborator

sbc100 commented Apr 1, 2024

This looks like an android NDK issue. What makes you think this is an emscripten issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants