[Bug libstdc++/97729] [11 Regression] Link failure due to basic_stringbuf and others when building DLL on MinGW

markus.boeck02 at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 5 14:00:54 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97729

--- Comment #2 from Markus Böck <markus.boeck02 at gmail dot com> ---
Created attachment 49507
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49507&action=edit
config.h

Applied the patch and it fixed the issue regarding the undefined references.
Still getting the multiple definitions of exception_ptr:

/mnt/c/GCC-Build/NewestLinux/bin/x86_64-w64-mingw32-ld:
../libsupc++/.libs/libsupc++convenience.a(nested_exception.o): in function
`std::__exception_ptr::exception_ptr::~exception_ptr()':
C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/libsupc++/C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/include/bits/exception_ptr.h:194:
multiple definition of `std::__exception_ptr::exception_ptr::~exception_ptr()';
../libsupc++/.libs/libsupc++convenience.a(eh_ptr.o):C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/libsupc++/C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/include/bits/exception_ptr.h:194:
first defined here
/mnt/c/GCC-Build/NewestLinux/bin/x86_64-w64-mingw32-ld:
../src/c++11/.libs/libc++11convenience.a(future.o): in function
`std::__exception_ptr::exception_ptr::exception_ptr()':
C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/src/c++11/C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/include/bits/std_mutex.h:105:
multiple definition of `std::__exception_ptr::exception_ptr::exception_ptr()';
../libsupc++/.libs/libsupc++convenience.a(eh_ptr.o):C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/libsupc++/C:/GCC-Build-Array/gcc/build-host-x86_64/x86_64-w64-mingw32/libstdc++-v3/include/bits/exception_ptr.h:176:
first defined here

I am using a cross compiler setup (though in WSL 1) as well so I'd be curious
what leads to the differences in reproducability as this is not the first time
this has happened. I'll attach my config.h if that helps. The MinGW version I
use is current trunk.


More information about the Gcc-bugs mailing list