Fwd: lld 12 assertion failed on 14/aarch64

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Sun, 08 Aug 2021 18:57:21 UTC
Can somebody on this list help me with the question below?

-------- Forwarded Message --------
Subject: lld 12 assertion failed on 14/aarch64
Date: Fri, 6 Aug 2021 22:45:46 +0200
From: Ronald Klop <ronald-lists@klop.ws>
To: freebsd-arm@freebsd.org


My port databases/mongodb50 (and mongodb44) gets an assertion on 14-current using the base clang12.

See: http://www.ipv6proxy.net/go.php?u=http%3A%2F%2Fampere2.nyi.freebsd.org%2Fdata%2Fmain-arm64-default%2Fp55c8c5ac7db5_saaccfdde3d%2Flogs%2Ferrors%2Fmongodb50-5.0.1.log&b=0&f=norefer

The error is:
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/local/poudriere/jails/main-arm64/usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 269.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace.

Any thoughts on how to fix this?

It does not happen on my RPI4 + poudriere at home although I have LTO disabled because of memory constraints.