[llvm-bugs] [Bug 43819] New: LLDB build with -DLLVM_ENABLE_MODULES=On fails with undefined reference to libstdc++'s std::__enable_shared_from_this_base

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 26 09:07:41 PDT 2019


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

            Bug ID: 43819
           Summary: LLDB build with -DLLVM_ENABLE_MODULES=On fails with
                    undefined reference to libstdc++'s
                    std::__enable_shared_from_this_base
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: l.lunak at centrum.cz
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 22736
  --> https://bugs.llvm.org/attachment.cgi?id=22736&action=edit
full error message

Steps to reproduce:
- current LLVM checkout (9231e443445f0b8adb1a1b22d7d246c8bc337227)
$ cmake -GNinja -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_OPTIMIZED_TABLEGEN=On
-DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_LLD=On -DLLVM_USE_SPLIT_DWARF=On
-DLLVM_LIBDIR_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=OFF -DLLVM_ENABLE_MODULES=On
-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt;lldb
$ ninja lldb
The build eventually fails with errors such as
ld.lld: error: undefined symbol:
std::__enable_shared_from_this_base(std::__shared_count<(__gnu_cxx::_Lock_policy)2>
const&, std::enable_shared_from_this<lldb_private::RecognizedStackFrame>
const*)
>>> referenced by shared_ptr_base.h:1382 (/usr/bin/../lib64/gcc/x86_64-suse-linux/9/../../../../include/c++/9/bits/shared_ptr_base.h:1382)
>>>               StackFrameRecognizer.cpp.o:(std::__shared_ptr<lldb_private::RecognizedStackFrame, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<ScriptedRecognizedStackFrame, void>(ScriptedRecognizedStackFrame*)) in archive lib64/liblldbTarget.a

Removing -DLLVM_ENABLE_MODULES=On avoids the problem. Building with
-DLLVM_ENABLE_LIBCXX=On also avoids the problem.

The build is self-hosted (i.e. the compiler is from the same checkout). OS is
openSUSE Leap 15.1, libstdc++ is
libstdc++6-devel-gcc9-9.2.1+r275327-lp151.55.1.x86_64 .

-- 
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/20191026/241742d4/attachment.html>


More information about the llvm-bugs mailing list