You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building Zig on aarch64-darwin, it fails to link to LLD:
Undefined symbols for architecture arm64:
"operator delete[](void*)", referenced from:
lld::elf::Configuration::~Configuration() in liblldELF.a(Driver.cpp.o)
lld::elf::readFile(llvm::StringRef) in liblldELF.a(InputFiles.cpp.o)
std::__1::pair<llvm::DenseMapIterator<llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString>, false>, bool> llvm::DenseMapBase<llvm::DenseMap<llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString> >, llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString> >::try_emplace<llvm::detail::DenseSetEmpty&>(llvm::CachedHashString const&, llvm::detail::DenseSetEmpty&) in liblldELF.a(InputFiles.cpp.o)
llvm::DenseMapBase<llvm::DenseMap<llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString> >, llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString> >::moveFromOldBuckets(llvm::detail::DenseSetPair<llvm::CachedHashString>*, llvm::detail::DenseSetPair<llvm::CachedHashString>*) in liblldELF.a(InputFiles.cpp.o)
void std::__1::vector<llvm::CachedHashString, std::__1::allocator<llvm::CachedHashString> >::__push_back_slow_path<llvm::CachedHashString const&>(llvm::CachedHashString const&) in liblldELF.a(InputFiles.cpp.o)
lld::coff::TpiSource::clear() in liblldCOFF.a(DebugTypes.cpp.o)
lld::coff::TpiSource::clearGHashes() in liblldCOFF.a(DebugTypes.cpp.o)
...
"operator delete(void*)", referenced from:
_ZigLLVMGetNativeFeatures in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLVMCreateTargetMachine in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLVMTargetMachineEmitToFile in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLVMDisposeDIBuilder in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLVMGetNativeTarget in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLVMWriteImportLibrary in libzigcpp.a(zig_llvm.cpp.o)
llvm::Expected<llvm::object::COFFModuleDefinition>::~Expected() in libzigcpp.a(zig_llvm.cpp.o)
...
"operator new[](unsigned long)", referenced from:
bigint_unsigned_division(BigInt const*, BigInt const*, BigInt*, BigInt*) in libzigstage1.a(bigint.cpp.o)
lld::elf::readFile(llvm::StringRef) in liblldELF.a(InputFiles.cpp.o)
std::__1::pair<llvm::DenseMapIterator<llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString>, false>, bool> llvm::DenseMapBase<llvm::DenseMap<llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString> >, llvm::CachedHashString, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::CachedHashString>, llvm::detail::DenseSetPair<llvm::CachedHashString> >::try_emplace<llvm::detail::DenseSetEmpty&>(llvm::CachedHashString const&, llvm::detail::DenseSetEmpty&) in liblldELF.a(InputFiles.cpp.o)
void std::__1::vector<llvm::CachedHashString, std::__1::allocator<llvm::CachedHashString> >::__push_back_slow_path<llvm::CachedHashString const&>(llvm::CachedHashString const&) in liblldELF.a(InputFiles.cpp.o)
lld::coff::TpiSource::loadGHashes() in liblldCOFF.a(DebugTypes.cpp.o)
lld::coff::TpiSource::assignGHashesFromVector(std::__1::vector<llvm::codeview::GloballyHashedType, std::__1::allocator<llvm::codeview::GloballyHashedType> >&&) in liblldCOFF.a(DebugTypes.cpp.o)
lld::coff::TypeMerger::mergeTypesWithGHash() in liblldCOFF.a(DebugTypes.cpp.o)
...
"operator new(unsigned long)", referenced from:
_ZigLLVMTargetMachineEmitToFile in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLDLinkCOFF in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLDLinkELF in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLDLinkWasm in libzigcpp.a(zig_llvm.cpp.o)
llvm::ErrorList::join(llvm::Error, llvm::Error) in libzigcpp.a(zig_llvm.cpp.o)
std::__1::vector<std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> >, std::__1::allocator<std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> > > >::insert(std::__1::__wrap_iter<std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> > const*>, std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> >&&) in libzigcpp.a(zig_llvm.cpp.o)
void std::__1::vector<std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> >, std::__1::allocator<std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> > > >::__push_back_slow_path<std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> > >(std::__1::unique_ptr<llvm::ErrorInfoBase, std::__1::default_delete<llvm::ErrorInfoBase> >&&) in libzigcpp.a(zig_llvm.cpp.o)
...
"operator new(unsigned long, std::nothrow_t const&)", referenced from:
_ZigLLVMTargetMachineEmitToFile in libzigcpp.a(zig_llvm.cpp.o)
_ZigLLVMCreateDIBuilder in libzigcpp.a(zig_llvm.cpp.o)
lld::elf::EhFrameSection::getFdeData() const in liblldELF.a(SyntheticSections.cpp.o)
lld::elf::SymbolTableBaseSection::finalizeContents() in liblldELF.a(SyntheticSections.cpp.o)
lld::elf::SymbolTableBaseSection::sortSymTabSymbols() in liblldELF.a(SyntheticSections.cpp.o)
lld::elf::GnuHashTableSection::addSymbols(std::__1::vector<lld::elf::SymbolTableEntry, std::__1::allocator<lld::elf::SymbolTableEntry> >&) in liblldELF.a(SyntheticSections.cpp.o)
lld::elf::ARMExidxSyntheticSection::finalizeContents() in liblldELF.a(SyntheticSections.cpp.o)
...
ld: symbol(s) not found for architecture arm64
Steps To Reproduce
Steps to reproduce the behavior:
Set zig.meta.broken to stdenv.isDarwin && stdenv.isx86_64
Attempt to build
Expected behavior
The build succeeds.
Additional context
I'm convinced that this is an issue on the LLVM side of things (as opposed to the Zig end), because this derivation works fine on Linux. If I'm wrong, please let me know.
Describe the bug
When building Zig on aarch64-darwin, it fails to link to LLD:
Steps To Reproduce
Steps to reproduce the behavior:
zig.meta.broken
tostdenv.isDarwin && stdenv.isx86_64
Expected behavior
The build succeeds.
Additional context
I'm convinced that this is an issue on the LLVM side of things (as opposed to the Zig end), because this derivation works fine on Linux. If I'm wrong, please let me know.
Notify maintainers
@lovek323 @7c6f434c @dtzWill @primeos
The text was updated successfully, but these errors were encountered: