owickstrom / komposition

The video editor built for screencasters
https://owickstrom.github.io/komposition/
Mozilla Public License 2.0
429 stars 21 forks source link

Unable to build with Stack: 'gobject-introspection-1.0' version >=1.32 not found #73

Closed dimsuz closed 5 years ago

dimsuz commented 5 years ago

Describe the bug Failing to build on Arch Linux. I've cloned then done stack install and have this:

semigroupoids-5.2.2: copy/register                     
Progress 90/112                     

--  While building package haskell-gi-0.21.3 using:
      /home/dima/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 configure --with-ghc=/home/dima/.stack/programs/x86_64-linux/ghc-tinfo6-8.4.3/bin/ghc --with-ghc-pkg=/home/dima/.stack/programs/x86_64-linux/ghc-tinfo6-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/dima/.stack/snapshots/x86_64-linux-tinfo6/lts-12.4/8.4.3/pkgdb --package-db=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/pkgdb --libdir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/lib --bindir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/bin --datadir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/share --libexecdir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/libexec --sysconfdir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/etc --docdir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/doc/haskell-gi-0.21.3 --htmldir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/doc/haskell-gi-0.21.3 --haddockdir=/home/dima/projects/komposition/.stack-work/install/x86_64-linux-tinfo6/lts-12.4/8.4.3/doc/haskell-gi-0.21.3 --dependency=Cabal=Cabal-2.2.0.1-3NZenIS6TKq4wbIU8rPEqU --dependency=attoparsec=attoparsec-0.13.2.2-BBVvhLzRKYh8bZUniQQAXA --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.5.11.0 --dependency=directory=directory-1.3.1.5 --dependency=filepath=filepath-1.4.2 --dependency=haskell-gi-base=haskell-gi-base-0.21.1-8hOUmSO3PcDBK7C9kaBigg --dependency=mtl=mtl-2.2.2 --dependency=pretty-show=pretty-show-1.7-8bRRNOzyOi99X2ErRO7kao --dependency=process=process-1.6.4.0-JCSkBtVrhb82fZ6bafWpk8 --dependency=regex-tdfa=regex-tdfa-1.2.3.1-9PkkapJrmiKFVG38JA02jN --dependency=safe=safe-0.3.17-HEmZRpXGD3s2ywM3rHJ1ur --dependency=text=text-1.2.3.0 --dependency=transformers=transformers-0.5.5.0 --dependency=xdg-basedir=xdg-basedir-0.2.2-I9cOiu1LJdUGTkJ3k3nkuZ --dependency=xml-conduit=xml-conduit-1.8.0-K53XyZ7mw9B3w7OV1uOdlJ
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/dima/projects/komposition/.stack-work/logs/haskell-gi-0.21.3.log

    Configuring haskell-gi-0.21.3...
    Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3: The pkg-config package
    'gobject-introspection-1.0' version >=1.32 is required but it could not be
    found.

To Reproduce Steps to reproduce the behavior:

  1. Clone project
  2. Run stack install
  3. See error

Desktop (please complete the following information):

akilegaspi commented 5 years ago

Can you identify the lts version of your stack config also?

dimsuz commented 5 years ago

Yes, it's lts-12.4, I believe it is taken from stack.yaml, so it shouldn't be something system-specific (if I understand correctly)...

dimsuz commented 5 years ago

Just in case, here's the start of my build log, right after cloning:

[dima@fprocket komposition]$ stack install
Downloaded lts-12.4 build plan.    
Didn't see gi-gtk-declarative-0.4.1 in your package indices.
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading timestamp                                                                            
Downloading snapshot                                                                             
Updating index                                                                                   
Updated package index downloaded                                                                 
Update complete                                                                                  
Populated index cache.    

...and then it went on with downloading/building particular dependencies.

owickstrom commented 5 years ago

