mingw ld cannot link libraries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binutils-mingw-w64 (Ubuntu) |
Incomplete
|
Undecided
|
Stephen Kitt |
Bug Description
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-
GNU ld (GNU Binutils) 2.30
Supported emulations:
i386pep
i386pe
using internal linker script:
=======
A large script inbetween
=======
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
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/
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/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/lib/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
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/
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/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
attempt to open no/usr/
x86_64-
If I check the /usr/x86_
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
By the way, I also exported a custom location for the pkg-config files and double checked it with echo $PKG_CONFIG_PATH, and still mingw ld was unable to find the packages =_=
description: | updated |
description: | updated |
Changed in binutils-mingw-w64 (Ubuntu): | |
assignee: | nobody → Stephen Kitt (steve-sk2) |
It seems that ld is using “no” as a sysroot. The interesting part here is in the “large script” you removed; could you at least tell me what the “SEARCH_DIR” setting is, near the start of the script?