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

Undefined symbols while trying to build Zig stage3 with LLVM #22658

Open
ssmid opened this issue Jan 29, 2025 · 11 comments
Open

Undefined symbols while trying to build Zig stage3 with LLVM #22658

ssmid opened this issue Jan 29, 2025 · 11 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@ssmid
Copy link
Contributor

ssmid commented Jan 29, 2025

Zig Version

0.14.0 (master bf6ee7c Jan 27 10:53)

Steps to Reproduce and Observed Behavior

  • build llvm using system toolchain
  • build zig (master): cmake .. -DZIG_STATIC_LLVM=ON -DCMAKE_PREFIX_PATH="/home/ssmid/local/llvm19-assert" -DCMAKE_BUILD_TYPE=Release and make install
  • delete global and local cache
  • build zig (other branch, same commit) using previous zig build: /home/ssmid/zig/build-master/stage3/bin/zig build -p stage3 --search-prefix /home/ssmid/local/llvm19-assert --zig-lib-dir /home/ssmid/zig/lib -Dstatic-llvm -Duse-llvm=true -Doptimize=ReleaseFast
Output
+ /home/ssmid/zig/build-master/stage3/bin/zig build -p stage3 --search-prefix /home/ssmid/local/llvm19-assert --zig-lib-dir /home/ssmid/zig/lib -Dstatic-llvm -Duse-llvm=true -Doptimize=ReleaseFast
install
+- install zig
   +- zig build-exe zig ReleaseFast native 152 errors
error: ld.lld: undefined symbol: std::_V2::generic_category()
error: ld.lld: undefined symbol: std::__glibcxx_assert_fail(char const*, int, char const*, char const*)
error: ld.lld: undefined symbol: std::chrono::_V2::system_clock::now()
error: ld.lld: undefined symbol: std::__throw_length_error(char const*)
error: ld.lld: undefined symbol: std::_V2::system_category()
error: ld.lld: undefined symbol: std::__throw_system_error(int)
error: ld.lld: undefined symbol: llvm::raw_fd_ostream::raw_fd_ostream(llvm::StringRef, std::__1::error_code&, llvm::sys::fs::OpenFlags)
error: ld.lld: undefined symbol: llvm::PassBuilder::PassBuilder(llvm::TargetMachine*, llvm::PipelineTuningOptions, std::__1::optional<llvm::PGOOptions>, llvm::PassInstrumentationCallbacks*)
   error: ld.lld: undefined symbol: llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::__1::array<unsigned int, 5ul>*)
