8000 Windows Paths are Returning Backslashes · Issue #249 · pkgconf/pkgconf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Windows Paths are Returning Backslashes #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danyeaw opened this issue Apr 15, 2022 · 7 comments
Open

Windows Paths are Returning Backslashes #249

danyeaw opened this issue Apr 15, 2022 · 7 comments

Comments

@danyeaw
Copy link
danyeaw commented Apr 15, 2022

@lazka including you since you seem to be the pkgconf Windows path guru 👍

A change in gobject-introspection to call pkg-config.exe --libs-only-L is causing a gobject-introspection WinError, because the path separators are being stripped out: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/427

With version 1.8.0 and the latest master version built with meson, it is returning backslashes for some of the paths:

pkgconf --libs-only-L C:\gtk-build\gtk\x64\release\lib\pkgconfig\gio-2.0.pc
-LC:/gtk-build/gtk/x64/release/bin/../lib -LC:\gtk-build\gtk\x64\release/lib -LC:/gtk-build/gtk/x64/release/bin/../lib -LC:/gtk-build/gtk/x64/release/bin/../lib

Here is the gio-2.0.pc file:

prefix=C:/gtk-build/gtk/x64/release
libdir=${prefix}/lib
includedir=${prefix}/include

datadir=${prefix}/share
schemasdir=${datadir}/glib-2.0/schemas
bindir=${prefix}/bin
giomoduledir=${libdir}/gio/modules
gio=${bindir}/gio
gio_querymodules=${bindir}/gio-querymodules
glib_compile_schemas=${bindir}/glib-compile-schemas
glib_compile_resources=${bindir}/glib-compile-resources
gdbus=${bindir}/gdbus
gdbus_codegen=${bindir}/gdbus-codegen
gresource=${bindir}/gresource
gsettings=${bindir}/gsettings

Name: GIO
Description: glib I/O library
Version: 2.72.1
Requires: glib-2.0, gobject-2.0
Requires.private: gmodule-no-export-2.0, zlib
Libs: -L${libdir} -lgio-2.0
Libs.private: -lshlwapi -ldnsapi -liphlpapi -lws2_32 -L${libdir} -lintl
Cflags: -I${includedir}
@lazka
Copy link
Contributor
lazka commented Apr 15, 2022

What about the dependant glib/gobject .pc files?

@danyeaw
Copy link
Author
danyeaw commented Apr 15, 2022

It looks like gobject-2.0 is returning backslashes as well:

PS C:\gtk-build\github\gvsbuild> pkgconf --libs C:\gtk-build\gtk\x64\release\lib\pkgconfig\glib-2.0.pc
-lglib-2.0 -lintl
PS C:\gtk-build\github\gvsbuild> pkgconf --libs C:\gtk-build\gtk\x64\release\lib\pkgconfig\gobject-2.0.pc
-lgobject-2.0 -LC:/gtk-build/gtk/x64/release/bin/../lib -lglib-2.0 -lintl -LC:\gtk-build\gtk\x64\release/lib -lffi

@lazka
Copy link
Contributor
lazka commented Apr 18, 2022

I can't reproduce in MSYS2 at least, but we also have some patches.

Given the order of the returned paths, maybe have a look at the ffi .pc file?

@kaniini
Copy link
Member
kaniini commented Jun 26, 2022

Some people want backslashes, others do not. Can we finally make a decision on this.

@lazka
Copy link
Contributor
lazka commented Jun 26, 2022

afaik backslashes should work fine too, they are just not escaped here.

@kaniini
Copy link
Member
kaniini commented Jun 26, 2022

I think we should just use forward slashes. If MSYS2 already has a patch for this, I will apply it.

@lazka
Copy link
Contributor
lazka commented Jun 26, 2022

MSYS2 doesn't have any slash related patches left. My guess would be that there are hardcoded absolute paths in some input .pc files using unescaped backslashes.

(sorry that I didn't follow up on Windows issues here... lots of other brokenness in MSYS2 keeping me busy..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0