I'm pretty sure you're missing system dependencies. I haven't built on Arch before, so the instructions are missing, but you may be able to find some guidance in the Ubuntu/Debian instructions: https://owickstrom.github.io/komposition/user-guide/installation/#debianubuntu

dimsuz commented 5 years ago

Oh, I didn't figure out from that log that it didn't find a system dependency, thought it's about some hackage library. I had to install Arch's extra/gobject-introspection package and compilation continued successfully!

owickstrom commented 5 years ago

Great!

dimsuz commented 5 years ago

Probably not the best place to ask, but maybe someone knows. After successful build of Komposition I'm trying to poke around, and even if I do no changes, each stack rebuild unregisters many gtk related deps and rebuilds them. This takes minutes to complete and is really annoying.

Any hints why this could be happening?

$ stack build --dry-run
Would unregister locally:
gi-atk-2.0.15
gi-cairo-1.0.17
gi-gdk-3.0.16
gi-gdkpixbuf-2.0.16
gi-gio-2.0.18
gi-glib-2.0.17
gi-gobject-2.0.16
gi-gst-1.0.16
gi-gtk-3.0.24
gi-gtk-declarative-0.4.1
gi-pango-1.0.16
haskell-gi-0.21.3
komposition-0.1.0
pretty-show-1.7

Would build:
gi-atk-2.0.15: database=local, source=package index, after: gi-glib-2.0.17,gi-gobject-2.0.16,haskell-gi-0.21.3
gi-cairo-1.0.17: database=local, source=package index, after: haskell-gi-0.21.3
gi-gdk-3.0.16: database=local, source=package index, after: gi-cairo-1.0.17,gi-gdkpixbuf-2.0.16,gi-gio-2.0.18,gi-glib-2.0.17,gi-gobject-2.0.16,gi-pango-1.0.16,haskell-gi-0.21.3
gi-gdkpixbuf-2.0.16: database=local, source=package index, after: gi-gio-2.0.18,gi-glib-2.0.17,gi-gobject-2.0.16,haskell-gi-0.21.3
gi-gio-2.0.18: database=local, source=package index, after: gi-glib-2.0.17,gi-gobject-2.0.16,haskell-gi-0.21.3
gi-glib-2.0.17: database=local, source=package index, after: haskell-gi-0.21.3
gi-gobject-2.0.16: database=local, source=package index, after: gi-glib-2.0.17,haskell-gi-0.21.3
gi-gst-1.0.16: database=local, source=package index, after: gi-glib-2.0.17,gi-gobject-2.0.16,haskell-gi-0.21.3
gi-gtk-3.0.24: database=local, source=package index, after: gi-atk-2.0.15,gi-cairo-1.0.17,gi-gdk-3.0.16,gi-gdkpixbuf-2.0.16,gi-gio-2.0.18,gi-glib-2.0.17,gi-gobject-2.0.16,gi-pango-1.0.16,haskell-gi-0.21.3
gi-gtk-declarative-0.4.1: database=local, source=package index, after: gi-glib-2.0.17,gi-gobject-2.0.16,gi-gtk-3.0.24,haskell-gi-0.21.3
gi-pango-1.0.16: database=local, source=package index, after: gi-glib-2.0.17,gi-gobject-2.0.16,haskell-gi-0.21.3
haskell-gi-0.21.3: database=local, source=package index, after: pretty-show-1.7
komposition-0.1.0: database=local, source=/home/dima/projects/komposition/, after: gi-gdk-3.0.16,gi-gdkpixbuf-2.0.16,gi-glib-2.0.17,gi-gobject-2.0.16,gi-gst-1.0.16,gi-gtk-3.0.24,gi-gtk-declarative-0.4.1,gi-pango-1.0.16,haskell-gi-0.21.3
pretty-show-1.7: database=local, source=package index

If I go on and build, it will do exactly the same on the next stack build: unregister, build again. (stack Version 1.9.3, lts-12.4)

Or maybe you have some hint on how you do small changes + recompilation (not using stack build perhaps?)