Skip to content

Conversation

@TroutZhang
Copy link

@TroutZhang TroutZhang commented Oct 13, 2025

I usually build Android on my MBP, until today I tried with my PC workstation.

Error text:

CMake Error at C:/Users/trout.zhang/AppData/Local/Android/Sdk/cmake/4.1.0/share/cmake-4.1/Modules/CMakeDetermineCompilerABI.cmake:83 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  C:/Users/trout.zhang/AppData/Local/Android/Sdk/cmake/4.1.0/share/cmake-4.1/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:2 (project) : com.android.ide.common.process.ProcessException: -- The CXX compiler identification is Clang 19.0.1
-- Detecting CXX compiler ABI info
-- Configuring incomplete, errors occurred!

C++ build system [configure] failed while executing:
    @echo off
    "C:\\Users\\trout.zhang\\AppData\\Local\\Android\\Sdk\\cmake\\4.1.0\\bin\\cmake.exe" ^
      "-HD:\\git\\github\\ndk-samples\\base\\src\\main\\cpp" ^
      "-DCMAKE_SYSTEM_NAME=Android" ^
      "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
      "-DCMAKE_SYSTEM_VERSION=21" ^
      "-DANDROID_PLATFORM=android-21" ^
      "-DANDROID_ABI=arm64-v8a" ^
      "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
      "-DANDROID_NDK=C:\\Users\\trout.zhang\\AppData\\Local\\Android\\Sdk\\ndk\\28.2.13676358" ^
      "-DCMAKE_ANDROID_NDK=C:\\Users\\trout.zhang\\AppData\\Local\\Android\\Sdk\\ndk\\28.2.13676358" ^
      "-DCMAKE_TOOLCHAIN_FILE=C:\\Users\\trout.zhang\\AppData\\Local\\Android\\Sdk\\ndk\\28.2.13676358\\build\\cmake\\android.toolchain.cmake" ^
      "-DCMAKE_MAKE_PROGRAM=C:\\Users\\trout.zhang\\AppData\\Local\\Android\\Sdk\\cmake\\4.1.0\\bin\\ninja.exe" ^
      "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\\git\\github\\ndk-samples\\base\\build\\intermediates\\cxx\\Debug\\5i6qz4i2\\obj\\arm64-v8a" ^
      "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\\git\\github\\ndk-samples\\base\\build\\intermediates\\cxx\\Debug\\5i6qz4i2\\obj\\arm64-v8a" ^
      "-DCMAKE_BUILD_TYPE=Debug" ^
      "-BD:\\git\\github\\ndk-samples\\base\\.cxx\\Debug\\5i6qz4i2\\arm64-v8a" ^
      -GNinja ^
      "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" ^
      "-DCMAKE_MODULE_PATH=D:\\git\\github\\ndk-samples\\cmake"
  from D:\git\github\ndk-samples\base
CMake Error at D:/git/github/ndk-samples/base/.cxx/Debug/5i6qz4i2/arm64-v8a/CMakeFiles/CMakeScratch/TryCompile-5lge99/CMakeLists.txt:2 (set):
  Syntax error in cmake code at

    D:/git/github/ndk-samples/base/.cxx/Debug/5i6qz4i2/arm64-v8a/CMakeFiles/CMakeScratch/TryCompile-5lge99/CMakeLists.txt:2

  when parsing string

    D:\git\github\ndk-samples\cmake

  Invalid character escape '\g'.

Then I searched the code for "DCMAKE_MODULE_PATH" and found the places to fix.

And I think my local depot path is not special D:\git\github\ndk-samples

Copy link
Member

@DanAlbert DanAlbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is a problem for this path but not any of the others being passed, but oh well. Thanks for the fix!

@DanAlbert DanAlbert enabled auto-merge (squash) October 15, 2025 18:45
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

Successfully merging this pull request may close these issues.

2 participants