Closed Bug 1484823 Opened 3 years ago Closed 3 years ago

Error in jni/Types.h when building with NDK r18-beta1


(Firefox Build System :: Android Studio and Gradle Integration, enhancement)

Not set


(firefox63 fixed)

Tracking Status
firefox63 --- fixed


(Reporter: JanH, Assigned: JanH)




(1 file, 1 obsolete file)

I didn't manage to get a build going with my system clang and the NDK clang from r17 apparently doesn't work, either (bug 1484723), so I tried building with r18-beta1.

One breaking change is that in the NDK's jni.h, all jvalue* method parameters were made const, so our jni/Types.h needs adjusting as well so clang doesn't complain.
Getting a working local build with the system clang might be tricky, while
building with NDK r17 clang is broken (bug 1484723).
NDK r18-beta1 fixes this, but also made all jvalue* method parameters in jni.h
const,so in order to support building with it we need to adjust our relevant
function types, too.
Duplicate of this bug: 1484723
Comment on attachment 9002590 [details]
Bug 1484823 - Fix Android build errors with NDK r18-beta1. r?snorp

James Willcox (:snorp) ( has approved the revision.
Attachment #9002590 - Flags: review+
Pushed by
Fix Android build errors with NDK r18-beta1. r=snorp
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
r15c doesn't have <android/ndk-version.h> so this seems to break the build there.
I also have trouble with r15c doesn't have <android/ndk-version.h> in Types.h. Mark it, it works.

I was trying to use r17b, Clang will crash when doing the optimized build. So, r15c is my preferred currently.
Working on it.
Depends on: 1485833
When building with the NDK clang, which is the easiest way of building locally,
NDK r17 doesn't work for ARM builds because of a broken clang, and while the
NDK r18-beta fixes that problem, for some people it causes a different set of
Since NDK r15c doesn't have the ndk-version.h headers, switch to a different
way of bridging the differences that allows people to continue building with
r15c locally.
Attachment #9004644 - Attachment is obsolete: true
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 63 → mozilla63
You need to log in before you can comment on or make changes to this bug.