error: ld.lld: undefined symbol: llvm::LLVMContext::setDiagnosticHandler(std::__1::unique_ptr<llvm::DiagnosticHandler, std::__1::default_delete<llvm::DiagnosticHandler>>&&, bool)
error: ld.lld: undefined symbol: llvm::MemoryBuffer::getFile(llvm::Twine const&, bool, bool, bool, std::__1::optional<llvm::Align>)
error: ld.lld: undefined symbol: llvm::writeArchive(llvm::StringRef, llvm::ArrayRef<llvm::NewArchiveMember>, llvm::SymtabWritingMode, llvm::object::Archive::Kind, bool, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, std::__1::optional<bool>, llvm::function_ref<void (llvm::Error)>)
error: ld.lld: undefined symbol: llvm::SpecialCaseList::createOrDie(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, llvm::vfs::FileSystem&)
error: ld.lld: undefined symbol: std::__throw_bad_array_new_length()
error: ld.lld: undefined symbol: std::__throw_bad_function_call()
error: ld.lld: undefined symbol: std::_Rb_tree_decrement(std::_Rb_tree_node_base*)
error: ld.lld: undefined symbol: std::_Rb_tree_increment(std::_Rb_tree_node_base*)
error: ld.lld: undefined symbol: std::__once_callable
error: ld.lld: undefined symbol: std::__once_call
error: ld.lld: undefined symbol: __once_proxy
error: ld.lld: undefined symbol: std::__throw_logic_error(char const*)
error: ld.lld: undefined symbol: std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
error: ld.lld: undefined symbol: std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)
error: ld.lld: undefined symbol: llvm::opt::Arg::getAsString(llvm::opt::ArgList const&) const
error: ld.lld: undefined symbol: llvm::opt::OptTable::findNearest(llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, llvm::opt::Visibility, unsigned int, unsigned int) const
error: ld.lld: undefined symbol: llvm::Triple::normalize(llvm::StringRef)
error: ld.lld: undefined symbol: llvm::opt::ArgList::getAllArgValues(llvm::opt::OptSpecifier) const
error: ld.lld: undefined symbol: llvm::sys::getDefaultTargetTriple()
error: ld.lld: undefined symbol: llvm::TargetRegistry::lookupTarget(llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&)
error: ld.lld: undefined symbol: llvm::MemoryBuffer::getFileOrSTDIN(llvm::Twine const&, bool, bool, std::__1::optional<llvm::Align>)
error: ld.lld: undefined symbol: llvm::MCContext::addDebugPrefixMapEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
error: ld.lld: undefined symbol: llvm::Target::createAsmStreamer(llvm::MCContext&, std::__1::unique_ptr<llvm::formatted_raw_ostream, std::__1::default_delete<llvm::formatted_raw_ostream>>, llvm::MCInstPrinter*, std::__1::unique_ptr<llvm::MCCodeEmitter, std::__1::default_delete<llvm::MCCodeEmitter>>, std::__1::unique_ptr<llvm::MCAsmBackend, std::__1::default_delete<llvm::MCAsmBackend>>) const
error: ld.lld: undefined symbol: llvm::Target::createMCObjectStreamer(llvm::Triple const&, llvm::MCContext&, std::__1::unique_ptr<llvm::MCAsmBackend, std::__1::default_delete<llvm::MCAsmBackend>>, std::__1::unique_ptr<llvm::MCObjectWriter, std::__1::default_delete<llvm::MCObjectWriter>>, std::__1::unique_ptr<llvm::MCCodeEmitter, std::__1::default_delete<llvm::MCCodeEmitter>>, llvm::MCSubtargetInfo const&) const
error: ld.lld: undefined symbol: std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)
error: ld.lld: undefined symbol: llvm::sys::RemoveFileOnSignal(llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
error: ld.lld: undefined symbol: std::__throw_out_of_range_fmt(char const*, ...)
error: ld.lld: undefined symbol: std::_Sp_make_shared_tag::_S_eq(std::type_info const&)
error: ld.lld: undefined symbol: std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)
error: ld.lld: undefined symbol: std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)
error: ld.lld: undefined symbol: vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: vtable for std::basic_streambuf<char, std::char_traits<char>>
error: ld.lld: undefined symbol: std::ios_base::ios_base()
error: ld.lld: undefined symbol: vtable for std::basic_ios<char, std::char_traits<char>>
error: ld.lld: undefined symbol: VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: std::basic_ios<char, std::char_traits<char>>::init(std::basic_streambuf<char, std::char_traits<char>>*)
error: ld.lld: undefined symbol: std::locale::locale()
error: ld.lld: undefined symbol: std::basic_ostream<char, std::char_traits<char>>& std::__ostream_insert<char, std::char_traits<char>>(std::basic_ostream<char, std::char_traits<char>>&, char const*, long)
error: ld.lld: undefined symbol: std::locale::~locale()
error: ld.lld: undefined symbol: std::ios_base::~ios_base()
error: ld.lld: undefined symbol: std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)
error: ld.lld: undefined symbol: std::__detail::_List_node_base::_M_unhook()
error: ld.lld: undefined symbol: std::_V2::error_category::~error_category()
error: ld.lld: undefined symbol: std::__throw_bad_cast()
error: ld.lld: undefined symbol: VTT for std::basic_ifstream<char, std::char_traits<char>>
error: ld.lld: undefined symbol: vtable for std::basic_ifstream<char, std::char_traits<char>>
error: ld.lld: undefined symbol: std::basic_filebuf<char, std::char_traits<char>>::basic_filebuf()
error: ld.lld: undefined symbol: std::basic_filebuf<char, std::char_traits<char>>::open(char const*, std::_Ios_Openmode)
error: ld.lld: undefined symbol: std::basic_ios<char, std::char_traits<char>>::clear(std::_Ios_Iostate)
error: ld.lld: undefined symbol: std::basic_istream<char, std::char_traits<char>>& std::getline<char, std::char_traits<char>, std::allocator<char>>(std::basic_istream<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char)
error: ld.lld: undefined symbol: std::ctype<char>::_M_widen_init() const
error: ld.lld: undefined symbol: vtable for std::basic_filebuf<char, std::char_traits<char>>
error: ld.lld: undefined symbol: std::basic_filebuf<char, std::char_traits<char>>::close()
error: ld.lld: undefined symbol: std::__basic_file<char>::~__basic_file()
error: ld.lld: undefined symbol: std::_V2::error_category::_M_message[abi:cxx11](int) const
error: ld.lld: undefined symbol: std::_V2::error_category::default_error_condition(int) const
error: ld.lld: undefined symbol: std::_V2::error_category::equivalent(int, std::error_condition const&) const
error: ld.lld: undefined symbol: std::_V2::error_category::equivalent(std::error_code const&, int) const
error: ld.lld: undefined symbol: clang::CompilerInstance::CompilerInstance(std::__1::shared_ptr<clang::PCHContainerOperations>, clang::InMemoryModuleCache*)
error: ld.lld: undefined symbol: clang::CompilerInvocation::GetResourcesPath(char const*, void*)
error: ld.lld: undefined symbol: llvm::AArch64::printEnabledExtensions(std::__1::set<llvm::StringRef, std::__1::less<llvm::StringRef>, std::__1::allocator<llvm::StringRef>> const&)
error: ld.lld: undefined symbol: llvm::RISCVISAInfo::printEnabledExtensions(bool, std::__1::set<llvm::StringRef, std::__1::less<llvm::StringRef>, std::__1::allocator<llvm::StringRef>>&, llvm::StringMap<llvm::StringRef, llvm::MallocAllocator>&)
error: ld.lld: undefined symbol: llvm::createCFGSimplificationPass(llvm::SimplifyCFGOptions, std::__1::function<bool (llvm::Function const&)>)
error: ld.lld: undefined symbol: llvm::sys::fs::getMainExecutable(char const*, void*)
error: ld.lld: undefined symbol: llvm::sys::findProgramByName(llvm::StringRef, llvm::ArrayRef<llvm::StringRef>)
error: ld.lld: undefined symbol: llvm::toString(llvm::Error)
error: ld.lld: undefined symbol: llvm::sys::Process::GetEnv(llvm::StringRef)
error: ld.lld: undefined symbol: clang::driver::Driver::Driver(llvm::StringRef, llvm::StringRef, clang::DiagnosticsEngine&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>)
error: ld.lld: undefined symbol: clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&)
error: ld.lld: undefined symbol: llvm::sys::getProcessTriple()
error: ld.lld: undefined symbol: llvm::StringRef::lower() const
error: ld.lld: undefined symbol: llvm::sys::fs::setLastAccessAndModificationTime(int, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>)
error: ld.lld: undefined symbol: llvm::sys::path::convert_to_slash(llvm::StringRef, llvm::sys::path::Style)
error: ld.lld: undefined symbol: llvm::Twine::str() const
error: ld.lld: undefined symbol: llvm::computeArchiveRelativePath(llvm::StringRef, llvm::StringRef)
error: ld.lld: undefined symbol: llvm::object::Archive::Child::getFullName() const
error: ld.lld: undefined symbol: llvm::format_provider<std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>, void>::format(std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>> const&, llvm::raw_ostream&, llvm::StringRef)
error: ld.lld: undefined symbol: std::__basic_file<char>::is_open() const
error: ld.lld: undefined symbol: llvm::createPrintModulePass(llvm::raw_ostream&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool)
error: ld.lld: undefined symbol: llvm::createPrintFunctionPass(llvm::raw_ostream&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
error: ld.lld: undefined symbol: vtable for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: std::__throw_out_of_range(char const*)
error: ld.lld: undefined symbol: std::__throw_invalid_argument(char const*)
error: ld.lld: undefined symbol: std::random_device::_M_getval()
error: ld.lld: undefined symbol: std::chrono::_V2::steady_clock::now()
error: ld.lld: undefined symbol: std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
error: ld.lld: undefined symbol: std::random_device::_M_fini()
error: ld.lld: undefined symbol: std::basic_ifstream<char, std::char_traits<char>>::basic_ifstream(char const*, std::_Ios_Openmode)
error: ld.lld: undefined symbol: std::basic_ifstream<char, std::char_traits<char>>::~basic_ifstream()
error: ld.lld: undefined symbol: std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)
error: ld.lld: undefined symbol: std::ostream::write(char const*, long)
error: ld.lld: undefined symbol: std::ostream::operator<<(int)
error: ld.lld: undefined symbol: std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)
error: ld.lld: undefined symbol: std::basic_ostream<char, std::char_traits<char>>& std::operator<<<std::char_traits<char>>(std::basic_ostream<char, std::char_traits<char>>&, char)
error: ld.lld: undefined symbol: std::ostream::operator<<(short)
error: ld.lld: undefined symbol: std::ostream& std::ostream::_M_insert<double>(double)
error: ld.lld: undefined symbol: std::ostream& std::ostream::_M_insert<long>(long)
error: ld.lld: undefined symbol: std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char>>::str() const
error: ld.lld: undefined symbol: std::ostream::put(char)
error: ld.lld: undefined symbol: std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>::~basic_stringstream()
error: ld.lld: undefined symbol: std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const
error: ld.lld: undefined symbol: std::basic_ostream<char, std::char_traits<char>>& std::operator<<<std::char_traits<char>>(std::basic_ostream<char, std::char_traits<char>>&, char const*)
error: ld.lld: undefined symbol: clang::ASTUnit::LoadFromCommandLine(char const**, char const**, std::__1::shared_ptr<clang::PCHContainerOperations>, llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine>, llvm::StringRef, bool, llvm::StringRef, bool, clang::CaptureDiagsKind, llvm::ArrayRef<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::MemoryBuffer*>>, bool, unsigned int, clang::TranslationUnitKind, bool, bool, bool, clang::SkipFunctionBodiesScope, bool, bool, bool, bool, std::__1::optional<llvm::StringRef>, std::__1::unique_ptr<clang::ASTUnit, std::__1::default_delete<clang::ASTUnit>>*, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>)
error: ld.lld: undefined symbol: std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>::basic_ostringstream()
error: ld.lld: undefined symbol: std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const
error: ld.lld: undefined symbol: std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>::basic_stringstream()
error: ld.lld: undefined symbol: std::_Hash_bytes(void const*, unsigned long, unsigned long)
error: ld.lld: undefined symbol: std::thread::_State::~_State()
error: ld.lld: undefined symbol: std::condition_variable::notify_all()
error: ld.lld: undefined symbol: std::condition_variable::condition_variable()
error: ld.lld: undefined symbol: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State>>, void (*)())
error: ld.lld: undefined symbol: std::thread::detach()
error: ld.lld: undefined symbol: std::condition_variable::wait(std::unique_lock<std::mutex>&)
error: ld.lld: undefined symbol: std::condition_variable::~condition_variable()
error: ld.lld: undefined symbol: std::__throw_future_error(int)
error: ld.lld: undefined symbol: std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)
error: ld.lld: undefined symbol: std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long, std::ratio<1l, 1l>>, std::chrono::duration<long, std::ratio<1l, 1000000000l>>)
error: ld.lld: undefined symbol: std::__future_base::_Result_base::_Result_base()
error: ld.lld: undefined symbol: std::condition_variable::notify_one()
error: ld.lld: undefined symbol: std::thread::join()
error: ld.lld: undefined symbol: std::future_category()
error: ld.lld: undefined symbol: std::logic_error::logic_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
error: ld.lld: undefined symbol: vtable for std::future_error
error: ld.lld: undefined symbol: std::__exception_ptr::exception_ptr::_M_release()
error: ld.lld: undefined symbol: std::future_error::~future_error()
error: ld.lld: undefined symbol: std::__future_base::_Result_base::~_Result_base()
error: ld.lld: undefined symbol: std::ctype<char>::id
error: ld.lld: undefined symbol: std::locale::id::_M_id() const
error: ld.lld: undefined symbol: VTT for std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: vtable for std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>
error: ld.lld: undefined symbol: std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char>>::_M_sync(char*, unsigned long, unsigned long)
error: ld.lld: undefined symbol: std::istream& std::istream::_M_extract<long>(long&)
error: ld.lld: undefined symbol: std::__throw_regex_error(std::regex_constants::error_type)
error: ld.lld: undefined symbol: std::__cxx11::collate<char>::id
error: ld.lld: undefined symbol: std::locale::locale(std::locale const&)
error: ld.lld: undefined symbol: std::locale::operator=(std::locale const&)
error: ld.lld: undefined symbol: std::__exception_ptr::exception_ptr::_M_addref()
error: ld.lld: undefined symbol: std::rethrow_exception(std::__exception_ptr::exception_ptr)
error: ld.lld: undefined symbol: std::basic_iostream<char, std::char_traits<char>>::basic_iostream()
error: ld.lld: undefined symbol: std::ostream& std::ostream::_M_insert<unsigned long long>(unsigned long long)
error: ld.lld: undefined symbol: std::thread::hardware_concurrency()
error: the following command failed with 152 compilation errors:
/home/ssmid/zig/build-master/stage3/bin/zig build-exe -fllvm -flld --stack 48234496 -cflags -std=c++17 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-exceptions -fno-rtti -fno-stack-protector -fvisibility-inlines-hidden -Wno-type-limits -Wno-missing-braces -Wno-comment -DNDEBUG=1 -- /home/ssmid/zig/src/zig_llvm.cpp /home/ssmid/zig/src/zig_clang.cpp /home/ssmid/zig/src/zig_llvm-ar.cpp /home/ssmid/zig/src/zig_clang_driver.cpp /home/ssmid/zig/src/zig_clang_cc1_main.cpp /home/ssmid/zig/src/zig_clang_cc1as_main.cpp -lclangFrontendTool -lclangCodeGen -lclangFrontend -lclangDriver -lclangSerialization -lclangSema -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangAnalysis -lclangASTMatchers -lclangAST -lclangParse -lclangAPINotes -lclangBasic -lclangEdit -lclangLex -lclangARCMigrate -lclangRewriteFrontend -lclangRewrite -lclangCrossTU -lclangIndex -lclangToolingCore -lclangExtractAPI -lclangSupport -lclangInstallAPI -llldMinGW -llldELF -llldCOFF -llldWasm -llldMachO -llldCommon -lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMTextAPIBinaryReader -lLLVMCoverage -lLLVMLineEditor -lLLVMSandboxIR -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 -lLLVMOrcDebugging -lLLVMOrcJIT -lLLVMWindowsDriver -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMDWP -lLLVMDebugInfoLogicalView -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMObjCopy -lLLVMMCA -lLLVMMCDisassembler -lLLVMLTO -lLLVMPasses -lLLVMHipStdPar -lLLVMCFGuard -lLLVMCoroutines -lLLVMipo -lLLVMVectorize -lLLVMLinker -lLLVMInstrumentation -lLLVMFrontendOpenMP -lLLVMFrontendOffloading -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMFrontendDriver -lLLVMExtensions -lLLVMDWARFLinkerParallel -lLLVMDWARFLinkerClassic -lLLVMDWARFLinker -lLLVMCodeGenData -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 -fno-sanitize-thread -OReleaseFast --dep aro --dep aro_translate_c --dep build_options -Mroot=/home/ssmid/zig/src/main.zig -Maro=/home/ssmid/zig/lib/compiler/aro/aro.zig --dep aro -Maro_translate_c=/home/ssmid/zig/lib/compiler/aro_translate_c.zig -Mbuild_options=/home/ssmid/zig/.zig-cache/c/8c769902a91b78df41dd7fbd0bc62534/options.zig -lc++ -lc --cache-dir /home/ssmid/zig/.zig-cache --global-cache-dir /home/ssmid/.cache/zig --name zig -L /home/ssmid/local/llvm19-assert/lib -I /home/ssmid/local/llvm19-assert/include --zig-lib-dir /home/ssmid/zig/lib/ --listen=- 
Build Summary: 289/292 steps succeeded; 1 failed
install transitive failure
└─ install zig transitive failure
   └─ zig build-exe zig ReleaseFast native 152 errors
error: the following build command failed with exit code 1:
/home/ssmid/zig/.zig-cache/o/d15128a85ea1164bd9631b7b5f2f9028/build /home/ssmid/zig/build-master/stage3/bin/zig /home/ssmid/zig/lib /home/ssmid/zig /home/ssmid/zig/.zig-cache /home/ssmid/.cache/zig --seed 0x2a86a3de -Z020267583b753ce5 -p stage3 --search-prefix /home/ssmid/local/llvm19-assert -Dstatic-llvm -Duse-llvm=true -Doptimize=ReleaseFast

