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
- Download
android-ndk-r27c-linux.zip from the official NDK releases page
- 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
- 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
- Was the r27c release intentionally rebased on r27-beta1, or is this an oversight?
- Is there a separate source of r27c (12479018) pre-built libraries available?
- 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
Affected versions
r27
Host OS
Linux
Host OS version
42.20251031.1 (Kinoite) stable
Affected ABIs
x86_64
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] 11883388The library reports:
r27-beta1(should ber27c)11883388(beta1) instead of expected12479018(r27c)Expected Behavior
The
android-ndk-r27c-linux.ziprelease should contain pre-built libraries with:r27c12479018Reproduction
android-ndk-r27c-linux.zipfrom the official NDK releases pager27-beta1(11883388) instead ofr27c(12479018)Impact
Questions for Google NDK Team
Tested Environment
android-ndk-r27c-linux.zipUpstream bug
No response
Commit to cherry-pick
No response
I am using a supported NDK
Affected versions
r27
Host OS
Linux
Host OS version
42.20251031.1 (Kinoite) stable
Affected ABIs
x86_64