Couldn't find API description for GLib.time_t
When building haskell-gi in Debian, we started running into this:
Running debian/hlibrary.setup configure --ghc -v2 --package-db=/var/lib/ghc/package.conf.d --prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib --libexecdir=/usr/lib --builddir=dist-ghc --ghc-option=-optl-Wl,-z,relro --haddockdir=/usr/lib/ghc-doc/haddock/gi-glib-2.0.29/ --datasubdir=gi-glib --htmldir=/usr/share/doc/libghc-gi-glib-doc/html/ --enable-library-profiling
Non-zero exit code 1.
Using Parsec parser
[1;91mERROR: [97mcouldn't find API description for GLib.time_t[22;94m
Please report this at https://github.com/haskell-gi/haskell-gi/issues[0m
CallStack (from HasCallStack):
error, called at lib/Data/GI/CodeGen/Util.hs:126:6 in haskell-gi-0.26.7-C46MepbmwZA1H8dt48knUn:Data.GI.CodeGen.Util
terror, called at lib/Data/GI/CodeGen/Code.hs:556:13 in haskell-gi-0.26.7-C46MepbmwZA1H8dt48knUn:Data.GI.CodeGen.Code
findAPIByName, called at lib/Data/GI/CodeGen/GObject.hs:17:44 in haskell-gi-0.26.7-C46MepbmwZA1H8dt48knUn:Data.GI.CodeGen.GObject
at /usr/share/perl5/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm line 109.
I suspect this is due to this being applied in Debian's glib package, which seems to be exposing time_t (and others) in the GIR XML. https://gitlab.gnome.org/GNOME/glib/-/commit/fa45ea2ac9ca2e85321c5d34f8f40f7f9b614db1
Hi @swt2c, https://github.com/haskell-gi/haskell-gi/pull/430 should address this issue.
Thanks @iliastsi nice fix, much nicer than what I was coming up with.
Sorry for the noob question, but how exactly can I use the answers and/or updates presented in #430 to solve this? I'm getting this same error but in EndeavourOS/Arch.
Sorry for the noob question, but how exactly can I use the answers and/or updates presented in #430 to solve this? I'm getting this same error but in EndeavourOS/Arch.
@c0nradLC I'm not sure how you're building the package, but if you're using cabal-install then you should be able to add the following to the cabal.project file:
-- Fix "ERROR: couldn't find API description for GLib.time_t"
source-repository-package
type: git
location: https://github.com/sheaf/haskell-gi
tag: ec11dd69ab6a3a9f7f7e967f5f7ffa7d9206cd2a
This allows you to point to a commit in GitHub, before there is a corresponding release on Hackage.
Sorry for the noob question, but how exactly can I use the answers and/or updates presented in #430 to solve this? I'm getting this same error but in EndeavourOS/Arch.
@c0nradLC I'm not sure how you're building the package, but if you're using
cabal-installthen you should be able to add the following to thecabal.projectfile:-- Fix "ERROR: couldn't find API description for GLib.time_t" source-repository-package type: git location: https://github.com/sheaf/haskell-gi tag: ec11dd69ab6a3a9f7f7e967f5f7ffa7d9206cd2aThis allows you to point to a commit in GitHub, before there is a corresponding release on Hackage.
Thank you very much for the answer, I knew it was possible to do something like this but just didn't know how to do it, amazing.
This was fixed in https://github.com/haskell-gi/haskell-gi/commit/8fa06f827d5f7d41a4756576a783d9e682bbd4d5, so I believe this issue can now be closed (I don't have the rights to close an issue on this repository).