[llvm-bugs] [Bug 48931] New: ClangTidyTests fail to link w/ shared libclang-cpp+libLLVM: undefined reference to `llvm::Annotations::Annotations(llvm::StringRef)'

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 28 17:14:39 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48931

            Bug ID: 48931
           Summary: ClangTidyTests fail to link w/ shared
                    libclang-cpp+libLLVM: undefined reference to
                    `llvm::Annotations::Annotations(llvm::StringRef)'
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mgorny at gentoo.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
            Blocks: 48902

Created attachment 24436
  --> https://bugs.llvm.org/attachment.cgi?id=24436&action=edit
sys-devel:clang-12.0.0_rc1:20210129-005431.log.xz

Attaching the complete build log.

The linker errors follow.  I suspect it's missing proper linking to
libLLVMTestingSupport, I am going to try patching it in a minute.


/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/ClangTidyOptionsTest.cpp.o:
in function
`clang::tidy::test::ParseConfiguration_CollectDiags_Test::TestBody()':
ClangTidyOptionsTest.cpp:(.text._ZN5clang4tidy4test36ParseConfiguration_CollectDiags_Test8TestBodyEv+0x62):
undefined reference to `llvm::Annotations::Annotations(llvm::StringRef)'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
ClangTidyOptionsTest.cpp:(.text._ZN5clang4tidy4test36ParseConfiguration_CollectDiags_Test8TestBodyEv+0x24c):
undefined reference to `llvm::Annotations::range(llvm::StringRef) const'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
ClangTidyOptionsTest.cpp:(.text._ZN5clang4tidy4test36ParseConfiguration_CollectDiags_Test8TestBodyEv+0x263):
undefined reference to `llvm::Annotations::range(llvm::StringRef) const'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
ClangTidyOptionsTest.cpp:(.text._ZN5clang4tidy4test36ParseConfiguration_CollectDiags_Test8TestBodyEv+0x39a):
undefined reference to `llvm::Annotations::Annotations(llvm::StringRef)'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
ClangTidyOptionsTest.cpp:(.text._ZN5clang4tidy4test36ParseConfiguration_CollectDiags_Test8TestBodyEv+0x88f):
undefined reference to `llvm::Annotations::range(llvm::StringRef) const'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
ClangTidyOptionsTest.cpp:(.text._ZN5clang4tidy4test36ParseConfiguration_CollectDiags_Test8TestBodyEv+0x8a6):
undefined reference to `llvm::Annotations::range(llvm::StringRef) const'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/ClangTidyOptionsTest.cpp.o:
in function `clang::tidy::test::(anonymous
namespace)::DiagRangeMatcherP<llvm::Annotations::Range>::gmock_Impl<clang::tidy::test::(anonymous
namespace)::DiagCollecter::Diag const&>::FormatDescription(bool) const':
ClangTidyOptionsTest.cpp:(.text._ZNK5clang4tidy4test12_GLOBAL__N_117DiagRangeMatcherPIN4llvm11Annotations5RangeEE10gmock_ImplIRKNS2_13DiagCollecter4DiagEE17FormatDescriptionEb+0xe4):
undefined reference to `llvm::operator<<(llvm::raw_ostream&,
llvm::Annotations::Range const&)'
collect2: error: ld returned 1 exit status


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=48902
[Bug 48902] [meta] 12.0.0 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210129/8e8d1771/attachment.html>


More information about the llvm-bugs mailing list