Bug 244790 - World does not compile ld does not find -lm
Summary: World does not compile ld does not find -lm
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.3-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-13 10:57 UTC by tschweikle
Modified: 2020-10-29 08:20 UTC (History)
2 users (show)

See Also:


Attachments
Log building world (129.92 KB, text/plain)
2020-03-13 11:08 UTC, tschweikle
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tschweikle 2020-03-13 10:57:41 UTC
FreeBSD fbsd11.bfs.de 11.3-STABLE FreeBSD 11.3-STABLE #0 r356598: Mon Jan 13 10:31:55 CET 2020     root@fbsd11.bfs.de:/usr/obj/usr/src/sys/FBSD11  amd64

c++ -O2 -pipe -I/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvm -I/usr/src/lib/clang/include -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.3\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.3\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/tmp\" -DLLVM_TARGET_ENABLE_AARCH64 -DLLVM_TARGET_ENABLE_ARM -DLLVM_TARGET_ENABLE_MIPS -DLLVM_TARGET_ENABLE_POWERPC -DLLVM_TARGET_ENABLE_SPARC -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 -g -Qunused-arguments -I/usr/obj/usr/src/tmp/legacy/usr/include -std=c++11 -fno-exceptions -fno-rtti -stdlib=libc++ -Wno-c++11-extensions  -Wl,--gc-sections -static -L/usr/obj/usr/src/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 DFAPacketizerEmitter.o DisassemblerEmitter.o ExegesisEmitter.o FastISelEmitter.o FixedLenDecoderEmitter.o GlobalISelEmitter.o InfoByHwMode.o InstrDocsEmitter.o InstrInfoEmitter.o IntrinsicEmitter.o OptParserEmitter.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/usr/src/tmp/usr/src/lib/clang/libllvmminimal/libllvmminimal.a  -lncursesw  -lpthread -legacy
/usr/bin/ld: cannot find -lm
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[3]: stopped in /usr/src/usr.bin/clang/llvm-tblgen
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

looks like ld takes some flags for a file ...
Comment 1 tschweikle 2020-03-13 11:00:28 UTC
What was done:
- wiped out /usr/src
- checked out sources with svn
- configured kernel
- tried to compile world
Comment 2 tschweikle 2020-03-13 11:02:38 UTC
# cd /usr/src
# svn info
Path: .
Working Copy Root Path: /usr/src
URL: https://svn.freebsd.org/base/stable/11
Relative URL: ^/stable/11
Repository Root: https://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 358907
Node Kind: directory
Schedule: normal
Last Changed Author: pfg
Last Changed Rev: 358903
Last Changed Date: 2020-03-12 04:03:38 +0100 (Thu, 12 Mar 2020)

# cc --version
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Target: x86_64-unknown-freebsd11.3
Thread model: posix
InstalledDir: /usr/bin

# ld --version
GNU ld 2.17.50 [FreeBSD] 2007-07-03
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
Comment 3 tschweikle 2020-03-13 11:08:02 UTC
Created attachment 212381 [details]
Log building world
Comment 4 Li-Wen Hsu freebsd_committer freebsd_triage 2020-10-29 08:20:05 UTC
Is this still happening on newer versions?