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

Error while buillding with stack - Could not find module ‘GI.GModule.Structs.Module’ #101

Open
sigrdrifa opened this issue May 9, 2021 · 3 comments

Comments

@sigrdrifa
Copy link

sigrdrifa commented May 9, 2021

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?

@Matthew-Mosior
Copy link

I'm running into the same issue.

@owickstrom
Copy link
Owner

Seems to be same as haskell-gi/haskell-gi#339? And that thread has some workarounds.

@Cj-bc
Copy link

Cj-bc commented Aug 5, 2021

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.*)

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

4 participants