Closed Bug 1484823 Opened 2 years ago Closed 2 years ago

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

Categories

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

All
Android
enhancement
Not set

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: JanH, Assigned: JanH)

References

Details

Attachments

(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) (jwillcox@mozilla.com) has approved the revision.
Attachment #9002590 - Flags: review+
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/autoland/rev/e635f336c727
Fix Android build errors with NDK r18-beta1. r=snorp
https://hg.mozilla.org/mozilla-central/rev/e635f336c727
Status: NEW → RESOLVED
Closed: 2 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
issues.
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.