Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Oct 2021 13:37:36 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        FreeBSD User <freebsd@walstatt-de.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: clang/llvm-tblgen --- ld: error: undefined  symbol: setupterm
Message-ID:  <A047910E-DB49-45F8-9BF4-9233969AADAC@FreeBSD.org>
In-Reply-To: <20211009094624.3f3cacc8@jelly.fritz.box>
References:  <20211009094624.3f3cacc8@jelly.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_71F3AAD4-2AF3-4432-B6A0-F969FB9DA706
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 9 Oct 2021, at 09:46, FreeBSD User <freebsd@walstatt-de.de> wrote:
>=20
> 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.
...
> =
/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))

It is complaining about ncurses functions; it seems that even though the =
link step gets -lncursesw added, it still is not able to find the =
symbol:

c++ -O2 -pipe -fno-common =
-I/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/c=
lang/libllvm -I/share/dim/src/freebsd/stable-13/lib/clang/include =
-I/share/dim/src/freebsd/stable-13/contrib/llvm-project/llvm/include =
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS =
-DHAVE_VCS_VERSION_INC -DNDEBUG =
-DLLVM_DEFAULT_TARGET_TRIPLE=3D\"x86_64-unknown-freebsd13.0\" =
-DLLVM_HOST_TRIPLE=3D\"x86_64-unknown-freebsd13.0\" =
-DDEFAULT_SYSROOT=3D\"/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64=
/tmp\" -DLLVM_TARGET_ENABLE_X86 =
-DLLVM_NATIVE_ASMPARSER=3DLLVMInitializeX86AsmParser =
-DLLVM_NATIVE_ASMPRINTER=3DLLVMInitializeX86AsmPrinter =
-DLLVM_NATIVE_DISASSEMBLER=3DLLVMInitializeX86Disassembler =
-DLLVM_NATIVE_TARGET=3DLLVMInitializeX86Target =
-DLLVM_NATIVE_TARGETINFO=3DLLVMInitializeX86TargetInfo =
-DLLVM_NATIVE_TARGETMC=3DLLVMInitializeX86TargetMC -ffunction-sections =
-fdata-sections -gline-tables-only -Wno-format-zero-length =
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable =
-Wno-error=3Dunused-but-set-variable -Wno-tautological-compare =
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-function =
-Wno-enum-conversion -Wno-unused-local-typedef =
-Wno-address-of-packed-member -Wno-switch -Wno-switch-enum =
-Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments =
-I/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/legacy/usr/incl=
ude -fno-exceptions -fno-rtti -std=3Dc++14 -stdlib=3Dlibc++ =
-Wno-c++11-extensions  -Wl,--gc-sections -static   =
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/legacy/usr/lib =
-o llvm-tblgen.full  AsmMatcherEmitter.o AsmWriterEmitter.o =
AsmWriterInst.o Attributes.o CTagsEmitter.o CallingConvEmitter.o =
CodeEmitterGen.o CodeGenDAGPatterns.o CodeGenHwModes.o =
CodeGenInstruction.o CodeGenMapTable.o CodeGenRegisters.o =
CodeGenSchedule.o CodeGenTarget.o DAGISelEmitter.o DAGISelMatcher.o =
DAGISelMatcherEmitter.o DAGISelMatcherGen.o DAGISelMatcherOpt.o =
DFAEmitter.o DFAPacketizerEmitter.o DirectiveEmitter.o =
DisassemblerEmitter.o ExegesisEmitter.o FastISelEmitter.o =
FixedLenDecoderEmitter.o GICombinerEmitter.o GlobalISel/CodeExpander.o =
GlobalISel/GIMatchDag.o GlobalISel/GIMatchDagEdge.o =
GlobalISel/GIMatchDagInstr.o GlobalISel/GIMatchDagOperands.o =
GlobalISel/GIMatchDagPredicate.o =
GlobalISel/GIMatchDagPredicateDependencyEdge.o GlobalISel/GIMatchTree.o =
GlobalISelEmitter.o InfoByHwMode.o InstrDocsEmitter.o InstrInfoEmitter.o =
IntrinsicEmitter.o OptEmitter.o OptParserEmitter.o OptRSTEmitter.o =
PredicateExpander.o PseudoLoweringEmitter.o RISCVCompressInstEmitter.o =
RegisterBankEmitter.o RegisterInfoEmitter.o SDNodeProperties.o =
SearchableTableEmitter.o SubtargetEmitter.o SubtargetFeatureInfo.o =
TableGen.o Types.o WebAssemblyDisassemblerEmitter.o =
X86DisassemblerTables.o X86EVEX2VEXTablesEmitter.o =
X86FoldTablesEmitter.o X86ModRMFilters.o X86RecognizableInstr.o =
/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/cla=
ng/libllvmminimal/libllvmminimal.a =
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/l=
ibexecinfo -lexecinfo =
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/l=
ibelf -lelf =
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/n=
curses/ncurses -lncursesw =
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/l=
ibthr -lpthread  -legacy
ld: error: undefined symbol: setupterm
>>> referenced by Process.inc:336 =
(/share/dim/src/freebsd/stable-13/contrib/llvm-project/llvm/lib/Support/Un=
ix/Process.inc:336)
>>>               =
Process.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive =
/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/cla=
ng/libllvmminimal/libllvmminimal.a

ld: error: undefined symbol: tigetnum
>>> referenced by Process.inc:354 =
(/share/dim/src/freebsd/stable-13/contrib/llvm-project/llvm/lib/Support/Un=
ix/Process.inc:354)
>>>               =
Process.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive =
/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/cla=
ng/libllvmminimal/libllvmminimal.a

ld: error: undefined symbol: set_curterm
>>> referenced by Process.inc:358 =
(/share/dim/src/freebsd/stable-13/contrib/llvm-project/llvm/lib/Support/Un=
ix/Process.inc:358)
>>>               =
Process.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive =
/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/cla=
ng/libllvmminimal/libllvmminimal.a

ld: error: undefined symbol: del_curterm
>>> referenced by Process.inc:359 =
(/share/dim/src/freebsd/stable-13/contrib/llvm-project/llvm/lib/Support/Un=
ix/Process.inc:359)
>>>               =
Process.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive =
/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/cla=
ng/libllvmminimal/libllvmminimal.a
c++: error: linker command failed with exit code 1 (use -v to see =
invocation)

Probably it is due to the preceding =
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/n=
curses/ncurses option, as that directory (and the supposed libncursesw.a =
there) does not exist yet at the bootstrap-tools stage.

I am not sure if it should use that library path at all, though. It =
should really link to the *host* ncursesw library instead.

-Dimitry


--Apple-Mail=_71F3AAD4-2AF3-4432-B6A0-F969FB9DA706
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYWF/AAAKCRCwXqMKLiCW
o/K7AKD+Tl8KFArY9RhlA+FLZQZFizXPCQCfYjws96yCnJJKe9q+REFpfITpM6s=
=vph4
-----END PGP SIGNATURE-----

--Apple-Mail=_71F3AAD4-2AF3-4432-B6A0-F969FB9DA706--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A047910E-DB49-45F8-9BF4-9233969AADAC>