At least some if not all of the symbols are defined in the static libraries in ~/local/llvm19-assert. The previous zig build did also work with those libraries.

I'm getting more and more frustrated and I know 90% of the build complexities are caused by LLVM but isn't there a way to make the build process less error prone? I know, zig-bootstrap exists, but it also didn't work due to being out-of-date.

Expected Behavior

Working Zig compiler at stage3/

@ssmid ssmid added the bug Observed behavior contradicts documented or intended behavior label Jan 29, 2025
@ssmid ssmid changed the title Undefined symbols while trying to build Zig with LLVM Undefined symbols while trying to build Zig stage3 with LLVM Jan 29, 2025
@alexrp
Copy link
Member

alexrp commented Jan 29, 2025

This looks a bit like there's a mismatch between the libc++/libstdc++ used to build LLVM vs the one used to build libzigcpp.a, but I'm not sure on that.

Can you inspect ldd /home/ssmid/local/llvm19-assert/lib/libLLVM.so and ldd /home/ssmid/zig/build-master/stage3/bin/zig?

Alternatively, you could try doing a shared LLVM build. That means passing -DZIG_SHARED_LLVM=ON to CMake and passing -Denable-llvm (no -Dstatic-llvm) when building stage4.

Also:

-p stage3

Unless I'm misreading here, it looks like you're telling it to build into the same directory that you did the CMake build in. If so, that's not likely to go well in any case.

@ssmid
Copy link
Contributor Author

ssmid commented Jan 29, 2025

llvm19-assert/lib/libLLVM.so does not exist (neither does a static version of it)

@ssmid
Copy link
Contributor Author

ssmid commented Jan 29, 2025

The first build went into zig/build-master, the second into zig/stage3

@alexrp
Copy link
Member

alexrp commented Jan 29, 2025

llvm19-assert/lib/libLLVM.so does not exist (neither does a static version of it)

Wait, what does that directory look like then? Since you specified it as a search prefix, I'd expect /home/ssmid/local/llvm19-assert to have bin, lib, include, etc...


By the way, here are my (simplified) build steps in case it helps:

$ cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=/opt/llvm-19 -DCMAKE_INSTALL_PREFIX=debug -DZIG_SHARED_LLVM=ON -DZIG_NO_LIB=ON -DZIG_TARGET_MCPU=x86_64_v3
$ cmake --build build # build stage3
$ ./debug/bin/zig -Dno-lib -Denable-llvm # build stage4
$ ./zig-out/bin/zig -Dno-lib -Dno-bin -Dconfig_h=build/config.h -Denable-llvm test # run tests with stage4

@ssmid
Copy link
Contributor Author

ssmid commented Jan 29, 2025

llvm19-assert/lib
./libLTO.so.19.1
./libLLVMFrontendOffloading.a
./libLLVMOption.a
./libLLVMHexagonAsmParser.a
./libLLVMMSP430Disassembler.a
./libclangCodeGen.a
./libLLVMHexagonDesc.a
./libLLVMLanaiInfo.a
./libLLVMAArch64CodeGen.a
./libLLVMSymbolize.a
./libLLVMMIRParser.a
./libLLVMSparcDisassembler.a
./libLLVMAsmParser.a
./libLLVMNVPTXDesc.a
./libLLVMCFGuard.a
./libclangIndex.a
./cmake
./cmake/lld
./cmake/lld/LLDConfigVersion.cmake
./cmake/lld/LLDTargets-release.cmake
./cmake/lld/LLDConfig.cmake
./cmake/lld/LLDTargets.cmake
./cmake/clang
./cmake/clang/AddClang.cmake
./cmake/clang/ClangTargets.cmake
./cmake/clang/ClangTargets-release.cmake
./cmake/clang/ClangConfigVersion.cmake
./cmake/clang/ClangConfig.cmake
./cmake/llvm
./cmake/llvm/HandleLLVMOptions.cmake
./cmake/llvm/UseLibtool.cmake
./cmake/llvm/FindLibEdit.cmake
./cmake/llvm/AddOCaml.cmake
./cmake/llvm/LLVMExports-release.cmake
./cmake/llvm/LLVMInstallSymlink.cmake
./cmake/llvm/llvm-driver-template.cpp.in
./cmake/llvm/GetLibraryName.cmake
./cmake/llvm/GetErrcMessages.cmake
./cmake/llvm/GenerateVersionFromVCS.cmake
./cmake/llvm/FindLibpfm.cmake
./cmake/llvm/LLVM-Config.cmake
./cmake/llvm/CheckAtomic.cmake
./cmake/llvm/CheckCompilerVersion.cmake
./cmake/llvm/LLVMConfigExtensions.cmake
./cmake/llvm/TableGen.cmake
./cmake/llvm/CoverageReport.cmake
./cmake/llvm/LLVMExternalProjectUtils.cmake
./cmake/llvm/Findzstd.cmake
./cmake/llvm/LLVM-Build.cmake
./cmake/llvm/CheckProblematicConfigurations.cmake
./cmake/llvm/FindZ3.cmake
./cmake/llvm/AddLLVM.cmake
./cmake/llvm/FindOCaml.cmake
./cmake/llvm/AddSphinxTarget.cmake
./cmake/llvm/VersionFromVCS.cmake
./cmake/llvm/LLVMConfig.cmake
./cmake/llvm/FindSphinx.cmake
./cmake/llvm/LLVMCheckLinkerFlag.cmake
./cmake/llvm/LLVMConfigVersion.cmake
./cmake/llvm/HandleLLVMStdlib.cmake
./cmake/llvm/FindFFI.cmake
./cmake/llvm/CrossCompile.cmake
./cmake/llvm/DetermineGCCCompatible.cmake
./cmake/llvm/LLVMExports.cmake
./cmake/llvm/LLVMProcessSources.cmake
./cmake/llvm/LLVMDistributionSupport.cmake
./cmake/llvm/TensorFlowCompile.cmake
./libLLVMXCoreInfo.a
./libLLVMDebugInfoGSYM.a
./libLLVMCoroutines.a
./libLLVMTextAPIBinaryReader.a
./libLLVMLoongArchCodeGen.a
./libLLVMipo.a
./libLLVMAVRAsmParser.a
./libLLVMLibDriver.a
./libclangBasic.a
./libLLVMObjectYAML.a
./libLLVMAVRInfo.a
./libLLVMMCDisassembler.a
./libclangAnalysis.a
./libLLVMIRPrinter.a
./libLLVMBitWriter.a
./liblldELF.a
./libLLVMDebuginfod.a
./libLLVMSandboxIR.a
./libLLVMBPFDesc.a
./libLLVMCFIVerify.a
./libLLVMLoongArchDisassembler.a
./libclang.so.19.1
./libclangLex.a
./libLLVMHexagonDisassembler.a
./libLLVMExegesisX86.a
./libLLVMTargetParser.a
./libclangTooling.a
./libLLVMARMUtils.a
./libclangSupport.a
./libLLVMHexagonCodeGen.a
./libLLVMVEDisassembler.a
./libLLVMAVRCodeGen.a
./libLLVMWebAssemblyAsmParser.a
./libLLVMMSP430CodeGen.a
./libLLVMDlltoolDriver.a
./libLLVMHexagonInfo.a
./libLLVMTableGen.a
./libclangDirectoryWatcher.a
./libLLVMBPFCodeGen.a
./libLLVMMSP430AsmParser.a
./libLLVMInstCombine.a
./libLLVMXCoreDisassembler.a
./libLLVMDebugInfoLogicalView.a
./libclang-cpp.so
./libLLVMRemarks.a
./libear
./libear/config.h.in
./libear/__init__.py
./libear/ear.c
./libLLVMX86TargetMCA.a
./libLLVMAMDGPUUtils.a
./libLLVMObjCARCOpts.a
./libLLVMPowerPCDisassembler.a
./libLLVMAMDGPUTargetMCA.a
./libLLVMLoongArchAsmParser.a
./libclangParse.a
./liblldWasm.a
./libLLVMFrontendHLSL.a
./libLLVMX86Disassembler.a
./libLLVMXRay.a
./libLLVMFrontendOpenACC.a
./libLLVMMipsDesc.a
./libLLVMSystemZDesc.a
./clang
./clang/19
./clang/19/include
./clang/19/include/avx512vlvbmi2intrin.h
./clang/19/include/__stddef_max_align_t.h
./clang/19/include/mm_malloc.h
./clang/19/include/riscv_vector.h
./clang/19/include/__stdarg___gnuc_va_list.h
./clang/19/include/lzcntintrin.h
./clang/19/include/opencl-c.h
./clang/19/include/cetintrin.h
./clang/19/include/avx2intrin.h
./clang/19/include/xsavesintrin.h
./clang/19/include/sifive_vector.h
./clang/19/include/__clang_hip_runtime_wrapper.h
./clang/19/include/avx512fintrin.h
./clang/19/include/stddef.h
./clang/19/include/popcntintrin.h
./clang/19/include/vadefs.h
./clang/19/include/avx512vpopcntdqvlintrin.h
./clang/19/include/stdckdint.h
./clang/19/include/htmxlintrin.h
./clang/19/include/cpuid.h
./clang/19/include/arm_vector_types.h
./clang/19/include/sm3intrin.h
./clang/19/include/avx512bf16intrin.h
./clang/19/include/mm3dnow.h
./clang/19/include/__clang_cuda_device_functions.h
./clang/19/include/avxvnniintrin.h
./clang/19/include/__clang_cuda_intrinsics.h
./clang/19/include/__clang_hip_math.h
./clang/19/include/intrin0.h
./clang/19/include/stdalign.h
./clang/19/include/ptrauth.h
./clang/19/include/__clang_cuda_libdevice_declares.h
./clang/19/include/avx512vlvnniintrin.h
./clang/19/include/usermsrintrin.h
./clang/19/include/avx512vlintrin.h
./clang/19/include/arm_neon_sve_bridge.h
./clang/19/include/sgxintrin.h
./clang/19/include/xmmintrin.h
./clang/19/include/avx512fp16intrin.h
./clang/19/include/arm_sme.h
./clang/19/include/iso646.h
./clang/19/include/rdseedintrin.h
./clang/19/include/avx512vlbitalgintrin.h
./clang/19/include/velintrin.h
./clang/19/include/tmmintrin.h
./clang/19/include/avxvnniint8intrin.h
./clang/19/include/hexagon_circ_brev_intrinsics.h
./clang/19/include/prfchwintrin.h
./clang/19/include/avxvnniint16intrin.h
./clang/19/include/uintrintrin.h
./clang/19/include/avx512vp2intersectintrin.h
./clang/19/include/cmpccxaddintrin.h
./clang/19/include/avx512vlcdintrin.h
./clang/19/include/__clang_cuda_math_forward_declares.h
./clang/19/include/ptwriteintrin.h
./clang/19/include/hresetintrin.h
./clang/19/include/x86intrin.h
./clang/19/include/xsavecintrin.h
./clang/19/include/immintrin.h
./clang/19/include/emmintrin.h
./clang/19/include/ppc_wrappers
./clang/19/include/ppc_wrappers/mm_malloc.h
./clang/19/include/ppc_wrappers/xmmintrin.h
./clang/19/include/ppc_wrappers/tmmintrin.h
./clang/19/include/ppc_wrappers/x86intrin.h
./clang/19/include/ppc_wrappers/immintrin.h
./clang/19/include/ppc_wrappers/emmintrin.h
./clang/19/include/ppc_wrappers/bmi2intrin.h
./clang/19/include/ppc_wrappers/x86gprintrin.h
./clang/19/include/ppc_wrappers/smmintrin.h
./clang/19/include/ppc_wrappers/nmmintrin.h
./clang/19/include/ppc_wrappers/pmmintrin.h
./clang/19/include/ppc_wrappers/bmiintrin.h
./clang/19/include/ppc_wrappers/mmintrin.h
./clang/19/include/serializeintrin.h
./clang/19/include/velintrin_approx.h
./clang/19/include/__stddef_wint_t.h
./clang/19/include/limits.h
./clang/19/include/bmi2intrin.h
./clang/19/include/__stddef_unreachable.h
./clang/19/include/avx512dqintrin.h
./clang/19/include/arm_fp16.h
./clang/19/include/__stdarg___va_copy.h
./clang/19/include/llvm_libc_wrappers
./clang/19/include/llvm_libc_wrappers/time.h
./clang/19/include/llvm_libc_wrappers/stdlib.h
./clang/19/include/llvm_libc_wrappers/assert.h
./clang/19/include/llvm_libc_wrappers/ctype.h
./clang/19/include/llvm_libc_wrappers/stdio.h
./clang/19/include/llvm_libc_wrappers/string.h
./clang/19/include/llvm_libc_wrappers/inttypes.h
./clang/19/include/adcintrin.h
./clang/19/include/avx512vlbwintrin.h
./clang/19/include/amxcomplexintrin.h
./clang/19/include/clzerointrin.h
./clang/19/include/arm_cmse.h
./clang/19/include/__stddef_wchar_t.h
./clang/19/include/fma4intrin.h
./clang/19/include/module.modulemap
./clang/19/include/fmaintrin.h
./clang/19/include/lwpintrin.h
./clang/19/include/riscv_crypto.h
./clang/19/include/arm_mve.h
./clang/19/include/wmmintrin.h
./clang/19/include/__stddef_rsize_t.h
./clang/19/include/avx512vlvp2intersectintrin.h
./clang/19/include/avx512vnniintrin.h
./clang/19/include/vpclmulqdqintrin.h
./clang/19/include/__stddef_ptrdiff_t.h
./clang/19/include/avx512vbmivlintrin.h
./clang/19/include/__wmmintrin_pclmul.h
./clang/19/include/f16cintrin.h
./clang/19/include/xsaveintrin.h
./clang/19/include/varargs.h
./clang/19/include/arm_bf16.h
./clang/19/include/avx512bitalgintrin.h
./clang/19/include/stdatomic.h
./clang/19/include/keylockerintrin.h
./clang/19/include/avxintrin.h
./clang/19/include/sha512intrin.h
./clang/19/include/avx512vlbf16intrin.h
./clang/19/include/lsxintrin.h
./clang/19/include/amxfp16intrin.h
./clang/19/include/__clang_hip_cmath.h
./clang/19/include/hexagon_types.h
./clang/19/include/__stdarg_va_arg.h
./clang/19/include/hexagon_protos.h
./clang/19/include/__stdarg_va_list.h
./clang/19/include/__stdarg_va_copy.h
./clang/19/include/lasxintrin.h
./clang/19/include/invpcidintrin.h
./clang/19/include/unwind.h
./clang/19/include/__stddef_null.h
./clang/19/include/mwaitxintrin.h
./clang/19/include/avx512ifmavlintrin.h
./clang/19/include/htmintrin.h
./clang/19/include/arm_neon.h
./clang/19/include/cuda_wrappers
./clang/19/include/cuda_wrappers/new
./clang/19/include/cuda_wrappers/bits
./clang/19/include/cuda_wrappers/bits/shared_ptr_base.h
./clang/19/include/cuda_wrappers/bits/basic_string.h
./clang/19/include/cuda_wrappers/bits/basic_string.tcc
./clang/19/include/cuda_wrappers/cmath
./clang/19/include/cuda_wrappers/algorithm
./clang/19/include/cuda_wrappers/complex
./clang/19/include/__clang_cuda_texture_intrinsics.h
./clang/19/include/avx512vlfp16intrin.h
./clang/19/include/x86gprintrin.h
./clang/19/include/stdint.h
./clang/19/include/__clang_cuda_builtin_vars.h
./clang/19/include/__stddef_nullptr_t.h
./clang/19/include/stdarg.h
./clang/19/include/gfniintrin.h
./clang/19/include/__clang_cuda_complex_builtins.h
./clang/19/include/smmintrin.h
./clang/19/include/wbnoinvdintrin.h
./clang/19/include/avx512vbmiintrin.h
./clang/19/include/wasm_simd128.h
./clang/19/include/__stdarg_header_macro.h
./clang/19/include/nmmintrin.h
./clang/19/include/__clang_cuda_math.h
./clang/19/include/pconfigintrin.h
./clang/19/include/tgmath.h
./clang/19/include/clflushoptintrin.h
./clang/19/include/crc32intrin.h
./clang/19/include/clwbintrin.h
./clang/19/include/xsaveoptintrin.h
./clang/19/include/riscv_bitmanip.h
./clang/19/include/xopintrin.h
./clang/19/include/avx512vbmi2intrin.h
./clang/19/include/avx512ifmaintrin.h
./clang/19/include/tbmintrin.h
./clang/19/include/arm_acle.h
./clang/19/include/pmmintrin.h
./clang/19/include/ammintrin.h
./clang/19/include/altivec.h
./clang/19/include/intrin.h
./clang/19/include/raointintrin.h
./clang/19/include/msa.h
./clang/19/include/bmiintrin.h
./clang/19/include/armintr.h
./clang/19/include/riscv_ntlh.h
./clang/19/include/fxsrintrin.h
./clang/19/include/__stddef_size_t.h
./clang/19/include/rtmintrin.h
./clang/19/include/ia32intrin.h
./clang/19/include/movdirintrin.h
./clang/19/include/zos_wrappers
./clang/19/include/zos_wrappers/builtins.h
./clang/19/include/__clang_hip_stdlib.h
./clang/19/include/float.h
./clang/19/include/opencl-c-base.h
./clang/19/include/__clang_hip_libdevice_declares.h
./clang/19/include/pkuintrin.h
./clang/19/include/hvx_hexagon_protos.h
./clang/19/include/avxifmaintrin.h
./clang/19/include/avx512cdintrin.h
./clang/19/include/sm4intrin.h
./clang/19/include/enqcmdintrin.h
./clang/19/include/adxintrin.h
./clang/19/include/vaesintrin.h
./clang/19/include/vecintrin.h
./clang/19/include/avx512vldqintrin.h
./clang/19/include/xtestintrin.h
./clang/19/include/stdnoreturn.h
./clang/19/include/stdbool.h
./clang/19/include/avx512bwintrin.h
./clang/19/include/s390intrin.h
./clang/19/include/cet.h
./clang/19/include/tsxldtrkintrin.h
./clang/19/include/velintrin_gen.h
./clang/19/include/arm64intr.h
./clang/19/include/__clang_cuda_cmath.h
./clang/19/include/arm_cde.h
./clang/19/include/shaintrin.h
./clang/19/include/arm_sve.h
./clang/19/include/cldemoteintrin.h
./clang/19/include/avx512vpopcntdqintrin.h
./clang/19/include/inttypes.h
./clang/19/include/amxintrin.h
./clang/19/include/waitpkgintrin.h
./clang/19/include/mmintrin.h
./clang/19/include/__stddef_header_macro.h
./clang/19/include/rdpruintrin.h
./clang/19/include/yvals_core.h
./clang/19/include/larchintrin.h
./clang/19/include/avxneconvertintrin.h
./clang/19/include/prfchiintrin.h
./clang/19/include/builtins.h
./clang/19/include/__clang_cuda_runtime_wrapper.h
./clang/19/include/openmp_wrappers
./clang/19/include/openmp_wrappers/complex_cmath.h
./clang/19/include/openmp_wrappers/new
./clang/19/include/openmp_wrappers/complex.h
./clang/19/include/openmp_wrappers/math.h
./clang/19/include/openmp_wrappers/cmath
./clang/19/include/openmp_wrappers/__clang_openmp_device_functions.h
./clang/19/include/openmp_wrappers/complex
./clang/19/include/__stddef_offsetof.h
./clang/19/include/__wmmintrin_aes.h
./libLLVMRISCVDesc.a
./libLLVMBPFAsmParser.a
./libclangHandleLLVM.a
./libclangIndexSerialization.a
./libscanbuild
./libscanbuild/report.py
./libscanbuild/shell.py
./libscanbuild/arguments.py
./libscanbuild/clang.py
./libscanbuild/compilation.py
./libscanbuild/resources
./libscanbuild/resources/sorttable.js
./libscanbuild/resources/scanview.css
./libscanbuild/resources/selectable.js
./libscanbuild/__init__.py
./libscanbuild/analyze.py
./libscanbuild/intercept.py
./libLLVMAVRDesc.a
./libLLVMAArch64AsmParser.a
./libclangToolingInclusions.a
./libLLVMCodeGenData.a
./libLLVMMC.a
./libclangExtractAPI.a
./libLLVMTransformUtils.a
./libLLVMGlobalISel.a
./libclangSerialization.a
./libLLVMObjCopy.a
./libLLVMExegesisMips.a
./libLLVMJITLink.a
./libLLVMFrontendOpenMP.a
./libLLVMLoongArchInfo.a
./libLLVMARMDesc.a
./libclangFrontend.a
./libLLVMPowerPCAsmParser.a
./libLLVMBitReader.a
./libLLVMExecutionEngine.a
./libLLVMRISCVCodeGen.a
./libLLVMDebugInfoBTF.a
./libclangStaticAnalyzerFrontend.a
./libLLVMARMInfo.a
./libLLVMDebugInfoCodeView.a
./libLLVMMipsCodeGen.a
./libLLVMIRReader.a
./libLLVMVectorize.a
./libLLVMAMDGPUCodeGen.a
./libLLVMAMDGPUDisassembler.a
./libLLVMFuzzerCLI.a
./libLLVMWebAssemblyUtils.a
./liblldCOFF.a
./libLLVMLTO.a
./libRemarks.so
./libLLVMLanaiAsmParser.a
./libLLVMPowerPCInfo.a
./libLLVMCodeGen.a
./libLLVMOrcShared.a
./libclangHandleCXX.a
./libLLVMAVRDisassembler.a
./libclangDependencyScanning.a
./libLLVMScalarOpts.a
./libLLVMExegesisPowerPC.a
./libclangRewrite.a
./libLLVMDebugInfoMSF.a
./libLLVMAggressiveInstCombine.a
./libLLVMVECodeGen.a
./libLLVMMipsDisassembler.a
./libclangEdit.a
./libLLVMPowerPCDesc.a
./libLLVMAMDGPUAsmParser.a
./libLLVMMSP430Info.a
./libLLVMAArch64Desc.a
./libclangDynamicASTMatchers.a
./libLLVMWebAssemblyCodeGen.a
./libLLVMLanaiDesc.a
./liblldCommon.a
./libLLVMDWP.a
./libclangAnalysisFlowSensitive.a
./libLLVMCoverage.a
./libLLVMExegesis.a
./libLLVMSystemZCodeGen.a
./libLLVMInstrumentation.a
./libLLVMOrcDebugging.a
./libclangInterpreter.a
./libLLVMMipsInfo.a
./libclangDriver.a
./libLLVMARMDisassembler.a
./libclangStaticAnalyzerCore.a
./libLLVMSelectionDAG.a
./libclangSema.a
./libLLVMNVPTXCodeGen.a
./libLLVMAsmPrinter.a
./libLLVMX86AsmParser.a
./libLTO.so
./libclangInstallAPI.a
./libLLVMSparcCodeGen.a
./libLLVMARMCodeGen.a
./libLLVMRISCVTargetMCA.a
./libLLVMMCA.a
./libLLVMBPFInfo.a
./libLLVMARMAsmParser.a
./libLLVMProfileData.a
./libLLVMLoongArchDesc.a
./libLLVMX86Info.a
./libLLVMMipsAsmParser.a
./libclangASTMatchers.a
./libLLVMXCoreCodeGen.a
./libclangAPINotes.a
./libLLVMNVPTXInfo.a
./libLLVMWindowsManifest.a
./libLLVMDebugInfoPDB.a
./libclangCrossTU.a
./libLLVMPowerPCCodeGen.a
./libLLVMPasses.a
./libclangToolingInclusionsStdlib.a
./libLLVMFileCheck.a
./libLLVMDWARFLinkerParallel.a
./libLLVMRISCVInfo.a
./libLLVMDiff.a
./libLLVMX86Desc.a
./libLLVMAArch64Info.a
./libclangRewriteFrontend.a
./libclang.so
./libLLVMInterpreter.a
./libLLVMMCJIT.a
./libLLVMXCoreDesc.a
./libclangStaticAnalyzerCheckers.a
./libLLVMOptDriver.a
./libLLVMMSP430Desc.a
./libLLVMDWARFLinker.a
./libLLVMFrontendDriver.a
./libLLVMAMDGPUInfo.a
./libLLVMSystemZDisassembler.a
./libLLVMWebAssemblyDisassembler.a
./libLLVMTarget.a
./libLLVMVEDesc.a
./libLLVMSparcDesc.a
./libclangToolingASTDiff.a
./a.out
./libLLVMBinaryFormat.a
./libLLVMMCParser.a
./libLLVMSparcAsmParser.a
./libLLVMRISCVAsmParser.a
./libclang-cpp.so.19.1
./libLLVMLanaiCodeGen.a
./libLLVMRISCVDisassembler.a
./libclangToolingSyntax.a
./libLLVMAnalysis.a
./libLLVMDWARFLinkerClassic.a
./libLLVMLanaiDisassembler.a
./libLLVMObject.a
./libclangAST.a
./libLLVMSupport.a
./libclangFrontendTool.a
./libLLVMLineEditor.a
./libLLVMLinker.a
./libLLVMSystemZInfo.a
./liblldMinGW.a
./libLLVMFuzzMutate.a
./libLLVMInterfaceStub.a
./libLLVMRuntimeDyld.a
./libLLVMVEAsmParser.a
./libclangAnalysisFlowSensitiveModels.a
./libLLVMExtensions.a
./libLLVMHipStdPar.a
./libLLVMExegesisAArch64.a
./libLLVMWebAssemblyDesc.a
./libLLVMVEInfo.a
./libLLVMWindowsDriver.a
./libclang.so.19.1.7
./libclangToolingRefactoring.a
./libclangToolingCore.a
./libLLVMTableGenCommon.a
./libLLVMX86CodeGen.a
./libLLVMAArch64Utils.a
./libclangTransformer.a
./libLLVMBitstreamReader.a
./libclangARCMigrate.a
./liblldMachO.a
./libLLVMSystemZAsmParser.a
./libLLVMCodeGenTypes.a
./libLLVMAMDGPUDesc.a
./libLLVMSparcInfo.a
./libLLVMOrcTargetProcess.a
./libRemarks.so.19.1
./libLLVMDemangle.a
./libLLVMCore.a
./libLLVMDebugInfoDWARF.a
./libLLVMTableGenBasic.a
./libLLVMWebAssemblyInfo.a
./libLLVMTextAPI.a
./libLLVMAArch64Disassembler.a
./libclangFormat.a
./libLLVMBPFDisassembler.a
./libLLVMOrcJIT.a

@ssmid
Copy link
Contributor Author

ssmid commented Jan 29, 2025

llvm19-assert/ (max depth 3)
./libexec
./libexec/analyze-cc
./libexec/analyze-c++
./libexec/ccc-analyzer
./libexec/intercept-cc
./libexec/intercept-c++
./libexec/c++-analyzer
./lib
./lib/libLTO.so.19.1
./lib/libLLVMFrontendOffloading.a
./lib/libLLVMOption.a
./lib/libLLVMHexagonAsmParser.a
./lib/libLLVMMSP430Disassembler.a
./lib/libclangCodeGen.a
./lib/libLLVMHexagonDesc.a
./lib/libLLVMLanaiInfo.a
./lib/libLLVMAArch64CodeGen.a
./lib/libLLVMSymbolize.a
./lib/libLLVMMIRParser.a
./lib/libLLVMSparcDisassembler.a
./lib/libLLVMAsmParser.a
./lib/libLLVMNVPTXDesc.a
./lib/libLLVMCFGuard.a
./lib/libclangIndex.a
./lib/cmake
./lib/cmake/lld
./lib/cmake/clang
./lib/cmake/llvm
./lib/libLLVMXCoreInfo.a
./lib/libLLVMDebugInfoGSYM.a
./lib/libLLVMCoroutines.a
./lib/libLLVMTextAPIBinaryReader.a
./lib/libLLVMLoongArchCodeGen.a
./lib/libLLVMipo.a
./lib/libLLVMAVRAsmParser.a
./lib/libLLVMLibDriver.a
./lib/libclangBasic.a
./lib/libLLVMObjectYAML.a
./lib/libLLVMAVRInfo.a
./lib/libLLVMMCDisassembler.a
./lib/libclangAnalysis.a
./lib/libLLVMIRPrinter.a
./lib/libLLVMBitWriter.a
./lib/liblldELF.a
./lib/libLLVMDebuginfod.a
./lib/libLLVMSandboxIR.a
./lib/libLLVMBPFDesc.a
./lib/libLLVMCFIVerify.a
./lib/libLLVMLoongArchDisassembler.a
./lib/libclang.so.19.1
./lib/libclangLex.a
./lib/libLLVMHexagonDisassembler.a
./lib/libLLVMExegesisX86.a
./lib/libLLVMTargetParser.a
./lib/libclangTooling.a
./lib/libLLVMARMUtils.a
./lib/libclangSupport.a
./lib/libLLVMHexagonCodeGen.a
./lib/libLLVMVEDisassembler.a
./lib/libLLVMAVRCodeGen.a
./lib/libLLVMWebAssemblyAsmParser.a
./lib/libLLVMMSP430CodeGen.a
./lib/libLLVMDlltoolDriver.a
./lib/libLLVMHexagonInfo.a
./lib/libLLVMTableGen.a
./lib/libclangDirectoryWatcher.a
./lib/libLLVMBPFCodeGen.a
./lib/libLLVMMSP430AsmParser.a
./lib/libLLVMInstCombine.a
./lib/libLLVMXCoreDisassembler.a
./lib/libLLVMDebugInfoLogicalView.a
./lib/libclang-cpp.so
./lib/libLLVMRemarks.a
./lib/libear
./lib/libear/config.h.in
./lib/libear/__init__.py
./lib/libear/ear.c
./lib/libLLVMX86TargetMCA.a
./lib/libLLVMAMDGPUUtils.a
./lib/libLLVMObjCARCOpts.a
./lib/libLLVMPowerPCDisassembler.a
./lib/libLLVMAMDGPUTargetMCA.a
./lib/libLLVMLoongArchAsmParser.a
./lib/libclangParse.a
./lib/liblldWasm.a
./lib/libLLVMFrontendHLSL.a
./lib/libLLVMX86Disassembler.a
./lib/libLLVMXRay.a
./lib/libLLVMFrontendOpenACC.a
./lib/libLLVMMipsDesc.a
./lib/libLLVMSystemZDesc.a
./lib/clang
./lib/clang/19
./lib/libLLVMRISCVDesc.a
./lib/libLLVMBPFAsmParser.a
./lib/libclangHandleLLVM.a
./lib/libclangIndexSerialization.a
./lib/libscanbuild
./lib/libscanbuild/report.py
./lib/libscanbuild/shell.py
./lib/libscanbuild/arguments.py
./lib/libscanbuild/clang.py
./lib/libscanbuild/compilation.py
./lib/libscanbuild/resources
./lib/libscanbuild/__init__.py
./lib/libscanbuild/analyze.py
./lib/libscanbuild/intercept.py
./lib/libLLVMAVRDesc.a
./lib/libLLVMAArch64AsmParser.a
./lib/libclangToolingInclusions.a
./lib/libLLVMCodeGenData.a
./lib/libLLVMMC.a
./lib/libclangExtractAPI.a
./lib/libLLVMTransformUtils.a
./lib/libLLVMGlobalISel.a
./lib/libclangSerialization.a
./lib/libLLVMObjCopy.a
./lib/libLLVMExegesisMips.a
./lib/libLLVMJITLink.a
./lib/libLLVMFrontendOpenMP.a
./lib/libLLVMLoongArchInfo.a
./lib/libLLVMARMDesc.a
./lib/libclangFrontend.a
./lib/libLLVMPowerPCAsmParser.a
./lib/libLLVMBitReader.a
./lib/libLLVMExecutionEngine.a
./lib/libLLVMRISCVCodeGen.a
./lib/libLLVMDebugInfoBTF.a
./lib/libclangStaticAnalyzerFrontend.a
./lib/libLLVMARMInfo.a
./lib/libLLVMDebugInfoCodeView.a
./lib/libLLVMMipsCodeGen.a
./lib/libLLVMIRReader.a
./lib/libLLVMVectorize.a
./lib/libLLVMAMDGPUCodeGen.a
./lib/libLLVMAMDGPUDisassembler.a
./lib/libLLVMFuzzerCLI.a
./lib/libLLVMWebAssemblyUtils.a
./lib/liblldCOFF.a
./lib/libLLVMLTO.a
./lib/libRemarks.so
./lib/libLLVMLanaiAsmParser.a
./lib/libLLVMPowerPCInfo.a
./lib/libLLVMCodeGen.a
./lib/libLLVMOrcShared.a
./lib/libclangHandleCXX.a
./lib/libLLVMAVRDisassembler.a
./lib/libclangDependencyScanning.a
./lib/libLLVMScalarOpts.a
./lib/libLLVMExegesisPowerPC.a
./lib/libclangRewrite.a
./lib/libLLVMDebugInfoMSF.a
./lib/libLLVMAggressiveInstCombine.a
./lib/libLLVMVECodeGen.a
./lib/libLLVMMipsDisassembler.a
./lib/libclangEdit.a
./lib/libLLVMPowerPCDesc.a
./lib/libLLVMAMDGPUAsmParser.a
./lib/libLLVMMSP430Info.a
./lib/libLLVMAArch64Desc.a
./lib/libclangDynamicASTMatchers.a
./lib/libLLVMWebAssemblyCodeGen.a
./lib/libLLVMLanaiDesc.a
./lib/liblldCommon.a
./lib/libLLVMDWP.a
./lib/libclangAnalysisFlowSensitive.a
./lib/libLLVMCoverage.a
./lib/libLLVMExegesis.a
./lib/libLLVMSystemZCodeGen.a
./lib/libLLVMInstrumentation.a
./lib/libLLVMOrcDebugging.a
./lib/libclangInterpreter.a
./lib/libLLVMMipsInfo.a
./lib/libclangDriver.a
./lib/libLLVMARMDisassembler.a
./lib/libclangStaticAnalyzerCore.a
./lib/libLLVMSelectionDAG.a
./lib/libclangSema.a
./lib/libLLVMNVPTXCodeGen.a
./lib/libLLVMAsmPrinter.a
./lib/libLLVMX86AsmParser.a
./lib/libLTO.so
./lib/libclangInstallAPI.a
./lib/libLLVMSparcCodeGen.a
./lib/libLLVMARMCodeGen.a
./lib/libLLVMRISCVTargetMCA.a
./lib/libLLVMMCA.a
./lib/libLLVMBPFInfo.a
./lib/libLLVMARMAsmParser.a
./lib/libLLVMProfileData.a
./lib/libLLVMLoongArchDesc.a
./lib/libLLVMX86Info.a
./lib/libLLVMMipsAsmParser.a
./lib/libclangASTMatchers.a
./lib/libLLVMXCoreCodeGen.a
./lib/libclangAPINotes.a
./lib/libLLVMNVPTXInfo.a
./lib/libLLVMWindowsManifest.a
./lib/libLLVMDebugInfoPDB.a
./lib/libclangCrossTU.a
./lib/libLLVMPowerPCCodeGen.a
./lib/libLLVMPasses.a
./lib/libclangToolingInclusionsStdlib.a
./lib/libLLVMFileCheck.a
./lib/libLLVMDWARFLinkerParallel.a
./lib/libLLVMRISCVInfo.a
./lib/libLLVMDiff.a
./lib/libLLVMX86Desc.a
./lib/libLLVMAArch64Info.a
./lib/libclangRewriteFrontend.a
./lib/libclang.so
./lib/libLLVMInterpreter.a
./lib/libLLVMMCJIT.a
./lib/libLLVMXCoreDesc.a
./lib/libclangStaticAnalyzerCheckers.a
./lib/libLLVMOptDriver.a
./lib/libLLVMMSP430Desc.a
./lib/libLLVMDWARFLinker.a
./lib/libLLVMFrontendDriver.a
./lib/libLLVMAMDGPUInfo.a
./lib/libLLVMSystemZDisassembler.a
./lib/libLLVMWebAssemblyDisassembler.a
./lib/libLLVMTarget.a
./lib/libLLVMVEDesc.a
./lib/libLLVMSparcDesc.a
./lib/libclangToolingASTDiff.a
./lib/a.out
./lib/libLLVMBinaryFormat.a
./lib/libLLVMMCParser.a
./lib/libLLVMSparcAsmParser.a
./lib/libLLVMRISCVAsmParser.a
./lib/libclang-cpp.so.19.1
./lib/libLLVMLanaiCodeGen.a
./lib/libLLVMRISCVDisassembler.a
./lib/libclangToolingSyntax.a
./lib/libLLVMAnalysis.a
./lib/libLLVMDWARFLinkerClassic.a
./lib/libLLVMLanaiDisassembler.a
./lib/libLLVMObject.a
./lib/libclangAST.a
./lib/libLLVMSupport.a
./lib/libclangFrontendTool.a
./lib/libLLVMLineEditor.a
./lib/libLLVMLinker.a
./lib/libLLVMSystemZInfo.a
./lib/liblldMinGW.a
./lib/libLLVMFuzzMutate.a
./lib/libLLVMInterfaceStub.a
./lib/libLLVMRuntimeDyld.a
./lib/libLLVMVEAsmParser.a
./lib/libclangAnalysisFlowSensitiveModels.a
./lib/libLLVMExtensions.a
./lib/libLLVMHipStdPar.a
./lib/libLLVMExegesisAArch64.a
./lib/libLLVMWebAssemblyDesc.a
./lib/libLLVMVEInfo.a
./lib/libLLVMWindowsDriver.a
./lib/libclang.so.19.1.7
./lib/libclangToolingRefactoring.a
./lib/libclangToolingCore.a
./lib/libLLVMTableGenCommon.a
./lib/libLLVMX86CodeGen.a
./lib/libLLVMAArch64Utils.a
./lib/libclangTransformer.a
./lib/libLLVMBitstreamReader.a
./lib/libclangARCMigrate.a
./lib/liblldMachO.a
./lib/libLLVMSystemZAsmParser.a
./lib/libLLVMCodeGenTypes.a
./lib/libLLVMAMDGPUDesc.a
./lib/libLLVMSparcInfo.a
./lib/libLLVMOrcTargetProcess.a
./lib/libRemarks.so.19.1
./lib/libLLVMDemangle.a
./lib/libLLVMCore.a
./lib/libLLVMDebugInfoDWARF.a
./lib/libLLVMTableGenBasic.a
./lib/libLLVMWebAssemblyInfo.a
./lib/libLLVMTextAPI.a
./lib/libLLVMAArch64Disassembler.a
./lib/libclangFormat.a
./lib/libLLVMBPFDisassembler.a
./lib/libLLVMOrcJIT.a
./share
./share/opt-viewer
./share/opt-viewer/opt-viewer.py
./share/opt-viewer/opt-diff.py
./share/opt-viewer/opt-stats.py
./share/opt-viewer/style.css
./share/opt-viewer/optrecord.py
./share/opt-viewer/optpmap.py
./share/scan-view
./share/scan-view/ScanView.py
./share/scan-view/Reporter.py
./share/scan-view/bugcatcher.ico
./share/scan-view/startfile.py
./share/clang
./share/clang/clang-rename.el
./share/clang/clang-format.el
./share/clang/clang-format-bbedit.applescript
./share/clang/bash-autocomplete.sh
./share/clang/clang-rename.py
./share/clang/clang-format-sublime.py
./share/clang/clang-format-diff.py
./share/clang/clang-format.py
./share/scan-build
./share/scan-build/sorttable.js
./share/scan-build/scanview.css
./share/man
./share/man/man1
./include
./include/clang-c
./include/clang-c/Rewrite.h
./include/clang-c/CXString.h
./include/clang-c/Documentation.h
./include/clang-c/FatalErrorHandler.h
./include/clang-c/BuildSystem.h
./include/clang-c/Platform.h
./include/clang-c/ExternC.h
./include/clang-c/CXSourceLocation.h
./include/clang-c/CXFile.h
./include/clang-c/Index.h
./include/clang-c/CXCompilationDatabase.h
./include/clang-c/CXErrorCode.h
./include/clang-c/CXDiagnostic.h
./include/lld
./include/lld/Common
./include/clang
./include/clang/Index
./include/clang/Lex
./include/clang/Sema
./include/clang/CodeGen
./include/clang/Testing
./include/clang/IndexSerialization
./include/clang/CrossTU
./include/clang/Tooling
./include/clang/FrontendTool
./include/clang/APINotes
./include/clang/ARCMigrate
./include/clang/Analysis
./include/clang/Frontend
./include/clang/DirectoryWatcher
./include/clang/Format
./include/clang/ASTMatchers
./include/clang/Edit
./include/clang/Interpreter
./include/clang/ExtractAPI
./include/clang/Basic
./include/clang/StaticAnalyzer
./include/clang/CIR
./include/clang/Config
./include/clang/Support
./include/clang/AST
./include/clang/Parse
./include/clang/Serialization
./include/clang/Rewrite
./include/clang/InstallAPI
./include/clang/Driver
./include/llvm
./include/llvm/FileCheck
./include/llvm/LinkAllIR.h
./include/llvm/TextAPI
./include/llvm/IRReader
./include/llvm/Demangle
./include/llvm/CodeGenData
./include/llvm/Remarks
./include/llvm/MC
./include/llvm/CodeGenTypes
./include/llvm/InterfaceStub
./include/llvm/CodeGen
./include/llvm/Testing
./include/llvm/PassAnalysisSupport.h
./include/llvm/LinkAllPasses.h
./include/llvm/Object
./include/llvm/Bitstream
./include/llvm/ObjCopy
./include/llvm/ObjectYAML
./include/llvm/Linker
./include/llvm/Bitcode
./include/llvm/LineEditor
./include/llvm/WindowsDriver
./include/llvm/Analysis
./include/llvm/Frontend
./include/llvm/PassInfo.h
./include/llvm/XRay
./include/llvm/SandboxIR
./include/llvm/DWP
./include/llvm/WindowsResource
./include/llvm/TableGen
./include/llvm/Passes
./include/llvm/ProfileData
./include/llvm/Transforms
./include/llvm/ADT
./include/llvm/Pass.h
./include/llvm/ToolDrivers
./include/llvm/MCA
./include/llvm/DWARFLinker
./include/llvm/TargetParser
./include/llvm/IR
./include/llvm/DebugInfo
./include/llvm/Option
./include/llvm/AsmParser
./include/llvm/PassRegistry.h
./include/llvm/LTO
./include/llvm/WindowsManifest
./include/llvm/Config
./include/llvm/ExecutionEngine
./include/llvm/Support
./include/llvm/Debuginfod
./include/llvm/BinaryFormat
./include/llvm/IRPrinter
./include/llvm/InitializePasses.h
./include/llvm/PassSupport.h
./include/llvm/Target
./include/llvm/FuzzMutate
./include/llvm-c
./include/llvm-c/ExecutionEngine.h
./include/llvm-c/Object.h
./include/llvm-c/Support.h
./include/llvm-c/Comdat.h
./include/llvm-c/OrcEE.h
./include/llvm-c/DisassemblerTypes.h
./include/llvm-c/Deprecated.h
./include/llvm-c/Linker.h
./include/llvm-c/DebugInfo.h
./include/llvm-c/Types.h
./include/llvm-c/IRReader.h
./include/llvm-c/TargetMachine.h
./include/llvm-c/LLJIT.h
./include/llvm-c/ErrorHandling.h
./include/llvm-c/BitReader.h
./include/llvm-c/Transforms
./include/llvm-c/LLJITUtils.h
./include/llvm-c/Analysis.h
./include/llvm-c/blake3.h
./include/llvm-c/Disassembler.h
./include/llvm-c/BitWriter.h
./include/llvm-c/Error.h
./include/llvm-c/ExternC.h
./include/llvm-c/Orc.h
./include/llvm-c/Core.h
./include/llvm-c/Target.h
./include/llvm-c/lto.h
./include/llvm-c/Remarks.h
./include/llvm-c/DataTypes.h
./bin
./bin/llvm-opt-report
./bin/lli
./bin/amdgpu-arch
./bin/llvm-tblgen
./bin/clang-rename
./bin/llvm-ml
./bin/llvm-lib
./bin/llvm-xray
./bin/llvm-dwarfdump
./bin/scan-build-py
./bin/llc
./bin/llvm-rtdyld
./bin/clang-cpp
./bin/lld
./bin/llvm-nm
./bin/llvm-addr2line
./bin/llvm-cov
./bin/llvm-debuginfod
./bin/clang-offload-packager
./bin/clang-scan-deps
./bin/clang-format
./bin/llvm-link
./bin/clang-nvlink-wrapper
./bin/llvm-readelf
./bin/clang-installapi
./bin/llvm-ifs
./bin/llvm-stress
./bin/llvm-lto
./bin/llvm-cvtres
./bin/llvm-dis
./bin/llvm-libtool-darwin
./bin/llvm-extract
./bin/scan-view
./bin/lld-link
./bin/llvm-dwarfutil
./bin/clang
./bin/llvm-otool
./bin/clang-tblgen
./bin/llvm-pdbutil
./bin/llvm-size
./bin/llvm-install-name-tool
./bin/llvm-strings
./bin/llvm-bitcode-strip
./bin/llvm-cxxdump
./bin/analyze-build
./bin/llvm-readtapi
./bin/llvm-lto2
./bin/llvm-symbolizer
./bin/clang-linker-wrapper
./bin/llvm-mca
./bin/c-index-test
./bin/llvm-readobj
./bin/clang-refactor
./bin/intercept-build
./bin/wasm-ld
./bin/hmaptool
./bin/llvm-exegesis
./bin/llvm-remarkutil
./bin/clang-repl
./bin/llvm-c-test
./bin/dsymutil
./bin/llvm-config
./bin/llvm-tli-checker
./bin/llvm-debuginfod-find
./bin/clang-check
./bin/llvm-rc
./bin/llvm-lipo
./bin/clang-19
./bin/llvm-ar
./bin/ld64.lld
./bin/llvm-strip
./bin/bugpoint
./bin/llvm-objcopy
./bin/sancov
./bin/llvm-cfi-verify
./bin/llvm-ranlib
./bin/llvm-cxxmap
./bin/llvm-dlltool
./bin/llvm-jitlink
./bin/llvm-sim
./bin/clang-cl
./bin/nvptx-arch
./bin/llvm-windres
./bin/llvm-mt
./bin/llvm-dwp
./bin/llvm-objdump
./bin/diagtool
./bin/verify-uselistorder
./bin/git-clang-format
./bin/llvm-debuginfo-analyzer
./bin/llvm-reduce
./bin/scan-build
./bin/clang++
./bin/llvm-profgen
./bin/llvm-modextract
./bin/llvm-split
./bin/reduce-chunk-list
./bin/sanstats
./bin/opt
./bin/llvm-cat
./bin/clang-offload-bundler
./bin/llvm-bcanalyzer
./bin/llvm-cxxfilt
./bin/clang-extdef-mapping
./bin/llvm-mc
./bin/llvm-diff
./bin/llvm-gsymutil
./bin/llvm-as
./bin/llvm-profdata
./bin/llvm-undname
./bin/ld.lld

