Closed Bug 1893001 Opened 5 months ago Closed 2 months ago

Update to Android NDK r27

Categories

(GeckoView :: General, task, P3)

All
Android
task

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: cpeterson, Assigned: RyanVM)

References

Details

Attachments

(3 files)

The next NDK LTS version after r26 (bug 1822171) will be r27, which Google plans to release in 2024 H2:

https://github.com/android/ndk/wiki#release-schedule

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

FYI, NDK r27 is available now. Unfortunately, it's not a drop-in update.
https://treeherder.mozilla.org/logviewer?job_id=466781322&repo=try&lineNumber=27938

   INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ --target=i686-linux-android21 -o Unified_cpp_gfx_graphite2_src0.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -I/builds/worker/workspace/obj-build/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -DNDEBUG=1 -DTRIMMED=1 '-DPACKAGE_VERSION="moz"' '-DPACKAGE_BUGREPORT="http://bugzilla.mozilla.org/"' -DGRAPHITE2_STATIC '-DGRAPHITE2_CUSTOM_HEADER="MozGrMalloc.h"' -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_SUPPORT_LEAKCHECKING -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/gfx/graphite2/src -I/builds/worker/workspace/obj-build/gfx/graphite2/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -faddrsig -fPIC --sysroot=/builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --gcc-toolchain=/builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64 -fno-short-enums -fcrash-diagnostics-dir=/builds/worker/artifacts -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/Unified_cpp_gfx_graphite2_src0.o.pp   Unified_cpp_gfx_graphite2_src0.cpp
   INFO -  In file included from Unified_cpp_gfx_graphite2_src0.cpp:29:
   INFO -  In file included from /builds/worker/checkouts/gecko/gfx/graphite2/src/Collider.cpp:31:
   INFO -  In file included from /builds/worker/workspace/obj-build/dist/stl_wrappers/functional:62:
   INFO -  In file included from /builds/worker/workspace/obj-build/dist/system_wrappers/functional:3:
   INFO -  In file included from /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/functional:526:
   INFO -  In file included from /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
   INFO -  In file included from /builds/worker/workspace/obj-build/dist/stl_wrappers/vector:62:
   INFO -  In file included from /builds/worker/workspace/obj-build/dist/system_wrappers/vector:3:
   INFO -  In file included from /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/vector:325:
   INFO -  In file included from /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__format/formatter_bool.h:20:
   INFO -  In file included from /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__format/formatter_integral.h:35:
   INFO -  In file included from /builds/worker/workspace/obj-build/dist/system_wrappers/locale:3:
  ERROR -  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/locale:2429:26: error: no member named 'moz_xrealloc' in namespace 'std'; did you mean simply 'moz_xrealloc'?
   INFO -   2429 |   _Tp* __t       = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
   INFO -        |                          ^~~~~
   INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/mozalloc.h:82:16: note: 'moz_xrealloc' declared here
   INFO -     82 | MFBT_API void* moz_xrealloc(void* ptr, size_t size) MOZ_INFALLIBLE_ALLOCATOR;
   INFO -        |                ^
   INFO -  In file included from Unified_cpp_gfx_graphite2_src0.cpp:74:
WARNING -  /builds/worker/checkouts/gecko/gfx/graphite2/src/GlyphCache.cpp:47:40: warning: 'iterator<std::input_iterator_tag, std::pair<unsigned short, unsigned short>>' is deprecated [-Wdeprecated-declarations]
   INFO -     47 |     class _glat_iterator : public std::iterator<std::input_iterator_tag, std::pair<sparse::key_type, sparse::mapped_type> >
   INFO -        |                                        ^
   INFO -  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__iterator/iterator.h:23:29: note: 'iterator<std::input_iterator_tag, std::pair<unsigned short, unsigned short>>' has been explicitly marked deprecated here
   INFO -     23 | struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator {
   INFO -        |                             ^
   INFO -  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__config:942:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
   INFO -    942 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
   INFO -        |                                         ^
   INFO -  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__config:915:49: note: expanded from macro '_LIBCPP_DEPRECATED'
   INFO -    915 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
   INFO -        |                                                 ^
   INFO -  1 warning and 1 error generated.
  ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:675: Unified_cpp_gfx_graphite2_src0.o] Error 1

Fixes broken builds with NDK 27 where 'moz_xrealloc' can't be found.

Assignee: nobody → ryanvm
Status: NEW → ASSIGNED
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47262 for changes under testing/web-platform/tests
Pushed by sstanca@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/d91e379be0fe Update Android bundletool to version 1.17.0. r=geckoview-reviewers,calu https://hg.mozilla.org/mozilla-central/rev/b728c1e14939 Update NDK to r27. r=geckoview-reviewers,calu https://hg.mozilla.org/mozilla-central/rev/0d299a62670f Fall through to the lower block for Android builds. r=jfkthame
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1909968

Do we care about updating to the NDK's minor versions? r27b was released today:

https://github.com/android/ndk/releases/tag/r27b

Blocks: 1917252
No longer blocks: 1909968
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: