MINGW-packages: i686 libstdc++-6.dll built after latest mingw crt/winpthreads/etc update breaks things

After installing a freshly built gcc, things are silently failing. cmake was the first thing I saw, but then when I tried to find out what was happening I saw gdb was also silently failing. the most likely thing that changed between when it worked and now would be the mingw crt/etc packages were updated

dependency walker is showing libstdc++ has undefined imports __emutls_v._ZSt11_once_call and __emutls_v.Zst15_once_callable. Those symbols are present in the existing/working libstdc+±6.dll.

libstdc+±6.dll from CI rebuild of gcc has the issue. Local build of gcc after downgrading mingw packages(pacman -U /var/cache/pacman/pkg/mingw-w64-i686-*-8.0.0.5*) ongoing, but there is already a stage3 libstdc+±6.dll, which defines those symbols.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Otherwise the static winpthreads library suddenly requires libgcc and fails during bootstrapping, where it isn’t available.

In a canonical cross-compiling (it’s probably stage2 of bootstrapping) procedure, the host C library (including the thread library) is linked to produce the host libgcc so it must end up with no undefined reference. GCC’s configure apparently tests static linking, so the static winpthreads library cannot reference libgcc symbols (64-bit integer division under this circumstance).