On 9 Oct 2021, at 09:46, FreeBSD User <free...@walstatt-de.de> wrote:
> 
> 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/clang/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=\"x86_64-unknown-freebsd13.0\" 
-DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd13.0\" 
-DDEFAULT_SYSROOT=\"/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp\" 
-DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser 
-DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter 
-DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler 
-DLLVM_NATIVE_TARGET=LLVMInitializeX86Target 
-DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo 
-DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections 
-fdata-sections -gline-tables-only -Wno-format-zero-length -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable 
-Wno-error=unused-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/include 
-fno-exceptions -fno-rtti -std=c++14 -stdlib=libc++ -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/clang/libllvmminimal/libllvmminimal.a
 
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/libexecinfo
 -lexecinfo 
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/libelf 
-lelf 
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/ncurses/ncurses
 -lncursesw 
-L/usr/obj/share/dim/src/freebsd/stable-13/amd64.amd64/tmp/obj-tools/lib/libthr 
-lpthread  -legacy
ld: error: undefined symbol: setupterm
>>> referenced by Process.inc:336 
>>> (/share/dim/src/freebsd/stable-13/contrib/llvm-project/llvm/lib/Support/Unix/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/clang/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/Unix/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/clang/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/Unix/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/clang/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/Unix/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/clang/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/ncurses/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

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to