[llvm-bugs] [Bug 32360] New: Undefined symbols when using -static-libstdc++

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 21 06:00:16 PDT 2017


            Bug ID: 32360
           Summary: Undefined symbols when using -static-libstdc++
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: wielkiegie at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18141
  --> https://bugs.llvm.org/attachment.cgi?id=18141&action=edit
lld errors with -Wl,-error-limit=0

This is a follow-up of bug 32307.

When building using gcc-5.2 and -static-libstdc++ option:

echo -e '#include<iostream>\nint main() { return 0; }' | g++ -xc++ -

there are multiple undefined symbol errors returned. Some of them:

ld: error: ../../../../../gcc-5.2.0/libstdc++-v3/src/c++98/ios_init.cc:181:
undefined symbol '__gnu_cxx::stdio_filebuf<char, std::char_traits<char>
>::stdio_filebuf(_IO_FILE*, std::_Ios_Openmode, unsigned long)'
ld: error: ../../../../gcc-5.2.0/libstdc++-v3/src/c++98/compatibility.cc:67:
undefined symbol 'std::istream::sentry::sentry(std::istream&, bool)'
ld: error:
undefined symbol 'std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'

All the errors are in the attached file.

Here is the link to the repro.tar.gz file (file too large to attach):


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/20170321/a00b9cde/attachment.html>

More information about the llvm-bugs mailing list