komposition icon indicating copy to clipboard operation
komposition copied to clipboard

Install on Ubuntu 20 with Stack fails

Open eleanor-em opened this issue 4 years ago • 3 comments

Describe the bug Following the instructions with Ubuntu 20.04, I get a build failure without much extra useful information.

To Reproduce Steps to reproduce the behavior:

  1. Clone the repository and cd to the directory
  2. Install the required packages with apt
  3. Run stack install

Result (with the beginning parts snipped)

gi-gio                           > [292 of 295] Compiling GI.Gio.Functions
gi-gio                           > [293 of 295] Compiling GI.Gio.Structs.UnixMountPoint
gi-gio                           > [294 of 295] Compiling GI.Gio.Structs
gi-gio                           > [295 of 295] Compiling GI.Gio
gi-gio                           >
gi-gio                           > copy/register
gi-gio                           > Installing library in /home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/lib/x86_64-linux-ghc-8.6.5/gi-gio-2.0.19-6YnyLUfkNsRHAcvmPNu5xd
gi-gio                           > Registering library for gi-gio-2.0.19..

--  While building package gi-pango-1.0.19 using:
      /tmp/stack-8c0e45e255bec831/gi-pango-1.0.19/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 configure --user --package-db=clear --package-db=global --package-db=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/pkgdb --libdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/lib --bindir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/bin --datadir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/share --libexecdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/libexec --sysconfdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/etc --docdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/doc/gi-pango-1.0.19 --htmldir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/doc/gi-pango-1.0.19 --haddockdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/doc/gi-pango-1.0.19 --dependency=Cabal=Cabal-2.4.1.0-IBbax5zHztPeovxF8fJKx --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.6.0.1 --dependency=gi-glib=gi-glib-2.0.17-He3SeHEEYb1DWiT4TpX9ev --dependency=gi-gobject=gi-gobject-2.0.19-HLSOgyjJxUE2zYdtgISec5 --dependency=haskell-gi=haskell-gi-0.21.5-B7oEYie8Wik99xbtCPMhIP --dependency=haskell-gi-base=haskell-gi-base-0.21.5-B7L3HQFSPkOFeLcsLCK63O --dependency=haskell-gi-overloading=haskell-gi-overloading-1.0-6w3IXGDooXgu3RA2LfTuf --dependency=text=text-1.2.3.1 --dependency=transformers=transformers-0.5.6.2 --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1
Progress 109/114

If I retry, I get this:

❯ stack install
gi-pango          > configure
gi-pango          > [1 of 2] Compiling Main             ( /tmp/stack-35742d06c6636296/gi-pango-1.0.19/Setup.hs, /tmp/stack-35742d06c6636296/gi-pango-1.0.19/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/Main.o )
gi-pango          > [2 of 2] Compiling StackSetupShim   ( /home/eleanor/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-35742d06c6636296/gi-pango-1.0.19/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/StackSetupShim.o )
gi-pango          > Linking /tmp/stack-35742d06c6636296/gi-pango-1.0.19/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/setup ...
gi-pango          > Configuring gi-pango-1.0.19...
gi-pango          > setup: An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'.
gi-pango          >

--  While building package gi-pango-1.0.19 using:
      /tmp/stack-35742d06c6636296/gi-pango-1.0.19/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 configure --user --package-db=clear --package-db=global --package-db=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/pkgdb --libdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/lib --bindir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/bin --datadir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/share --libexecdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/libexec --sysconfdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/etc --docdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/doc/gi-pango-1.0.19 --htmldir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/doc/gi-pango-1.0.19 --haddockdir=/home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/47db9579f749287cd890242a9ca37d7fb30e52ec4cf61fe5af8aa4e3a51e7db2/8.6.5/doc/gi-pango-1.0.19 --dependency=Cabal=Cabal-2.4.1.0-IBbax5zHztPeovxF8fJKx --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.6.0.1 --dependency=gi-glib=gi-glib-2.0.17-He3SeHEEYb1DWiT4TpX9ev --dependency=gi-gobject=gi-gobject-2.0.19-HLSOgyjJxUE2zYdtgISec5 --dependency=haskell-gi=haskell-gi-0.21.5-B7oEYie8Wik99xbtCPMhIP --dependency=haskell-gi-base=haskell-gi-base-0.21.5-B7L3HQFSPkOFeLcsLCK63O --dependency=haskell-gi-overloading=haskell-gi-overloading-1.0-6w3IXGDooXgu3RA2LfTuf --dependency=text=text-1.2.3.1 --dependency=transformers=transformers-0.5.6.2 --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1