@ssmid
Copy link
Contributor Author

ssmid commented Jan 29, 2025

First zig build seems to be successfully statically linked with LLVM:

build-master/stage3/bin/zig:     file format elf64-x86-64

Dynamic Section:
  RUNPATH              /home/ssmid/local/llvm19-assert/lib:/home/ssmid/local/llvm19-assert/lib
  NEEDED               libz.so.1
  NEEDED               libzstd.so.1
  NEEDED               libm.so.6
  NEEDED               libc.so.6
  NEEDED               ld-linux-x86-64.so.2
  FLAGS                0x0000000000000008
  FLAGS_1              0x0000000000000001
[...]

@alexrp
Copy link
Member

alexrp commented Jan 29, 2025

Ah, I guess you didn't build LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON. It's off by default; this is one of those fun LLVM idiosyncrasies that's buried in their developer documentation.

I guess you can do ldd libLTO.so instead; that should tell you roughly the same thing about libc++/libstdc++ as ldd libLLVM.so would have.

@ssmid
Copy link
Contributor Author

ssmid commented Jan 30, 2025

This is the output of ldd:

$ ldd libLTO.so
        linux-vdso.so.1 (0x00007ff916fd0000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007ff90e5a5000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007ff90e4c6000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ff90e200000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007ff90e111000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007ff90e498000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007ff90df20000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff916fd2000)
