From nobody Sat Oct 09 11:37:36 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 08EAD17F79EF for ; Sat, 9 Oct 2021 11:37:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HRNMw6lj8z4dl5; Sat, 9 Oct 2021 11:37:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 9BE07F409; Sat, 9 Oct 2021 11:37:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (unknown [IPv6:2001:470:7a58:0:2191:2238:625b:d64d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 08CCC4F8E9; Sat, 9 Oct 2021 13:37:46 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_71F3AAD4-2AF3-4432-B6A0-F969FB9DA706"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: clang/llvm-tblgen --- ld: error: undefined symbol: setupterm Date: Sat, 9 Oct 2021 13:37:36 +0200 In-Reply-To: <20211009094624.3f3cacc8@jelly.fritz.box> Cc: freebsd-current@freebsd.org To: FreeBSD User References: <20211009094624.3f3cacc8@jelly.fritz.box> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-ThisMailContainsUnwantedMimeParts: N --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 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--