riscv64 fails in Build Debug linking wasm-opt. Nine __cxa* symbols are
defined twice, once by our vendored libcxxabi and once by the libc++ that ships
with the pinned clang toolchain:
FAILED: exe.unstripped/wasm-opt wasm-opt
clang++ --target=riscv64-unknown-linux-gnu ...
ld.lld: error: duplicate symbol: __cxxabiv1::__setExceptionClass(_Unwind_Exception*, unsigned long)
>>> defined in obj/flutter/third_party/libcxxabi/src/libcxxabi.cxa_noexception.o
>>> defined in buildtools/linux-x64/clang/lib/riscv64-unknown-linux-gnu/libc++.a(cxa_exception.cpp.o)
The other eight are __getExceptionClass, __isOurExceptionClass,
__cxa_decrement_exception_refcount, __cxa_increment_exception_refcount,
__cxa_current_primary_exception, __cxa_rethrow_primary_exception,
__cxa_uncaught_exception, __cxa_uncaught_exceptions.
Both objects end up on the link line: ours built with exceptions off
(cxa_noexception.o), theirs the normal cxa_exception.cpp.o out of the
prebuilt libc++.a. Only riscv64 ships that per-target lib directory in
buildtools, which is why x86_64, arm64 and armv7hf link clean from the same
dispatch.
Not new and not tied to a version bump. Same failure at both revisions I have
runs for:
Two directions, no strong opinion on which:
- link with
-nostdlib++ for this target so the toolchain's libc++.a is not
pulled in, or
- skip the vendored libcxxabi on riscv64 and use the toolchain's
Worth checking whether patches/0001-clang-toolchain.patch is what puts that lib
directory on the search path in the first place.
Consequence today: there are no published riscv64 engine artifacts for any
recent release. meta-flutter builds the engine from source so its CI is
unaffected, but anyone consuming the prebuilt tarballs has nothing for riscv64.
riscv64 fails in
Build Debuglinkingwasm-opt. Nine__cxa*symbols aredefined twice, once by our vendored libcxxabi and once by the libc++ that ships
with the pinned clang toolchain:
The other eight are
__getExceptionClass,__isOurExceptionClass,__cxa_decrement_exception_refcount,__cxa_increment_exception_refcount,__cxa_current_primary_exception,__cxa_rethrow_primary_exception,__cxa_uncaught_exception,__cxa_uncaught_exceptions.Both objects end up on the link line: ours built with exceptions off
(
cxa_noexception.o), theirs the normalcxa_exception.cpp.oout of theprebuilt
libc++.a. Only riscv64 ships that per-target lib directory inbuildtools, which is why x86_64, arm64 and armv7hf link clean from the same
dispatch.
Not new and not tied to a version bump. Same failure at both revisions I have
runs for:
5d531788a804b261Two directions, no strong opinion on which:
-nostdlib++for this target so the toolchain'slibc++.ais notpulled in, or
Worth checking whether
patches/0001-clang-toolchain.patchis what puts that libdirectory on the search path in the first place.
Consequence today: there are no published riscv64 engine artifacts for any
recent release. meta-flutter builds the engine from source so its CI is
unaffected, but anyone consuming the prebuilt tarballs has nothing for riscv64.