[cfe-dev] Linking issues after upgrading 6.0.0 -> 7.0.0 with homebrew

Tom Stellard via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 8 19:24:37 PDT 2018


On 10/08/2018 07:16 PM, Scott Douglas Constable via cfe-dev wrote:
> Hi All,
> 
> I have a clang-based tool that links to the LLVM/clang static libraries. It was building without issues with LLVM 5 and 6. Today I upgraded to LLVM 7.0.0 with homebrew, and I'm suddenly getting linker errors:
> 

It looks like these symbols were moved to libclangToolingInclusions.a,
so you will need to add that to your linker invocation.

-Tom

> Undefined symbols for architecture x86_64:
>   "llvm::yaml::MappingTraits<clang::tooling::IncludeStyle::IncludeCategory>::mapping(llvm::yaml::IO&, clang::tooling::IncludeStyle::IncludeCategory&)", referenced from:
>       std::__1::enable_if<has_SequenceTraits<std::__1::vector<clang::tooling::IncludeStyle::IncludeCategory, std::__1::allocator<clang::tooling::IncludeStyle::IncludeCategory> > >::value, void>::type llvm::yaml::yamlize<std::__1::vector<clang::tooling::IncludeStyle::IncludeCategory, std::__1::allocator<clang::tooling::IncludeStyle::IncludeCategory> >, llvm::yaml::EmptyContext>(llvm::yaml::IO&, std::__1::vector<clang::tooling::IncludeStyle::IncludeCategory, std::__1::allocator<clang::tooling::IncludeStyle::IncludeCategory> >&, bool, llvm::yaml::EmptyContext&) in libclangFormat.a(Format.cpp.o)
>   "llvm::yaml::ScalarEnumerationTraits<clang::tooling::IncludeStyle::IncludeBlocksStyle>::enumeration(llvm::yaml::IO&, clang::tooling::IncludeStyle::IncludeBlocksStyle&)", referenced from:
>       void llvm::yaml::IO::processKey<clang::tooling::IncludeStyle::IncludeBlocksStyle, llvm::yaml::EmptyContext>(char const*, clang::tooling::IncludeStyle::IncludeBlocksStyle&, bool, llvm::yaml::EmptyContext&) in libclangFormat.a(Format.cpp.o)
>   "clang::tooling::IncludeCategoryManager::IncludeCategoryManager(clang::tooling::IncludeStyle const&, llvm::StringRef)", referenced from:
>       clang::format::sortCppIncludes(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, llvm::StringRef, clang::tooling::Replacements&, unsigned int*) in libclangFormat.a(Format.cpp.o)
>   "clang::tooling::IncludeCategoryManager::getIncludePriority(llvm::StringRef, bool) const", referenced from:
>       clang::format::sortCppIncludes(clang::format::FormatStyle const&, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, llvm::StringRef, clang::tooling::Replacements&, unsigned int*) in libclangFormat.a(Format.cpp.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> All of my source files compiled without any issues. A quick look through the LLVM online documentation suggests that these functions still exist in the LLVM codebase. But I'm at a loss as to how to explain these missing symbols.
> 
> Any suggestions would be much appreciated.
> 
> Scott Constable
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 




More information about the cfe-dev mailing list