$ ldd ~/zig/build-master/stage3/bin/zig 
        linux-vdso.so.1 (0x000076fd48836000)
        libz.so.1 => /usr/lib/libz.so.1 (0x000076fd487d5000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x000076fd486f6000)
        libm.so.6 => /usr/lib/libm.so.6 (0x000076fd48607000)
        libc.so.6 => /usr/lib/libc.so.6 (0x000076fd48416000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000076fd48838000)

But I'm still confused about the problem. It looks like lld is not able to find the LLVM static libraries despite zig invoking itself with -L /home/ssmid/local/llvm19-assert/lib -I /home/ssmid/local/llvm19-assert/include.

@alexrp
Copy link
Member

alexrp commented Jan 30, 2025

It can find the static libraries AFAICT. The problem is that the mangled symbol names don't match because of differences between libc++ and libstdc++. Notice how all the undefined symbols involve some kind of std:: name (for some of them it's in the return type, which is not shown in the lld output).

What's happening here is that you (reasonably) built LLVM against libstdc++ as that's your system C++ standard library. But something is going wrong in the Zig build process where libc++ (presumably the one bundled with Zig) is somehow entering the picture. Probably has something to do with this being a static build.

Can you show the contents of build-master/config.h?


FWIW, one way of side-stepping this issue is to just build LLVM with zig cc/zig c++ as this would give you LLVM libraries linked against Zig's bundled libc++. However, if you go down the route of rebuilding LLVM anyway, then I would just strongly recommend using shared LLVM (-DLLVM_BUILD_LLVM_DYLIB=ON for LLVM; -DZIG_SHARED_LLVM=ON for Zig) instead as it results in faster linking and a smaller zig binary. Statically linking LLVM is only really helpful for distribution purposes.

@ssmid
Copy link
Contributor Author

ssmid commented Jan 30, 2025

I've got a working build with zig-bootstrap now, not sure if you want to leave this issue open (as I've been following the instructions on https://github.com/ziglang/zig/wiki/Building-Zig-From-Source and https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#release pretty closely, I imagine this could be a common issue).

Here's my config.h:

config.h
/*
 * Copyright (c) 2016 Andrew Kelley
 *
 * This file is part of zig, which is MIT licensed.
 * See http://opensource.org/licenses/MIT
 */

#ifndef ZIG_CONFIG_H
#define ZIG_CONFIG_H

// Used by zig0.cpp
#define ZIG_VERSION_MAJOR 0
#define ZIG_VERSION_MINOR 14
#define ZIG_VERSION_PATCH 0
#define ZIG_VERSION_STRING ""