Progress 1/5

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Komposition version or commit [e.g. 0.1.0]: commit 64893d5
  • Build environment [e.g. Stack on msys]: Stack 2.3.3 on zsh

eleanor-em avatar Aug 25 '20 07:08 eleanor-em

HI! Thanks for the detailed report.

Might this be the same issue as in https://github.com/haskell-gi/haskell-gi/issues/239? It seems weird though because that suggests an old version of the system gobject package, but if you're running Ubuntu 20.04 it should be fairly recent.

owickstrom avatar Aug 25 '20 16:08 owickstrom

Hi! Thanks for the response. I checked my version of gobject and it was 2.64.3 (which seems quite recent).

I tried first switching to ghc 8.10.2, then using the nightly resolver by editing stack.yaml in the cloned repository as per the linked issue:

resolver: nightly-2020-08-27

I was told off about something to do with Cabal, and it said to also add the below to extra-deps (which I did):

 - Cabal-3.2.0.0@sha256:d0d7a1f405f25d0000f5ddef684838bc264842304fd4e7f80ca92b997b710874,27320

Installing failed at first:

Cabal                 > [241 of 241] Compiling Distribution.Simple
massiv-io             > configure
massiv-io             > Configuring massiv-io-0.3.0.1...
massiv-io             > build
massiv-io             > Preprocessing library for massiv-io-0.3.0.1..
massiv-io             > Building library for massiv-io-0.3.0.1..
massiv-io             > [ 1 of 14] Compiling Data.Massiv.Array.IO.Base
massiv-io             >
massiv-io             > /tmp/stack-75929ce1bb342f88/massiv-io-0.3.0.1/src/Data/Massiv/Array/IO/Base.hs:315:6: error:
massiv-io             >     Not in scope: type constructor or class ‘A.Sz’
massiv-io             >     Perhaps you meant ‘A.S’ (imported from Data.Massiv.Array)
massiv-io             >     Module ‘Data.Massiv.Array’ does not export ‘Sz’.
massiv-io             >     |
massiv-io             > 315 |   => A.Sz ix
massiv-io             >     |      ^^^^
massiv-io             >
Cabal                 > copy/register
Cabal                 > Installing library in /home/eleanor/.stack/snapshots/x86_64-linux-tinfo6/a373614fa0f477f3bc9bc8f6aef1fb44ffe035428a177d1a3de1fa21a362a784/8.10.2/lib/x86_64-linux-ghc-8.10.2/Cabal-3.2.0.0-IWfC34dGzefL7vhtitPsXA
Cabal                 > Registering library for Cabal-3.2.0.0..

--  While building package massiv-io-0.3.0.1 using:
      /home/eleanor/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.0.0_ghc-8.10.2 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.0.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
Progress 84/115

If I try with the version in the link (nightly-2019-07-07) I get a similar but different error while building happy. Really not sure what's going on!

(And, if I remove the Cabal line and retry, I get the same gi-pango error.)

eleanor-em avatar Aug 27 '20 05:08 eleanor-em

OK! Yeah if you change the Stack resolver I think it might be a world of pain with all those extra-deps. I haven't run with Stack in a long time, so I'm a bit out of the loop and not much help. :disappointed:

I'll see if I can bump the Stack resolver when I get some time. I'm suspecting it's the Haskell packages that are outdated and your system dependencies that are "too new", but I'm not sure. Maybe bumping these versions will help.

owickstrom avatar Sep 08 '20 05:09 owickstrom