owickstrom / komposition

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

Install using stack failed in compilation time due to gtk #42

Closed rromeroar closed 4 years ago

rromeroar commented 6 years ago

Describe the bug Trying to compile komposition using stack install after doing a stack install happy to solve https://github.com/owickstrom/komposition/issues/41 issue

results in

...
src/Komposition/UserInterface/GtkInterface.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Komposition/UserInterface/GtkInterface.o )

Komposition/UserInterface/GtkInterface.hs:415:20: error:
    Not in scope: data constructor ‘Gtk.FileChooserNative’
    Perhaps you meant one of these:
      ‘Gtk.FileChooserButton’ (imported from GI.Gtk),
      variable ‘Gtk.fileChooserAction’ (imported from GI.Gtk),
      variable ‘Gtk.fileChooserGetFile’ (imported from GI.Gtk)
    Module ‘GI.Gtk’ does not export ‘FileChooserNative’.
    |
415 |       d <- Gtk.new Gtk.FileChooserNative []
    |                    ^^^^^^^^^^^^^^^^^^^^^

Komposition/UserInterface/GtkInterface.hs:420:7: error:
    Not in scope: ‘Gtk.nativeDialogSetTitle’
    Module ‘GI.Gtk’ does not export ‘nativeDialogSetTitle’.
    |
420 |       Gtk.nativeDialogSetTitle d title
    |       ^^^^^^^^^^^^^^^^^^^^^^^^

Komposition/UserInterface/GtkInterface.hs:421:7: error:
    Not in scope: ‘Gtk.nativeDialogSetTransientFor’
    Module ‘GI.Gtk’ does not export ‘nativeDialogSetTransientFor’.
    |
421 |       Gtk.nativeDialogSetTransientFor d (Just (lowest (currentViewParent s)))
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Komposition/UserInterface/GtkInterface.hs:422:7: error:
    Not in scope: ‘Gtk.nativeDialogSetModal’
    Module ‘GI.Gtk’ does not export ‘nativeDialogSetModal’.
    |
422 |       Gtk.nativeDialogSetModal d True
    |       ^^^^^^^^^^^^^^^^^^^^^^^^

src/Komposition/UserInterface/GtkInterface.hs:423:14: error:
    Not in scope: ‘Gtk.nativeDialogRun’
    Module ‘GI.Gtk’ does not export ‘nativeDialogRun’.
    |
423 |       res <- Gtk.nativeDialogRun d
    |              ^^^^^^^^^^^^^^^^^^^

src/Komposition/UserInterface/GtkInterface.hs:428:7: error:
    Not in scope: ‘Gtk.nativeDialogDestroy’
    Module ‘GI.Gtk’ does not export ‘nativeDialogDestroy’.
    |
428 |       Gtk.nativeDialogDestroy d
    |       ^^^^^^^^^^^^^^^^^^^^^^^

--  While building custom Setup.hs for package komposition-0.1.0 using:
      .stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 build lib:komposition exe:komposition exe:komposition-split --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

To Reproduce Steps to reproduce the behavior:

  1. Clean ubuntu 16.04 environment
  2. Install stack given stack instructions
  3. Clone komposition repo
  4. run: stack install happy
  5. run: stack install

Expected behavior komposition is correctly compiled and executable placed on proper path

Desktop (please complete the following information):

owickstrom commented 6 years ago

Thanks for the report! I noticed this problem when setting up CI using an Ubuntu docker image. It seems the native dialog is not included in the GTK+ version available in Ubuntu 16.04. I solved this by using Ubuntu 18.04 in CI, but there might be a better way for you. Perhaps you need to compile a newer GTK+ version from source, or use another PPA to get a more recent version.

owickstrom commented 6 years ago

Oh, and by the way, this should be added to the installation docs. If you want to submit a PR adding something that would be great, otherwise I can add it later.