Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 557236

Summary: cross-i686-w64-mingw32/gcc: no shared libstdc++-6.dll
Product: Gentoo Linux Reporter: David Korth <gerbilsoft>
Component: Current packagesAssignee: Gentoo Crossdev team <crossdev>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alon.barlev, alonbl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 627914    

Description David Korth 2015-08-10 15:46:25 UTC
When building an i686-w64-mingw32 toolchain with crossdev, I noticed that libstdc++-6.dll (and I think a few other DLLs) don't get installed. This results in executables that aren't usable unless I compile with -static-libgcc and -static-libstdc++.

Expected results: libstdc++-6.dll is installed in the i686-w64-mingw32 root.

Actual results: libstdc++-6.dll is missing.

I'm able to work around this by pausing crossdev's emerge right before it wipes the temporary directory and copying the DLLs manually, but I'd prefer if crossdev installed the DLLs itself.
Comment 1 SpanKY gentoo-dev 2015-08-16 15:24:10 UTC
pretty sure we haven't ever built shared gcc libs for mingw targets

crossdev itself doesn't copy/install any files
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2015-08-17 10:53:14 UTC
hmmm... I cannot actually build c++ now with latest gcc's libsanitizer.

sanitizer_libc.cc

// Make the compiler think that something is going on there.
static inline void break_optimization(void *arg) {
#if SANITIZER_WINDOWS
  // FIXME: make sure this is actually enough.
  __asm;
#else
  __asm__ __volatile__("" : : "r" (arg) : "memory");
#endif
}

/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_libc.cc: In function ‘void __sanitizer::break_optimization(void*)’:
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-4.9.3/work/gcc-4.9.3/libsanitizer/sanitizer_common/sanitizer_libc.cc:21:8: error: expected ‘(’ before ‘;’ token
   __asm;
        ^

which is true :)
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2015-08-17 10:58:09 UTC
(In reply to Alon Bar-Lev from comment #2)
> which is true :)

yes, mingw patches are not merged[1], it assumes it is built using msvc, good we have sanitize USE.

[1] https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gcc/port-sanitizer-to-mingw.all.patch
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2015-08-17 11:25:41 UTC
$ equery files cross-x86_64-w64-mingw32/gcc-4.9.3 | grep dll
/usr/lib/gcc/x86_64-w64-mingw32/4.9.3/libgcc_s_seh-1.dll
/usr/lib/gcc/x86_64-w64-mingw32/4.9.3/libstdc++-6.dll
/usr/lib/gcc/x86_64-w64-mingw32/4.9.3/libstdc++.dll.a
/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-w64-mingw32/4.9.3/libstdc++.dll.a-gdb.py

I guess you want these to be /usr/x86_64-w64-mingw32/usr/bin with all .dll but we do not have such so far :)

vapier do we want to create such, do we want to?

so far I just copied manually whatever I needed to my own root.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-22 23:55:42 UTC

*** This bug has been marked as a duplicate of bug 549994 ***