Skip to content

[Potential Bug] CMake build fails: NDK r27 downloads x86_64 binaries instead of aarch64 on ARM64 host #362

Description

@AquilleTech

Environment:

  • App Name/Version: RV2IDE
  • Device Host Architecture: ARM64 (aarch64)
  • NDK Version: 27.0.12077973
  • Build System: Gradle + CMake 4.1.x

Description:
When compiling a C/C++ (CMake) enabled Android project on an ARM64 Android device using RV2IDE, the build fails during :app:configureCMakeDebug.
The installed NDK directory under android-sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/ contains linux-x86_64 instead of a native aarch64 prebuilt binary/directory. Because of this, CMake cannot locate the executable clang / clang++ compiler binaries at prebuilt/bin/clang.

Steps to Reproduce:

  • Open a project with C/C++ support (CMake) in RV2IDE on an ARM64 Android device.
  • Ensure NDK 27.0.12077973 is selected/installed.
  • Run ./gradlew :app:assembleDebug.
  • Inspect the directory:
    cd /data/user/0/com.tom.rv2ide/files/home/android-sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/
  • Run ls -la and observe that only linux-x86_64 exists.

Expected Behavior:
The SDK Manager should either:

  • Download/provide an NDK build compiled natively for aarch64 (ARM64 Android host).
  • Automatically create symlinks pointing to the internal native clang/clang++ toolchain (e.g., /data/data/com.tom.rv2ide/files/usr/bin/clang).

Actual Behavior:
CMake fails with the following log:
C/C++: CMake Error at CMakeLists.txt:3 (project):
C/C++: The CMAKE_C_COMPILER:
C/C++: /data/user/0/com.tom.rv2ide/files/home/android-sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/bin/clang
C/C++: is not a full path to an existing compiler tool.
C/C++: CMake Error at CMakeLists.txt:3 (project):
C/C++: The CMAKE_CXX_COMPILER:
C/C++: /data/user/0/com.tom.rv2ide/files/home/android-sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/bin/clang++
C/C++: is not a full path to an existing compiler tool.

Image

log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions