[go: up one dir, main page]

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

Search the same paths for GIR XML that GObject-Introspection does #456

Open
iliastsi opened this issue Oct 18, 2024 · 2 comments
Open

Search the same paths for GIR XML that GObject-Introspection does #456

iliastsi opened this issue Oct 18, 2024 · 2 comments

Comments

@iliastsi
Copy link
Contributor

Currently haskell-gi searches for GIR XML files under /usr/share/gir-1.0. Debian has now decided to move these files under /usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0, since these files have architecture-dependent contents.

GObject-Introspection since 1.78.x (gobject-introspection!258 (merged)) has been modified to search these extra paths. vala has been extended as well (see https://gitlab.gnome.org/GNOME/vala/-/issues/1518).

Please consider extending haskell-gi to accommodate for this change. For more information, please see the bug report in Debian (https://bugs.debian.org/1060907).

@garetxe
Copy link
Collaborator
garetxe commented Oct 26, 2024

Thanks for bringing this up.

I think that this should ideally be done upstream, instead of having to copy and paste the logic into each binding. For example by adding a list_gir_search_paths to gobject-introspection (could you please file a bug there? it would be really helpful). I am happy to add a workaround into haskell-gi until that's done.

Just to make sure I understand what we need to do in haskell-gi, could you please let me know what you get if you run the following?

pkg-config --variable=girdir gobject-introspection-1.0

@iliastsi
Copy link
Contributor Author
iliastsi commented Nov 2, 2024

I think that this should ideally be done upstream, instead of having to copy and paste the logic into each binding. For example by adding a list_gir_search_paths to gobject-introspection (could you please file a bug there? it would be really helpful). I am happy to add a workaround into haskell-gi until that's done.

Sounds reasonable to me. Unfortunately I have not worked with gobject-intreospection at all, so I don't think I would be the right person to open a bug there and move the discussion forward. Simon McVittie (who opened the Debian bug report and also proposed the patches for gobject-introspection and vala) may be able to help move this forward.

For the time being, I have used a very quick-n-dirty patch (see https://salsa.debian.org/haskell-team/DHG_packages/-/commit/438bb77d83cdcef739cb160db8a57eb068ad9eb7) to add /usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0 to the list of paths haskell-gi searches for GIR files in Debian.

Just to make sure I understand what we need to do in haskell-gi, could you please let me know what you get if you run the following?

pkg-config --variable=girdir gobject-introspection-1.0
$ pkg-config --variable=girdir gobject-introspection-1.0
/usr/share/gir-1.0

Right now, this returns the old path, even though some files have moved under /usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0

$ ls -l /usr/share/gir-1.0/GLib-2.0.gir 
lrwxrwxrwx 1 root root 47 Sep 21 11:58 /usr/share/gir-1.0/GLib-2.0.gir -> ../../lib/x86_64-linux-gnu/gir-1.0/GLib-2.0.gir
$ ls -l /usr/lib/x86_64-linux-gnu/gir-1.0/
total 3860
-rw-r--r-- 1 root root 3952058 Oct 26 17:01 GLib-2.0.gir

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

2 participants