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

Xcode project does not link with homebrew LLVM #240

Open
jaivia opened this issue Mar 20, 2023 · 2 comments
Open

Xcode project does not link with homebrew LLVM #240

jaivia opened this issue Mar 20, 2023 · 2 comments

Comments

@jaivia
Copy link

jaivia commented Mar 20, 2023

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?

@johnnythedoggie
Copy link

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

@lantos1618
Copy link

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

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

3 participants