This issue come from #4273 (comment)
During ruy library upgade, I met this linking error.
/ndk/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: warning: liblog.so, needed by libonert_core.so, not found (try using -rpath or -rpath-link)
Android Linking Dependency
When building onert_core, it is looking for android log library and produces warning.
I found similar cases (https://github.com/opencv/opencv/issues/17282, https://github.com/android/ndk/issues/1088, and https://github.com/facebookincubator/profilo/commit/3ee6e6fe84264dccfdb40323e07fd4ac6883ae27) and solution for those cases is using gold linker.
Gold linker is default linker for arm32 but not for aarch64. It produces broken debug info for AArch64.
Issue 70838247: Gold emits broken debug information for AArch64. AArch64 still uses BFD by default.
I'm not sure which linker should we use. Can we use the golder linker for android?
/cc @hseok-oh @wateret @chunseoklee @YongseopKim
From NDK r20, it provides LLD (LLVM Linker) as new linker option.
AOSP has switched to using LLD by default and the NDK will follow (timeline unknown).
https://github.com/android/ndk/blob/master/Changelogs/Changelog-r21.md
Maybe we can move on to LLD instead of gold linker.
Maybe we can move on to LLD instead of gold linker.
Have you tested ?
@chunseoklee Yes I have. It builds and runs well with LLD linker.
LLD will be used as default linker at NDK r22. https://android.googlesource.com/platform/ndk/+/master/docs/Roadmap.md#default-to-lld-and-llvm-binutils
This issue will be resolved when we use NDK r22 for android build.
Most helpful comment
@chunseoklee Yes I have. It builds and runs well with LLD linker.
LLDwill be used as default linker at NDK r22. https://android.googlesource.com/platform/ndk/+/master/docs/Roadmap.md#default-to-lld-and-llvm-binutilsThis issue will be resolved when we use NDK r22 for android build.