Closed Bug 1814734 Opened 1 year ago Closed 7 months ago

Update to Android NDK r25

Categories

(GeckoView :: General, task, P2)

Unspecified
Android

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: cpeterson, Assigned: m_kato)

References

()

Details

(Whiteboard: [geckoview:m113?], [wptsync upstream])

Attachments

(1 file)

We updated to Android NDK r21d LTS in 2021 (bug 1581971). We're now three LTS versions out of date:

  • r21e LTS (January 2021)
  • r23 LTS (August 2021)
  • r25 LTS (July 2022)

https://developer.android.com/ndk/downloads/revision_history

Component: Mach Core → Android Studio and Gradle Integration

This makes a bunch of sense to me!

Moving this bug to the GeckoView product so the Android team can add this task to their backlog. They won't see this bug here in the Firefox Build System product.

Severity: -- → N/A
Component: Android Studio and Gradle Integration → General
Product: Firefox Build System → GeckoView

Unfortunately, there are difficulties getting compiler-rt to build with recent NDKs.

NDK 22+ has a lot of changes.

  • Setting Android API is moved from __ANDROID_API__ to --target option
  • sysroot directory structures and include/lib path are changed (ex. from NDK/sysroot to NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/)
  • etc

So we need a lot of changes for android-ndk.configure etc if we upgrade NDK.

Priority: -- → P2

And another big problem is NDK 24+ removes GNU as. Our code still uses -no-integrated-as for third party libraries. So no way to build some library when using NDK 24+.

We need to update to NDK r23 or r25 (and Android API 25) before we can update to the new rust 1.68. These release notes for rust 1.68 say:

If a project uses NDK r22 or older it will need to be updated to use r23 or newer.

https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html

Priority: P2 → P1
Summary: Update to Android NDK r25 LTS (?) → Update to Android NDK r23 or r25 LTS
Whiteboard: [geckoview:m113?]

(In reply to Chris Peterson [:cpeterson] from comment #6)

We need to update to NDK r23 or r25 (and Android API 25) before we can update to the new rust 1.68. These release notes for rust 1.68 say:

If a project uses NDK r22 or older it will need to be updated to use r23 or newer.

https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html

Chris, actually, we still supports Android 4.1 (API 16) for GeckoView Lite. Should we move minimal version to 19 on GeckoView Lite?

Flags: needinfo?(cpeterson)

We are still using -no-integrated-as in the following libraries.

  • gfx/cairo/libpixman/src/
  • media/libtheora/
  • media/openmax_dl/dl/

libpixman has a patch for aarch64 (https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71), but no arm32 patch. libtheora has to convert some instructions to official instructions (I don't know how to merge a fix to upstream). openmax_dl has no patch, but Chromium is no longer used (https://bugs.chromium.org/p/chromium/issues/detail?id=917355) due not to fast.

(In reply to Makoto Kato [:m_kato] from comment #7)

Chris, actually, we still supports Android 4.1 (API 16) for GeckoView Lite. Should we move minimal version to 19 on GeckoView Lite?

Yes, we also need to update GeckoView's minimum API level to at least 19 before we can update to rust 1.68. I filed bug 1820295 for that work.

Flags: needinfo?(cpeterson)
See Also: → 1820295

NDK 25 supports API 19+ only, So I move bug 1820295 dependency to "Depends on:" field.

Depends on: 1820295
See Also: 1820295
Depends on: 1820455
Depends on: 1820720
Blocks: 1820831

This bug has dependencies that only apply to NDK r25+. Let's make this bug about r25+. I'll file a separate bug for r23, which is a more realistic target on the short term.

Summary: Update to Android NDK r23 or r25 LTS → Update to Android NDK r25 LTS
No longer blocks: 1820831
Depends on: 1820876
No longer depends on: 1820295
Priority: P1 → P2
Blocks: 1822171
Summary: Update to Android NDK r25 LTS → Update to Android NDK r25
Depends on: 1820295
Depends on: 1822246
Depends on: 1845651
No longer depends on: 1820455
Depends on: 1847468
Assignee: nobody → m_kato

NDK r26 LTS is now available. Should we resolve this bug as WONTFIX and jump from r23c to r26 in bug 1822171? Or is there value in updating from r23c to r25c before updating to r26? Now that r26 is available and the new LTS, r25 is EOL'd.

https://github.com/android/ndk/wiki/Changelog-r26

(In reply to Chris Peterson [:cpeterson] from comment #12)

NDK r26 LTS is now available. Should we resolve this bug as WONTFIX and jump from r23c to r26 in bug 1822171? Or is there value in updating from r23c to r25c before updating to r26? Now that r26 is available and the new LTS, r25 is EOL'd.

https://github.com/android/ndk/wiki/Changelog-r26

WebRTC (and Chromium) doesn't support NDK r26 yet. See https://github.com/android/ndk/issues/1751 for android_support.

Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/70ea263bccbf
Upgrade NDK to r25c. r=geckoview-reviewers,owlish,glandium
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43333 for changes under testing/web-platform/tests
Whiteboard: [geckoview:m113?] → [geckoview:m113?], [wptsync upstream]
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: