Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build of x86_64-linux-gnu native fails #170

Closed
el-sambal opened this issue May 7, 2024 · 2 comments
Closed

Build of x86_64-linux-gnu native fails #170

el-sambal opened this issue May 7, 2024 · 2 comments

Comments

@el-sambal
Copy link

Hello,

Today I tried running CMAKE_GENERATOR=Ninja ./build x86_64-linux-gnu native, and after 1.5 hours it failed. The end of the output looks like this:

<<basically 1800 lines starting with -- Installing or -- Up-to-date>>

-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicsRISCV.h
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicsR600.h
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicsBPF.h
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicsXCore.h
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicsSPIRV.h
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicsLoongArch.h
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/IR/IntrinsicEnums.inc
-- Up-to-date: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/CodeGen
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include/llvm/CodeGen/GenVT.inc
-- Installing: /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/lib/cmake/llvm/LLVMConfigExtensions.cmake
install
└─ install zig
   └─ zig build-exe zig ReleaseFast x86_64-linux-gnu 2 errors
error: ld.lld: undefined symbol: mallinfo2
    note: referenced by Process.cpp
    note:               Process.cpp.o:(llvm::sys::Process::GetMallocUsage()) in archive /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/lib/libLLVMSupport.a
    note: did you mean: mallinfo
    note: defined in: /home/aron/.cache/zig/o/3a7edeb82d475eb11ce5c2b6937cbc20/libc.so.6
error: ld.lld: undefined symbol: arc4random
    note: referenced by Process.cpp
    note:               Process.cpp.o:(llvm::sys::Process::GetRandomNumber()) in archive /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/lib/libLLVMSupport.a
error: the following command failed with 2 compilation errors:
/home/aron/zig-bootstrap3/out/host/bin/zig build-exe --stack 33554432 -cflags -std=c++17 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Werror=type-limits -Wno-missing-braces -Wno-comment -DNDEBUG=1 -- /home/aron/zig-bootstrap3/zig/src/zig_llvm.cpp /home/aron/zig-bootstrap3/zig/src/zig_clang.cpp /home/aron/zig-bootstrap3/zig/src/zig_llvm-ar.cpp /home/aron/zig-bootstrap3/zig/src/zig_clang_driver.cpp /home/aron/zig-bootstrap3/zig/src/zig_clang_cc1_main.cpp /home/aron/zig-bootstrap3/zig/src/zig_clang_cc1as_main.cpp -lclangFrontendTool -lclangCodeGen -lclangFrontend -lclangDriver -lclangSerialization -lclangSema -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangAnalysis -lclangASTMatchers -lclangAST -lclangParse -lclangBasic -lclangEdit -lclangLex -lclangARCMigrate -lclangRewriteFrontend -lclangRewrite -lclangCrossTU -lclangIndex -lclangToolingCore -lclangExtractAPI -lclangSupport -llldMinGW -llldELF -llldCOFF -llldWasm -llldMachO -llldCommon -lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMCoverage -lLLVMLineEditor -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMX86TargetMCA -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyUtils -lLLVMWebAssemblyDesc -lLLVMWebAssemblyInfo -lLLVMVEDisassembler -lLLVMVEAsmParser -lLLVMVECodeGen -lLLVMVEDesc -lLLVMVEInfo -lLLVMSystemZDisassembler -lLLVMSystemZAsmParser -lLLVMSystemZCodeGen -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSparcDisassembler -lLLVMSparcAsmParser -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMRISCVTargetMCA -lLLVMRISCVDisassembler -lLLVMRISCVAsmParser -lLLVMRISCVCodeGen -lLLVMRISCVDesc -lLLVMRISCVInfo -lLLVMPowerPCDisassembler -lLLVMPowerPCAsmParser -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMMSP430Disassembler -lLLVMMSP430AsmParser -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsDisassembler -lLLVMMipsAsmParser -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMLoongArchDisassembler -lLLVMLoongArchAsmParser -lLLVMLoongArchCodeGen -lLLVMLoongArchDesc -lLLVMLoongArchInfo -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFAsmParser -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMAVRDisassembler -lLLVMAVRAsmParser -lLLVMAVRCodeGen -lLLVMAVRDesc -lLLVMAVRInfo -lLLVMARMDisassembler -lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAMDGPUTargetMCA -lLLVMAMDGPUDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcJIT -lLLVMWindowsDriver -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMDWP -lLLVMDebugInfoLogicalView -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMObjCopy -lLLVMMCA -lLLVMMCDisassembler -lLLVMLTO -lLLVMPasses -lLLVMCFGuard -lLLVMCoroutines -lLLVMipo -lLLVMVectorize -lLLVMLinker -lLLVMInstrumentation -lLLVMFrontendOpenMP -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMExtensions -lLLVMDWARFLinkerParallel -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMSelectionDAG -lLLVMCodeGen -lLLVMTarget -lLLVMObjCARCOpts -lLLVMCodeGenTypes -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoBTF -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMFuzzerCLI -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTargetParser -lLLVMSupport -lLLVMDemangle -lz -lzstd -fstrip -fno-sanitize-thread -OReleaseFast -target x86_64-linux-gnu -mcpu native --dep aro --dep aro_translate_c --dep build_options -Mroot=/home/aron/zig-bootstrap3/zig/src/main.zig -Maro=/home/aron/zig-bootstrap3/zig/lib/compiler/aro/aro.zig --dep aro -Maro_translate_c=/home/aron/zig-bootstrap3/zig/lib/compiler/aro_translate_c.zig -Mbuild_options=/home/aron/zig-bootstrap3/zig/zig-cache/c/65e4a0582866b644b05507790a2e1015/options.zig -lc++ -lc --cache-dir /home/aron/zig-bootstrap3/zig/zig-cache --global-cache-dir /home/aron/.cache/zig --name zig -L /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/lib -I /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/include --listen=-
Build Summary: 283/286 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install zig transitive failure
   └─ zig build-exe zig ReleaseFast x86_64-linux-gnu 2 errors
error: the following build command failed with exit code 1:
/home/aron/zig-bootstrap3/zig/zig-cache/o/f66f2f63e4b7599879833c2a044540cf/build /home/aron/zig-bootstrap3/out/host/bin/zig /home/aron/zig-bootstrap3/zig /home/aron/zig-bootstrap3/zig/zig-cache /home/aron/.cache/zig --seed 0x75fd6b7 -Zef10d365d97678fe --prefix /home/aron/zig-bootstrap3/out/zig-x86_64-linux-gnu-native --search-prefix /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native -Dflat -Dstatic-llvm -Doptimize=ReleaseFast -Dstrip -Dtarget=x86_64-linux-gnu -Dcpu=native -Dversion-string=0.13.0-dev.69+a96b78c17

I am unable to provide more output, because tmux only saved the last ~2000 lines. But before this, there were other linker errors similar to this one (quite often they were about mallinfo2 versus mallinfo, but sometimes also other names):

error: ld.lld: undefined symbol: mallinfo2
    note: referenced by Process.cpp
    note:               Process.cpp.o:(llvm::sys::Process::GetMallocUsage()) in archive /home/aron/zig-bootstrap3/out/x86_64-linux-gnu-native/lib/libLLVMSupport.a
    note: did you mean: mallinfo
    note: defined in: /home/aron/.cache/zig/o/3a7edeb82d475eb11ce5c2b6937cbc20/libc.so.6

I have Xubuntu 22.04 with CMake 3.22.1, Ninja 1.10.1 and GCC 11.4.0.

@alexrp
Copy link
Member

alexrp commented Sep 22, 2024

Are you still able to reproduce this?

@alexrp
Copy link
Member

alexrp commented Oct 11, 2024

I can't reproduce this on x86_64 running Ubuntu 23.10.

I'll close this for now, but feel free to comment if it's still an issue, and I'll reopen.

@alexrp alexrp closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants