gi-gtk-declarative
gi-gtk-declarative copied to clipboard
Error while buillding with stack - Could not find module ‘GI.GModule.Structs.Module’
I wanted to try out gi-gtk-declarative so I created an empty stack project and added gi-gtk-declarative and gi-gtk-declarative-app-simple as dependencies (using the latest lts resolver 17.10) but unfortunately it fails to build stating that the gdk pixbuf module cannot build:
gi-gdkpixbuf > [11 of 25] Compiling GI.GdkPixbuf.Objects.PixbufNonAnim
pipes-concurrency > Registering library for pipes-concurrency-2.0.12..
gi-gdkpixbuf > [12 of 25] Compiling GI.GdkPixbuf.Objects.PixbufSimpleAnim
gi-gdkpixbuf > [13 of 25] Compiling GI.GdkPixbuf.Objects.PixbufSimpleAnimIter
gi-gdkpixbuf > [14 of 25] Compiling GI.GdkPixbuf.Structs.PixbufFormat[boot]
gi-gdkpixbuf > [15 of 25] Compiling GI.GdkPixbuf.Objects.PixbufLoader
gi-gdkpixbuf > [16 of 25] Compiling GI.GdkPixbuf.Structs.PixbufModule[boot]
gi-gdkpixbuf > [17 of 25] Compiling GI.GdkPixbuf.Callbacks
gi-gdkpixbuf > [18 of 25] Compiling GI.GdkPixbuf.Objects.Pixbuf
gi-gdkpixbuf > [19 of 25] Compiling GI.GdkPixbuf.Objects
gi-gdkpixbuf > [20 of 25] Compiling GI.GdkPixbuf.Structs.PixbufModule
gi-gdkpixbuf >
gi-gdkpixbuf > /tmp/stack-e7459d0a8a8f5ac7/gi-gdkpixbuf-2.0.24/GI/GdkPixbuf/Structs/PixbufModule.hs:194:1: error:
gi-gdkpixbuf > Could not find module ‘GI.GModule.Structs.Module’
gi-gdkpixbuf > Use -v (or `:set -v` in ghci) to see a list of the files searched for.
gi-gdkpixbuf > |
gi-gdkpixbuf > 194 | import qualified GI.GModule.Structs.Module as GModule.Module
gi-gdkpixbuf > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi-gdkpixbuf >
Progress 2/7
-- While building package gi-gdkpixbuf-2.0.24 (scroll up to its section to see the error) using:
/tmp/stack-e7459d0a8a8f5ac7/gi-gdkpixbuf-2.0.24/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
has anyone else had this issue and are there any workarounds?
I'm running into the same issue.
Seems to be same as https://github.com/haskell-gi/haskell-gi/issues/339? And that thread has some workarounds.
I could resolve this by following this comment in haskell-gi/haskell-gi#339 as @owickstrom said.
Here's my commit that uses it. But even though it's working for now, I'm not sure whether it works fine for all cases because:
- It requires to update lts from 17.0 to 17.9
- snapshot file is placed unconsciously
- It ignores some bound constraints in cabal file. (e.g. it forces to use haskell-gi-0.25.0 whereas cabal file restrict it to be 0.24.*)