clang/llvm-tblgen --- ld: error: undefined symbol: setupterm

From: FreeBSD User <freebsd_at_walstatt-de.de>
Date: Sat, 09 Oct 2021 07:46:24 UTC
On recent CURRENT (FreeBSD 14.0-CURRENT #2 main-n249971-0525ece3554e:
Fri Oct  8 15:17:34 CEST 2021 amd64) building of an 13-STABLE based
appliance failed very early in the build process of the 13-STABLE
sources as shown below. 13-STABLE is most recent, since the sources are
fetched every time the build process is triggered.

The framework for the build process is nanoBSD, the same error occurs
when building poudriere's jail based upon 13-STABLE from scratch via
the FreeBSD native build framework. 

"Cross building" of 13-STABLE on a CURRENT platform worked in most
cases and most time, hopefully this hickup is a solveable problem and
it would be nice to have this fixed. 

What is the reason for the linker fail?

Are there any recommenadtions how to "cross build" 13-STABLE on a
14-CURRENT platform in case the approach of mine s not  a desireable on?

Thanks in advance,

Oliver

[...]

sh
/pool/home/ohartmann/Projects/router/router/apu2c4/src/tools/install.sh
-s -o root -g wheel -m 555   compile_et
/pool/home/ohartmann/Projects/router/router/apu2
c4/world/amd64/ALERICH_13-STABLE_amd64/pool/home/ohartmann/Projects/router/router/apu2c4/src/amd64.amd64/tmp/legacy/usr/bin/compile_et
--- _bootstrap-tools-usr.bin/clang/llvm-tblgen --- ld: error: undefined
symbol: setupterm
>>> referenced by Process.cpp
>>>               Process.o:(llvm::sys::Process::FileDescriptorHasColors(int))
>>> in archive
>>> /pool/home/ohartmann/Projects/router/router/apu2c4/world/amd64/ALERICH_13-STABLE_amd64/pool/home/ohartmann/Projects/router/router/apu2c4/src/amd64.amd64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a