StephanTLavavej / mingw-distro

MinGW distro build scripts.
492 stars 55 forks source link

binutils 2.41 still complains about `libdep.a` #88

Open StephanTLavavej opened 2 years ago

StephanTLavavej commented 2 years ago

Two users have independently reported that building different projects (Lua, wxWidgets) fails with a dialog box complaining:

c:\mingw\lib\bfd-plugins\libdep.a is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc000012f.

This appears to have been fixed upstream as https://sourceware.org/bugzilla/show_bug.cgi?id=27113 . However, I'm not 100% certain, because that bug and fix talks about libdep.dll.a. (The difference may be that I build the distro statically.)

It would be helpful to:

alexzyp commented 2 years ago

Minimal reproduction:

echo. > empty.c
gcc -c -o empty.o empty.c
ar -rc libempty.a empty.o
StephanTLavavej commented 2 years ago

binutils 2.38 has been released and contains the claimed fix, so I just need to build it.

StephanTLavavej commented 6 months ago

Still repros with binutils 2.41.

ckormanyos commented 6 months ago

Hi @StephanTLavavej I've been working around this for years. But sadly, do not know how to repair it. When I build GCC for embedded targets like arm, avr or others on MSys2, I need to actually delete the plugins folder. This is because the plugins load libdep.a and that program (regardless of how I build binutils) wants to load some DLLs dynamically.

I use your standalone MinGW EVN for building since your GCC is dependency-free, which is rare.

Unfortunatley, I have not yet found the place in source code where the program dynamically loads and remain still doing workarounds like this.

StephanTLavavej commented 6 months ago

This should be reported upstream to binutils.