LLVMSwift icon indicating copy to clipboard operation
LLVMSwift copied to clipboard

Xcode project does not link with homebrew LLVM

Open jaivia opened this issue 1 year ago • 2 comments

All other steps seem to work fine but linking fails. All steps from instructions were followed. Here's snippet of linker error:

Undefined symbols for architecture arm64: "std::__1::basic_stringbuf<char, std::__1::char_traits, std::__1::allocator >::str() const", referenced from: (anonymous namespace)::AVRAsmParser::validateTargetOperandClass(llvm::MCParsedAsmOperand&, unsigned int) in libLLVMAVRAsmParser.a(AVRAsmParser.cpp.o) llvm::NVPTXRegisterInfo::getName(unsigned int) const in libLLVMNVPTXCodeGen.a(NVPTXAsmPrinter.cpp.o) (anonymous namespace)::AsmParser::parseStatement((anonymous namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) in libLLVMMCParser.a(AsmParser.cpp.o) (anonymous namespace)::InstrOrderFile::run(llvm::Module&) in libLLVMInstrumentation.a(InstrOrderFile.cpp.o) llvm::NVPTXTargetLowering::getPrototype(llvm::DataLayout const&, llvm::Type*, std::__1::vector<llvm::TargetLoweringBase::ArgListEntry, std::__1::allocatorllvm::TargetLoweringBase::ArgListEntry > const&, llvm::SmallVectorImplllvm::ISD::OutputArg const&, llvm::MaybeAlign, llvm::CallBase const&) const in libLLVMNVPTXCodeGen.a(NVPTXISelLowering.cpp.o) llvm::inlineCostStr(llvm::InlineCost const&) in libLLVMAnalysis.a(InlineAdvisor.cpp.o) getStatString(char const*, int, int, char const*, bool) in libLLVMTransformUtils.a(ImportedFunctionsInliningStatistics.cpp.o) ... "VTT for std::__1::basic_stringstream<char, std::__1::char_traits, std::__1::allocator >", referenced from: llvm::NVPTXRegisterInfo::getName(unsigned int) const in libLLVMNVPTXCodeGen.a(NVPTXAsmPrinter.cpp.o) (anonymous namespace)::HexagonAsmBackend::HandleFixupError(int, int, long long, char const*) const in libLLVMHexagonDesc.a(HexagonAsmBackend.cpp.o) (anonymous namespace)::InstrOrderFile::run(llvm::Module&) in libLLVMInstrumentation.a(InstrOrderFile.cpp.o) llvm::NVPTXTargetLowering::getPrototype(llvm::DataLayout const&, llvm::Type*, std::__1::vector<llvm::TargetLoweringBase::ArgListEntry, std::__1::allocatorllvm::TargetLoweringBase::ArgListEntry > const&, llvm::SmallVectorImplllvm::ISD::OutputArg const&, llvm::MaybeAlign, llvm::CallBase const&) const in libLLVMNVPTXCodeGen.a(NVPTXISelLowering.cpp.o) llvm::inlineCostStr(llvm::InlineCost const&) in libLLVMAnalysis.a(InlineAdvisor.cpp.o) getStatString(char const*, int, int, char const*, bool) in libLLVMTransformUtils.a(ImportedFunctionsInliningStatistics.cpp.o) llvm::MachO::InterfaceFile::addUUID(llvm::MachO::Target const&, unsigned char*) in libLLVMTextAPI.a(InterfaceFile.cpp.o)

Research shows points to this being due to gcc compiling included libs with stdlib and apple clang not. How is this resolved?

jaivia avatar Mar 20 '23 09:03 jaivia

Was this resolved? I've run into this error as well, if you were able to solve it I'd love to know!

johnnythedoggie avatar Oct 28 '23 04:10 johnnythedoggie

Was this resolved? I've run into this error as well, if you were able to solve it I'd love to know!

lantos1618 avatar Nov 15 '23 14:11 lantos1618