Skip to content
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

find_tool() with pkgconfig seems to need some unescaping #14138

Open
bugaevc opened this issue Jan 14, 2025 · 0 comments
Open

find_tool() with pkgconfig seems to need some unescaping #14138

bugaevc opened this issue Jan 14, 2025 · 0 comments

Comments

@bugaevc
Copy link

bugaevc commented Jan 14, 2025

Describe the bug

I'm trying to build glib with introspection support on Windows. After jumping through various hoops, I get this error message when building glib:

Dependency gobject-introspection-1.0 found: YES 1.83.1 (cached)
Program C:/Program\ Files/GTK\ 4\ Platform/bin/../bin/g-ir-scanner found: NO

..\girepository\introspection\meson.build:78:17: ERROR: Dependency 'gobject-introspection-1.0' tool variable 'g_ir_scanner' contains erroneous value: 'C:/Program\\ Files/GTK\\ 4\\ Platform/bin/../bin/g-ir-scanner'

The pkg-config file in question, itself produced by Meson, indeed contains:

prefix=C:/Program\ Files/GTK\ 4\ Platform
bindir=${prefix}/bin
<...>
g_ir_scanner=${bindir}/g-ir-scanner

the error seems to come from #12479, and the logic from #8272 (cc @xclaesse). Apparently the variable value should be un-escaped before you try to use it as a path?

I'm using pkgconf if it matters, but it does make sense that the pkg-config invocation reports the value without unescaping it -- otherwise you won't be able to tell the difference between a list of paths and a path containing whitespace.

To Reproduce

Build & install gobject-introspection into a prefix that contains whitespaces. Try to build glib with introspection enabled.

Expected behavior

I'd expect g-ir-scanner to get found.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?
    • not a cross build
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
    • Windows 11
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

1 participant