Public bug reported: On Kubuntu Bionic Beaver this is what happens if I try to find any library to link it at the end of the compiling process.
x86_64-w64-mingw32-ld -lz --verbose GNU ld (GNU Binutils) 2.30 Supported emulations: i386pep i386pe using internal linker script: ================================= A large script inbetween ================================= attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.a failed attempt to open no/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/lib/x86_64-linux-gnu/libz.a failed attempt to open no/lib/x86_64-linux-gnu/z.lib failed attempt to open no/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/lib/x86_64-linux-gnu/z.dll failed attempt to open no/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/local/lib/libz.dll.a failed attempt to open no/usr/local/lib/z.dll.a failed attempt to open no/usr/local/lib/libz.a failed attempt to open no/usr/local/lib/z.lib failed attempt to open no/usr/local/lib/libz.dll failed attempt to open no/usr/local/lib/z.dll failed attempt to open no/usr/local/lib/libz.a failed attempt to open no/lib/libz.dll.a failed attempt to open no/lib/z.dll.a failed attempt to open no/lib/libz.a failed attempt to open no/lib/z.lib failed attempt to open no/lib/libz.dll failed attempt to open no/lib/z.dll failed attempt to open no/lib/libz.a failed attempt to open no/usr/lib/libz.dll.a failed attempt to open no/usr/lib/z.dll.a failed attempt to open no/usr/lib/libz.a failed attempt to open no/usr/lib/z.lib failed attempt to open no/usr/lib/libz.dll failed attempt to open no/usr/lib/z.dll failed attempt to open no/usr/lib/libz.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.lib failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.lib failed attempt to open no/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/lib/x86_64-linux-gnu/libz.a failed attempt to open no/lib/x86_64-linux-gnu/z.lib failed attempt to open no/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/lib/x86_64-linux-gnu/z.dll failed attempt to open no/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/local/lib/libz.dll.a failed attempt to open no/usr/local/lib/z.dll.a failed attempt to open no/usr/local/lib/libz.a failed attempt to open no/usr/local/lib/z.lib failed attempt to open no/usr/local/lib/libz.dll failed attempt to open no/usr/local/lib/z.dll failed attempt to open no/usr/local/lib/z.lib failed attempt to open no/lib/libz.dll.a failed attempt to open no/lib/z.dll.a failed attempt to open no/lib/libz.a failed attempt to open no/lib/z.lib failed attempt to open no/lib/libz.dll failed attempt to open no/lib/z.dll failed attempt to open no/lib/z.lib failed attempt to open no/usr/lib/libz.dll.a failed attempt to open no/usr/lib/z.dll.a failed attempt to open no/usr/lib/libz.a failed attempt to open no/usr/lib/z.lib failed attempt to open no/usr/lib/libz.dll failed attempt to open no/usr/lib/z.dll failed attempt to open no/usr/lib/z.lib failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.lib failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.lib failed x86_64-w64-mingw32-ld: cannot find -lz If I check the /usr/x86_64-w64-mingw32/lib/ path in dolphin or konqueror I do find the libz.a and libz.dll.a files right there. I know they are not supposed to be included with the mingw packages, but the same happens to any library that is included by default. Thereafter I came up with the idea that creating pc files myself would probably fix this situation so I did. Even if pkg-config and cmake say they have found the packages (including binaries, included header files, and libraries), the linker just denies they can be found anywhere. Even if it was a crazy idea, I used the default ld to try compile my custom project and it did find all of the specified libraries without any issues. Of course the result was not good at all for ld thought it was linking common Linux libraries XD ** Affects: gcc-mingw-w64 (Ubuntu) Importance: Undecided Status: New ** Tags: ld libraries linking mingw ** Description changed: - x86_64-w64-mingw32-ld -lz --verbose + On Kubuntu Bionic Beaver this is what happens if I try to find any + library to link it at the end of the compiling process. + + x86_64-w64-mingw32-ld -lz --verbose GNU ld (GNU Binutils) 2.30 - Supported emulations: - i386pep - i386pe + Supported emulations: + i386pep + i386pe using internal linker script: ================================= A large script inbetween ================================= attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.a failed attempt to open no/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/lib/x86_64-linux-gnu/libz.a failed attempt to open no/lib/x86_64-linux-gnu/z.lib failed attempt to open no/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/lib/x86_64-linux-gnu/z.dll failed attempt to open no/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/local/lib/libz.dll.a failed attempt to open no/usr/local/lib/z.dll.a failed attempt to open no/usr/local/lib/libz.a failed attempt to open no/usr/local/lib/z.lib failed attempt to open no/usr/local/lib/libz.dll failed attempt to open no/usr/local/lib/z.dll failed attempt to open no/usr/local/lib/libz.a failed attempt to open no/lib/libz.dll.a failed attempt to open no/lib/z.dll.a failed attempt to open no/lib/libz.a failed attempt to open no/lib/z.lib failed attempt to open no/lib/libz.dll failed attempt to open no/lib/z.dll failed attempt to open no/lib/libz.a failed attempt to open no/usr/lib/libz.dll.a failed attempt to open no/usr/lib/z.dll.a failed attempt to open no/usr/lib/libz.a failed attempt to open no/usr/lib/z.lib failed attempt to open no/usr/lib/libz.dll failed attempt to open no/usr/lib/z.dll failed attempt to open no/usr/lib/libz.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.lib failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/local/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/local/lib/x86_64-linux-gnu/z.lib failed attempt to open no/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/lib/x86_64-linux-gnu/libz.a failed attempt to open no/lib/x86_64-linux-gnu/z.lib failed attempt to open no/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/lib/x86_64-linux-gnu/z.dll failed attempt to open no/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll.a failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.a failed attempt to open no/usr/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/lib/x86_64-linux-gnu/libz.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/z.dll failed attempt to open no/usr/lib/x86_64-linux-gnu/z.lib failed attempt to open no/usr/local/lib/libz.dll.a failed attempt to open no/usr/local/lib/z.dll.a failed attempt to open no/usr/local/lib/libz.a failed attempt to open no/usr/local/lib/z.lib failed attempt to open no/usr/local/lib/libz.dll failed attempt to open no/usr/local/lib/z.dll failed attempt to open no/usr/local/lib/z.lib failed attempt to open no/lib/libz.dll.a failed attempt to open no/lib/z.dll.a failed attempt to open no/lib/libz.a failed attempt to open no/lib/z.lib failed attempt to open no/lib/libz.dll failed attempt to open no/lib/z.dll failed attempt to open no/lib/z.lib failed attempt to open no/usr/lib/libz.dll.a failed attempt to open no/usr/lib/z.dll.a failed attempt to open no/usr/lib/libz.a failed attempt to open no/usr/lib/z.lib failed attempt to open no/usr/lib/libz.dll failed attempt to open no/usr/lib/z.dll failed attempt to open no/usr/lib/z.lib failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.a failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.lib failed attempt to open no/usr/x86_64-w64-mingw32/lib/libz.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.dll failed attempt to open no/usr/x86_64-w64-mingw32/lib/z.lib failed x86_64-w64-mingw32-ld: cannot find -lz If I check the /usr/x86_64-w64-mingw32/lib/ path in dolphin or konqueror I do find the libz.a and libz.dll.a files right there. I know they are not supposed to be included with the mingw packages, but the same happens to any library that is included by default. Thereafter I came up with the idea that creating pc files myself would probably fix this situation so I did. Even if pkg-config and cmake say they have found the packages (including binaries, included header files, and libraries), the linker just denies they can be found anywhere. Even if it was a crazy idea, I used the default ld to try compile my custom project and it did find all of the specified libraries without any issues. Of course the result was not good at all for ld thought it was linking common Linux libraries XD -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1804138 Title: mingw ld cannot link libraries To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-mingw-w64/+bug/1804138/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs