[llvm-bugs] [Bug 47052] New: _LIBCPP_DEBUG=1 causes link error

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 8 04:05:55 PDT 2020


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

            Bug ID: 47052
           Summary: _LIBCPP_DEBUG=1 causes link error
           Product: libc++
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jbulow-llvm at jongel.net
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

This program: (err1.cpp)

#include <vector>

int
main()
{
  std::vector<int> v;

  return 0;
}

Compiled with:

clang++  -stdlib=libc++ -D_LIBCPP_DEBUG=1  -o err1 err1.cpp

Results in:

/tmp/err1-babb29.o: In function `void
std::__1::__libcpp_db::__insert_c<std::__1::vector<int,
std::__1::allocator<int> > >(std::__1::vector<int, std::__1::allocator<int>
>*)':
err1.cpp:(.text._ZNSt3__111__libcpp_db10__insert_cINS_6vectorIiNS_9allocatorIiEEEEEEvPT_[_ZNSt3__111__libcpp_db10__insert_cINS_6vectorIiNS_9allocatorIiEEEEEEvPT_]+0x26):
undefined reference to `std::__1::__libcpp_db::__insert_c(void*,
std::__1::__c_node* (*)(void*, void*, std::__1::__c_node*))'
clang-12: error: linker command failed with exit code 1 (use -v to see
invocation)
Makefile:5: recipe for target 'err1' failed
make: *** [err1] Error 1
make: Target 'all' not remade because of errors.

-- 
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/20200808/e8a167e6/attachment.html>


More information about the llvm-bugs mailing list