// Used by build.zig for communicating build information to self hosted build.
#define ZIG_CLANG_LIBRARIES "/home/ssmid/local/llvm19-assert/lib/libclangFrontendTool.a;/home/ssmid/local/llvm19-assert/lib/libclangCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libclangFrontend.a;/home/ssmid/local/llvm19-assert/lib/libclangDriver.a;/home/ssmid/local/llvm19-assert/lib/libclangSerialization.a;/home/ssmid/local/llvm19-assert/lib/libclangSema.a;/home/ssmid/local/llvm19-assert/lib/libclangStaticAnalyzerFrontend.a;/home/ssmid/local/llvm19-assert/lib/libclangStaticAnalyzerCheckers.a;/home/ssmid/local/llvm19-assert/lib/libclangStaticAnalyzerCore.a;/home/ssmid/local/llvm19-assert/lib/libclangAnalysis.a;/home/ssmid/local/llvm19-assert/lib/libclangASTMatchers.a;/home/ssmid/local/llvm19-assert/lib/libclangAST.a;/home/ssmid/local/llvm19-assert/lib/libclangParse.a;/home/ssmid/local/llvm19-assert/lib/libclangSema.a;/home/ssmid/local/llvm19-assert/lib/libclangAPINotes.a;/home/ssmid/local/llvm19-assert/lib/libclangBasic.a;/home/ssmid/local/llvm19-assert/lib/libclangEdit.a;/home/ssmid/local/llvm19-assert/lib/libclangLex.a;/home/ssmid/local/llvm19-assert/lib/libclangARCMigrate.a;/home/ssmid/local/llvm19-assert/lib/libclangRewriteFrontend.a;/home/ssmid/local/llvm19-assert/lib/libclangRewrite.a;/home/ssmid/local/llvm19-assert/lib/libclangCrossTU.a;/home/ssmid/local/llvm19-assert/lib/libclangIndex.a;/home/ssmid/local/llvm19-assert/lib/libclangToolingCore.a;/home/ssmid/local/llvm19-assert/lib/libclangExtractAPI.a;/home/ssmid/local/llvm19-assert/lib/libclangSupport.a;/home/ssmid/local/llvm19-assert/lib/libclangInstallAPI.a;/home/ssmid/local/llvm19-assert/lib/libclangAST.a"
#define ZIG_CMAKE_BINARY_DIR "/home/ssmid/zig/build-master"
#define ZIG_CMAKE_PREFIX_PATH "/home/ssmid/local/llvm19-assert;"
#define ZIG_CMAKE_STATIC_LIBRARY_PREFIX "lib"
#define ZIG_CMAKE_STATIC_LIBRARY_SUFFIX ".a"
#define ZIG_CXX_COMPILER "/usr/bin/c++"
#define ZIG_CXX_COMPILER_ARG1 ""
#define ZIG_DIA_GUIDS_LIB ""
#define ZIG_LLD_INCLUDE_PATH "/home/ssmid/local/llvm19-assert/include"
#define ZIG_LLD_LIBRARIES "/home/ssmid/local/llvm19-assert/lib/liblldMinGW.a;/home/ssmid/local/llvm19-assert/lib/liblldELF.a;/home/ssmid/local/llvm19-assert/lib/liblldCOFF.a;/home/ssmid/local/llvm19-assert/lib/liblldWasm.a;/home/ssmid/local/llvm19-assert/lib/liblldMachO.a;/home/ssmid/local/llvm19-assert/lib/liblldCommon.a"
#define ZIG_LLVM_INCLUDE_PATH "/home/ssmid/local/llvm19-assert/include"
#define ZIG_LLVM_LIBRARIES "/home/ssmid/local/llvm19-assert/lib/libLLVMWindowsManifest.a;/home/ssmid/local/llvm19-assert/lib/libLLVMXRay.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLibDriver.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDlltoolDriver.a;/home/ssmid/local/llvm19-assert/lib/libLLVMTextAPIBinaryReader.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCoverage.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLineEditor.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSandboxIR.a;/home/ssmid/local/llvm19-assert/lib/libLLVMXCoreDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMXCoreCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMXCoreDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMXCoreInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMX86TargetMCA.a;/home/ssmid/local/llvm19-assert/lib/libLLVMX86Disassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMX86AsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMX86CodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMX86Desc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMX86Info.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWebAssemblyDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWebAssemblyAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWebAssemblyCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWebAssemblyUtils.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWebAssemblyDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWebAssemblyInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMVEDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMVEAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMVECodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMVEDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMVEInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSystemZDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSystemZAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSystemZCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSystemZDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSystemZInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSparcDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSparcAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSparcCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSparcDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSparcInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRISCVTargetMCA.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRISCVDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRISCVAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRISCVCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRISCVDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRISCVInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMPowerPCDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMPowerPCAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMPowerPCCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMPowerPCDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMPowerPCInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMNVPTXCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMNVPTXDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMNVPTXInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMSP430Disassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMSP430AsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMSP430CodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMSP430Desc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMSP430Info.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMipsDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMipsAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMipsCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMipsDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMipsInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLoongArchDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLoongArchAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLoongArchCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLoongArchDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLoongArchInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLanaiDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLanaiCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLanaiAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLanaiDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLanaiInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMHexagonDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMHexagonCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMHexagonAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMHexagonDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMHexagonInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBPFDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBPFAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBPFCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBPFDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBPFInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAVRDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAVRAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAVRCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAVRDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAVRInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMARMDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMARMAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMARMCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMARMDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMARMUtils.a;/home/ssmid/local/llvm19-assert/lib/libLLVMARMInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUTargetMCA.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUDesc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUUtils.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAMDGPUInfo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAArch64Disassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAArch64AsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAArch64CodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAArch64Desc.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAArch64Utils.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAArch64Info.a;/home/ssmid/local/llvm19-assert/lib/libLLVMOrcDebugging.a;/home/ssmid/local/llvm19-assert/lib/libLLVMOrcJIT.a;/home/ssmid/local/llvm19-assert/lib/libLLVMWindowsDriver.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMCJIT.a;/home/ssmid/local/llvm19-assert/lib/libLLVMJITLink.a;/home/ssmid/local/llvm19-assert/lib/libLLVMInterpreter.a;/home/ssmid/local/llvm19-assert/lib/libLLVMExecutionEngine.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRuntimeDyld.a;/home/ssmid/local/llvm19-assert/lib/libLLVMOrcTargetProcess.a;/home/ssmid/local/llvm19-assert/lib/libLLVMOrcShared.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDWP.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoLogicalView.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoGSYM.a;/home/ssmid/local/llvm19-assert/lib/libLLVMOption.a;/home/ssmid/local/llvm19-assert/lib/libLLVMObjectYAML.a;/home/ssmid/local/llvm19-assert/lib/libLLVMObjCopy.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMCA.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMCDisassembler.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLTO.a;/home/ssmid/local/llvm19-assert/lib/libLLVMPasses.a;/home/ssmid/local/llvm19-assert/lib/libLLVMHipStdPar.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCFGuard.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCoroutines.a;/home/ssmid/local/llvm19-assert/lib/libLLVMipo.a;/home/ssmid/local/llvm19-assert/lib/libLLVMVectorize.a;/home/ssmid/local/llvm19-assert/lib/libLLVMLinker.a;/home/ssmid/local/llvm19-assert/lib/libLLVMInstrumentation.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFrontendOpenMP.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFrontendOffloading.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFrontendOpenACC.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFrontendHLSL.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFrontendDriver.a;/home/ssmid/local/llvm19-assert/lib/libLLVMExtensions.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDWARFLinkerParallel.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDWARFLinkerClassic.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDWARFLinker.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCodeGenData.a;/home/ssmid/local/llvm19-assert/lib/libLLVMGlobalISel.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMIRParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAsmPrinter.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSelectionDAG.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCodeGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMTarget.a;/home/ssmid/local/llvm19-assert/lib/libLLVMObjCARCOpts.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCodeGenTypes.a;/home/ssmid/local/llvm19-assert/lib/libLLVMIRPrinter.a;/home/ssmid/local/llvm19-assert/lib/libLLVMInterfaceStub.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFileCheck.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFuzzMutate.a;/home/ssmid/local/llvm19-assert/lib/libLLVMScalarOpts.a;/home/ssmid/local/llvm19-assert/lib/libLLVMInstCombine.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAggressiveInstCombine.a;/home/ssmid/local/llvm19-assert/lib/libLLVMTransformUtils.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBitWriter.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAnalysis.a;/home/ssmid/local/llvm19-assert/lib/libLLVMProfileData.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSymbolize.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoBTF.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoPDB.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoMSF.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoDWARF.a;/home/ssmid/local/llvm19-assert/lib/libLLVMObject.a;/home/ssmid/local/llvm19-assert/lib/libLLVMTextAPI.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMCParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMIRReader.a;/home/ssmid/local/llvm19-assert/lib/libLLVMAsmParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMMC.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDebugInfoCodeView.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBitReader.a;/home/ssmid/local/llvm19-assert/lib/libLLVMFuzzerCLI.a;/home/ssmid/local/llvm19-assert/lib/libLLVMCore.a;/home/ssmid/local/llvm19-assert/lib/libLLVMRemarks.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBitstreamReader.a;/home/ssmid/local/llvm19-assert/lib/libLLVMBinaryFormat.a;/home/ssmid/local/llvm19-assert/lib/libLLVMTargetParser.a;/home/ssmid/local/llvm19-assert/lib/libLLVMTableGen.a;/home/ssmid/local/llvm19-assert/lib/libLLVMSupport.a;/home/ssmid/local/llvm19-assert/lib/libLLVMDemangle.a;-lrt;-ldl;-lm;-lz;-lzstd"
#define ZIG_LLVM_LIB_PATH "/home/ssmid/local/llvm19-assert/lib"
#define ZIG_LLVM_LINK_MODE "static"
#define ZIG_SYSTEM_LIBCXX "stdc++"

#endif

Btw, I was wondering about the std::* references but there are also a lot clang::* and llvm::* references, too.

However, I'm happy now; in case you want to track this issue down, I will assist you the best I can but I imagine you have better things to spend your time on.

Maybe, this issue provides an incentive to further streamline the bootstrap process, e.g.

  • keeping zig in zig-bootstrap up to date semi-automatically
  • provide default options for zig-bootstrap/build like native and baseline
  • provide a common set of build options for zig+llvm to reduce the amount of edge cases

Anyway, thanks for your time and patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants