rui314/mold

`error: undefined symbol: std::__ndk1::basic_string<...>::assign(...)` when linking Firefox for Android with mold

theres-waldo opened this issue · 2 comments

I've previously had success using mold as the linker for building Firefox for various platforms on a Linux host.

However, when trying to build Firefox for Android from a recent trunk of the mozilla-central repository, I'm getting the following error:

mold: error: undefined symbol: std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >::assign(char const*, unsigned long)

The full output of the build command can be seen here.

I originally reported the error in the Mozilla bug tracker at https://bugzilla.mozilla.org/show_bug.cgi?id=1917723, and I've been advised to report it here. The build succeeds when not using mold.

My mold version is 2.31.0.

Please let me know if there is any other information I can provide.

Thank you for the report. This is a subtle symbol resolution issue, but I think I managed to fix it in the above commit. Please try again with the git head.

Thank you for the quick fix! I can confirm that with git head Firefox for Android links successfully.