Unix-style paths instead of Windows paths are returned under MinGW #234
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I noticed behavior of pkgconf changed from v1.7.4 to v1.8.0. Note that v1.7.4 is from MinGW and hence had patches, so I am not quite comparing to upstream pkgconf here:
4861bb970c (diff-dca92e4684e4c4dd39b987eaf87183441672fc566aa0f9be737114dc04b35048)
The environment is MinGW64, installed via msys; the v1.7.4 package was built via the msys PKGBUILD, while the v1.8.0 package here comes from their repos.
In the (patched) v1.7.4, pkgconf gave Windows-style paths:
However, in v1.8.0, it gives Unix-style paths:
When used with MinGW CMake, this causes builds to fail (as CMake apparently does not remap the Unix-style paths to Windows ones).
The .pc file is as follows:
Note that a slightly different .pc file gives Windows-style paths still, so perhaps this should be fixed by adjusting the .pc file? (Apologies, I am not all that familiar with pkgconf.)
Please let me know if this should be reported elsewhere; I'm not sure if this is quite a pkgconf issue, or if the .pc file itself is wrong (in which case it should be fixed in MSYS/lz4).
See downstream issue: https://github.com/msys2/MINGW-packages/issues/9602
I've bisected this regression to
13fe4c8c58
and can confirm that reverting it fixes things (and have done so here https://github.com/msys2/MINGW-packages/pull/9604)For some reason it breaks the following workaround:
ceece2c195/libpkgconf/pkg.c (L296)
I haven't looked into it though.here is an example .pc file affected:
(The commit causing the change is now reverted in the MSYS2 package)
Thanks for looking at this!
@midipix can you provide some commentary here?
At a glance: while commit
13fe4c8
fixed a real problem and seems to be sufficient on unix-like systems, it might need to be refined for mingw (and possibly also msys).In my humble opinion, and given
prefix=/mingw64
in the .pc file, pkgconf still does the right thing. On systems where C:/msys64/mingw64 is desired, then either the package could be configured with --prefix=C:/msys64/mingw64, or pkgconf could be asked on the command-line (or configured) to add the C:/msys64 prefix.Based on irc discussions from back then, I believe that
13fe4c8
reflects a correct understanding of the --define-prefix semantics, yet perhaps with an oversight as far as mingw is concerned.Hardcoding full prefix doesn't work because MSYS2 can be put anywhere user wants to.