unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49122: gobject-introspection and not finding cairo
@ 2021-06-19 18:29 John Kehayias via Bug reports for GNU Guix
  2021-06-20 23:59 ` bug#49122: (No Subject) John Kehayias via Bug reports for GNU Guix
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2021-06-19 18:29 UTC (permalink / raw)
  To: 49122

Hello,

I'm trying to build some new packages, one of which is ghc-gi-cairo (from ghc-haskell-gi: https://github.com/haskell-gi/haskell-gi). These depend on gobject-introspection and finding library information from gir. However, it appears the typelib for cairo does not include the absolute path for cairo (though gobject-introspection right now does not depend on cairo, so that makes sense?) and the library cannot be found from this info.

Perhaps the name exposed in the typelib should be something else? I know there are patches for paths in gobject-introspection, and this issue of library path from gobject-introspection is not just in guix (e.g. https://github.com/Cimbali/pympress/issues/58). In building I do see LIBRARY_PATH includes the correct gobject-introspection (it does find the girepository in configure) and cairo, but as far as I can tell the path to cairo must be found via the typelib when using gobject-introspection?

I've tried building gobject-introspection with cairo enabled in meson, which didn't help. I also tried patching the cairo.gir file (as in https://github.com/Cimbali/pympress/issues/58#issuecomment-503174954), but haven't figured out what needs to go in there to make it work. Probably gobject-introspection needs to be build with cairo as an input and correctly get the full path to the library in generating the typelib? But what goes in the gir/cairo-1.0.gir.in file exactly?

From the gobject-introspection package running:

strings /gnu/store/irmw6agiw3adqphw8c3m19g31fw1yf34-gobject-introspection-1.62.0/lib/girepository-1.0/cairo-1.0.typelib | grep lib

has output:

libcairo-gobject.so.2
xlib


End of building ghc-gi-cairo has the following message:

starting phase `configure'
running "runhaskell Setup.hs" with command "configure" and parameters ("--prefix=/gnu/store/w95yciqs7i7aqm6v7qa6fiy6m6f25czb-ghc-gi-cairo-1.0.25" "--libdir=/gnu/store/w95yciqs7i7aqm6v7qa6fiy6m6f25czb-ghc-gi-cairo-1.0.25/lib" "--docdir=/gnu/store/w95yciqs7i7aqm6v7qa6fiy6m6f25czb-ghc-gi-cairo-1.0.25/share/doc/ghc-gi-cairo-1.0.25" "--libsubdir=$compiler/$pkg-$version" "--package-db=/tmp/guix-build-ghc-gi-cairo-1.0.25.drv-0/package.conf.d" "--global" "--enable-tests" "--enable-shared" "--enable-executable-dynamic" "--ghc-option=-fPIC" "--ghc-option=-optl=-Wl,-rpath=/gnu/store/w95yciqs7i7aqm6v7qa6fiy6m6f25czb-ghc-gi-cairo-1.0.25/lib/$compiler/$pkg-$version")

** (process:19): WARNING **: 17:28:36.142: Failed to load shared library 'libcairo-gobject.so.2' referenced by the typelib: libcairo-gobject.so.2: cannot open shared object file: No such file or directory
Could not resolve symbol "cairo_gobject_context_get_type" in namespace "cairo-1.0"

Appreciate any tips, help, or things to try!

John




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-20 22:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19 18:29 bug#49122: gobject-introspection and not finding cairo John Kehayias via Bug reports for GNU Guix
2021-06-20 23:59 ` bug#49122: (No Subject) John Kehayias via Bug reports for GNU Guix
2024-01-20 22:18   ` bug#49122: gobject-introspection and not finding cairo Maxim Cournoyer
2021-06-21  2:04 ` bug#49122: (No Subject) John Kehayias via Bug reports for GNU Guix
2021-09-07 23:06 ` bug#49122: gobject-introspection and not finding cairo Raghav Gururajan via Bug reports for GNU Guix
2021-09-08  0:07   ` Raghav Gururajan via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).