Skip to content

[Bug]: NDK r27c Release Contains r27-beta1 Libraries #2205

@Mr-Squirrel

Description

@Mr-Squirrel

Description

The official Android NDK r27c release (android-ndk-r27c-linux.zip) contains pre-built C++ standard library binaries (libc++_shared.so) that are actually from NDK r27-beta1, not r27c. This causes ABI incompatibility issues with binaries compiled using the r27c toolchain.

Evidence

Build ID Mismatch

NDK r27c official release:

$ readelf -p .note.android.ident ./android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so
String dump of section '.note.android.ident':
  [     c]  Android
  [    18]  r27-beta1
  [    58]  11883388

The library reports:

  • Version: r27-beta1 (should be r27c)
  • Build ID: 11883388 (beta1) instead of expected 12479018 (r27c)

Expected Behavior

The android-ndk-r27c-linux.zip release should contain pre-built libraries with:

  • Version string: r27c
  • Build ID: 12479018
  • ABI-compatible with binaries compiled using the r27c toolchain

Reproduction

  1. Download android-ndk-r27c-linux.zip from the official NDK releases page
  2. Extract and check the build info:
    readelf -p .note.android.ident android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so
  3. Observe it shows r27-beta1 (11883388) instead of r27c (12479018)

Impact

  • Binaries compiled with NDK r27c toolchain cannot safely use the pre-built libraries from the r27c distribution
  • This breaks binary compatibility guarantees
  • Developers are forced to either:
    • Use beta1 libraries (risking uncompiled code issues)
    • Rebuild the standard library themselves
    • Use an older/different NDK version

Questions for Google NDK Team

  1. Was the r27c release intentionally rebased on r27-beta1, or is this an oversight?
  2. Is there a separate source of r27c (12479018) pre-built libraries available?
  3. Should the r27c release be republished with correct libraries, or should documentation be updated?

Tested Environment

  • Official NDK r27c release: android-ndk-r27c-linux.zip
  • Host: Linux x86_64
  • Target: x86_64-linux-android (API 26)

Upstream bug

No response

Commit to cherry-pick

No response

I am using a supported NDK

  • I have checked and the NDK I'm using is currently supported

Affected versions

r27

Host OS

Linux

Host OS version

42.20251031.1 (Kinoite) stable

Affected ABIs

x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions