lettier / gifcurry

😎 The open-source, Haskell-built video editor for GIF makers.
https://lettier.github.io/gifcurry
BSD 3-Clause "New" or "Revised" License
1.34k stars 54 forks source link

install breaks on OsX Mojave #50

Closed dsegggg closed 4 years ago

dsegggg commented 4 years ago

............. gi-gio > [293 of 293] Compiling GI.Gio gi-gio > ignoring (possibly broken) abi-depends field for packages gi-gio > copy/register gi-gio > Installing library in /Users/dseg/.stack/snapshots/x86_64-osx/a0f8ac41185163f0ec5615c93364ede844fbc37853c89b47e65ddbf9ccd85d51/8.4.3/lib/x86_64-osx-ghc-8.4.3/gi-gio-2.0.24-62ocVXj51dmLpZAJ9yC9U3 gi-gio > Registering library for gi-gio-2.0.24..

-- While building package gi-pango-1.0.21 using: /private/var/folders/15/5tgph_8x12n_s3vd5lwc8ryr0000gp/T/stack26541/gi-pango-1.0.21/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1 Progress 64/70 dseg@ MyMac:wrk$

EthanZeigler commented 4 years ago

Can confirm this is not specific to mojave. Same error on high sierra.

-- While building package gi-pango-1.0.21 using: /private/var/folders/yj/8gp__vsx2gx009ym1wggv50h0000gn/T/stack43452/gi-pango-1.0.21/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build --ghc-options " -fdiagnostics-color=always" Process exited with code: ExitFailure 1 Progress 4/7

lettier commented 4 years ago

Hello,

Unfortunately, I do not have access to macOS Mojave or High Sierra so my diagnostic abilities will be limited. I can confirm Gifcurry 6.0.0.0 builds and runs fine on macOS Sierra 10.12.

Can you copy and paste the entire build output from start to error?

Did you use the Mac install script?

Are you able to compile Haskell programs?

Are you able to compile the haskell-gi example? Step 1. Step 2. haskell-gi is a dependency of Gifcurry.

:+1:

EthanZeigler commented 4 years ago

@lettier I'm so sorry for the monstrosity that is this log.

https://gist.githubusercontent.com/EthanZeigler/d0e9e57c027c3480db31d7153b8cfd92/raw/6eb52606bc794eb47e5891229136ffa70197dc06/log

On further review, gi is pooping itself and cabal can't seem to resolve dependencies. Looking into it now.

Edit: The haskell-gi library completely fails to install on macos high sierra and I don't know nearly enough haskell to understand what the problem is.

gi-pango> [84 of 94] Compiling GI.Pango.Structs.AttrShape
gi-pango>
gi-pango> /private/var/folders/yj/8gp__vsx2gx009ym1wggv50h0000gn/T/stack32326/gi-pango-1.0.21/GI/Pango/Structs/AttrShape.hs:522:88: error:
gi-pango>     Variable not in scope:
gi-pango>       destroyFunc :: FunPtr GLib.Callbacks.C_DestroyNotify
gi-pango>     |
gi-pango> 522 |     result <- pango_attr_shape_new_with_data inkRect' logicalRect' data_ maybeCopyFunc destroyFunc
gi-pango>     |                                                                                        ^^^^^^^^^^^
lettier commented 4 years ago

Hello @EthanZeigler,

It may be related to this issue.

To test this, open /Users/ethanzeigler/gifcurry/Gifcurry.cabal and change the line

                      , gi-pango == 1.0.21

to

                      , gi-pango == 1.0.22

Now open /Users/ethanzeigler/gifcurry/stack.yaml and change the line

  - gi-pango-1.0.21

to

  - gi-pango-1.0.22

Remove the /Users/ethanzeigler/gifcurry/stack.yaml.lock file.

With the terminal open, navigate to /Users/ethanzeigler/gifcurry (or wherever the Git Gifcurry directory is) and run the following:

stack setup
stack clean
stack install alex happy
stack install gtk2hs-buildtools
stack install hsc2hs
stack install
stack exec -- gifcurry_gui

Another thing you can try is to locate the GObject Introspection for Pango and alter it (be sure to make a backup before hand). You may have multiple copies, so you'll need to alter the one the build process is picking up.

find / -path '*Pango-1.0.gir' -print 2>/dev/null

Inside this XML file is a line destroy="4". Remove that attribute and save.

Go from this

          <parameter name="copy_func"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1"
                     scope="notified"
                     destroy="4">

to this

          <parameter name="copy_func"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1"
                     scope="notified">

After altering the file, and with the terminal open, navigate to /Users/ethanzeigler/gifcurry and run the following:

stack setup
stack clean
stack install alex happy
stack install gtk2hs-buildtools
stack install hsc2hs
stack install
stack exec -- gifcurry_gui

If it is related to that issue, I'll go ahead and create another release with the new gi-pango version.

:+1:

EthanZeigler commented 4 years ago

... can everyone write issue replies this well please? This is truly amazing.

It looks like your macos script works from downloads, so I'll be using ~/Downloads/gifcurry instead.

Simply changing the cabal file also did not work, pulled the wrong version. Changed stack.yaml's pango version too.

That change lead to this.

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for gi-pango-1.0.22:
    haskell-gi-0.22.6 from stack configuration does not match >=0.23.0 && <0.24  (latest matching version is 0.23.0)
    haskell-gi-base-0.22.2 from stack configuration does not match >=0.23 && <0.24  (latest matching version is 0.23.0)
needed due to Gifcurry-6.0.0.0 -> gi-pango-1.0.22

Some different approaches to resolving this:

  * Set 'allow-newer: true' in /Users/ethanzeigler/.stack/config.yaml to ignore all version constraints and build anyway.

  * Recommended action: try adding the following to your extra-deps in /Users/ethanzeigler/Downloads/gifcurry/stack.yaml:

- haskell-gi-0.23.0@sha256:bf78485bdded4aa807dc570970c8a140099fc048f600b03ece69dd171c8fb873,5118
- haskell-gi-base-0.23.0@sha256:6c90f3e710921e7884a86fb53bf4b4e50a178f61e3a4ea365a1aa9deba30a075,2341

Following that advice, I updated those dependencies to the version it suggested. That lead to this.

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for Gifcurry-6.0.0.0:
    haskell-gi-0.23.0 from stack configuration does not match ==0.22.6  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match ==0.22.2  (latest matching version is 0.22.2)
needed since Gifcurry is a build target.

In the dependencies for gi-atk-2.0.20:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-atk-2.0.20

In the dependencies for gi-cairo-1.0.22:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-cairo-1.0.22

In the dependencies for gi-gdk-3.0.21:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gdk-3.0.21

In the dependencies for gi-gdkpixbuf-2.0.22:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gdkpixbuf-2.0.22

In the dependencies for gi-gio-2.0.24:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gio-2.0.24

In the dependencies for gi-glib-2.0.22:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-glib-2.0.22

In the dependencies for gi-gobject-2.0.21:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gobject-2.0.21

In the dependencies for gi-gst-1.0.21:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gst-1.0.21

In the dependencies for gi-gstbase-1.0.21:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gstbase-1.0.21

In the dependencies for gi-gstvideo-1.0.21:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gstvideo-1.0.21

In the dependencies for gi-gtk-3.0.31:
    haskell-gi-0.23.0 from stack configuration does not match >=0.22.5 && <0.23  (latest matching version is 0.22.6)
    haskell-gi-base-0.23.0 from stack configuration does not match >=0.22.0 && <0.23  (latest matching version is 0.22.2)
needed due to Gifcurry-6.0.0.0 -> gi-gtk-3.0.31

Admittedly knowing nothing about haskell, I tried using both versions of the dependency at the same time, expecting flames. Of course, it failed.

Any suggestions? @lettier

lettier commented 4 years ago

Hello @EthanZeigler

I've tweaked the other dependencies to work with the latest gi-pango.

Replace ~/Downloads/gifcurry/Gifcurry.cabal with the following.

Gifcurry.cabal ```haskell name: Gifcurry version: 6.0.0.0 synopsis: GIF creation utility. description: The open-source, Haskell-built video editor for GIF makers. homepage: https://github.com/lettier/gifcurry license: BSD3 license-file: LICENSE author: Lettier maintainer: Lettier copyright: (C) 2016 David Lettier category: Application , Library , Graphics build-type: Simple extra-source-files: ./LICENSE , ./CHANGELOG.md , ./makefile , ./lib/GtkMainSyncAsync.hs , ./lib/GiCairoCairoBridge.hs , ./lib/LICENSE , ./src/dev/Paths_Gifcurry.hs , ./src/data/style.css , ./src/data/style-3-18.css , ./src/data/style-3-20.css , ./src/data/about-dialog-button-image.svg , ./src/data/clone-icon.svg , ./src/data/check-icon.svg , ./src/data/color-count-icon.svg , ./src/data/crop-icon.svg , ./src/data/crop-left-icon.svg , ./src/data/crop-right-icon.svg , ./src/data/crop-top-icon.svg , ./src/data/crop-bottom-icon.svg , ./src/data/dither-icon.svg , ./src/data/down-icon.svg , ./src/data/end-icon.svg , ./src/data/error-icon.svg , ./src/data/file-icon.svg , ./src/data/file-size.svg , ./src/data/fps-icon.svg , ./src/data/gifcurry-logo.svg , ./src/data/gifcurry-icon.svg , ./src/data/info-icon.svg , ./src/data/left-icon.svg , ./src/data/left-right-icon.svg , ./src/data/minus-icon.svg , ./src/data/open-icon.svg , ./src/data/plus-icon.svg , ./src/data/pause-icon.svg , ./src/data/pen-icon.svg , ./src/data/right-icon.svg , ./src/data/save-as-gif-icon.svg , ./src/data/save-as-video-icon.svg , ./src/data/save-icon.svg , ./src/data/spiral-icon.svg , ./src/data/start-icon.svg , ./src/data/t-icon.svg , ./src/data/text-icon.svg , ./src/data/up-icon.svg , ./src/data/up-down-icon.svg , ./src/data/upload-icon.svg , ./src/data/view-icon.svg , ./src/data/warning-icon.svg , ./src/data/width-icon.svg , ./src/data/x-icon.svg , ./src/data/pattern.svg , ./src/data/gray-pattern.png , ./src/data/purple-pattern.png , ./src/data/green-pattern.png , ./src/data/orange-pattern.png data-files: data/gui.glade , data/style.css , data/style-3-18.css , data/style-3-20.css , data/about-dialog-button-image.svg , data/clone-icon.svg , data/check-icon.svg , data/color-count-icon.svg , data/crop-icon.svg , data/crop-left-icon.svg , data/crop-right-icon.svg , data/crop-top-icon.svg , data/crop-bottom-icon.svg , data/dither-icon.svg , data/down-icon.svg , data/end-icon.svg , data/error-icon.svg , data/file-icon.svg , data/file-size.svg , data/fps-icon.svg , data/gifcurry-logo.svg , data/gifcurry-icon.svg , data/info-icon.svg , data/left-icon.svg , data/left-right-icon.svg , data/minus-icon.svg , data/open-icon.svg , data/plus-icon.svg , data/pause-icon.svg , data/pen-icon.svg , data/right-icon.svg , data/save-as-gif-icon.svg , data/save-as-video-icon.svg , data/save-icon.svg , data/spiral-icon.svg , data/start-icon.svg , data/t-icon.svg , data/text-icon.svg , data/up-icon.svg , data/up-down-icon.svg , data/upload-icon.svg , data/view-icon.svg , data/warning-icon.svg , data/width-icon.svg , data/x-icon.svg , data/gray-pattern.png , data/purple-pattern.png , data/green-pattern.png , data/orange-pattern.png data-dir: ./src/ cabal-version: >= 1.10 source-repository head type: git location: https://github.com/lettier/gifcurry library exposed-modules: Gifcurry build-depends: base == 4.11.* , process >= 1.6.2.0 , temporary >= 1.2 && < 1.3 , directory == 1.3.* , text == 1.2.* , filepath == 1.4.* , filemanip == 0.3.6.* , bytestring == 0.10.* , yaml == 0.8.26.* hs-source-dirs: ./src , ./src/lib/ ghc-options: -Wall -freverse-errors default-language: Haskell2010 executable gifcurry_gui main-is: Main.hs build-depends: base == 4.11.* , haskell-gi == 0.23.0 , haskell-gi-base == 0.23.0 , gi-gobject == 2.0.22 , gi-gio == 2.0.25 , gi-glib == 2.0.23 , gi-pango == 1.0.22 , gi-gdk == 3.0.22 , gi-gdkpixbuf == 2.0.23 , gi-gtk == 3.0.32 , gi-cairo == 1.0.23 , gi-gstbase == 1.0.22 , gi-gst == 1.0.22 , gi-gstvideo == 1.0.22 , cairo == 0.13.* , pango == 0.13.* , process >= 1.6.2.0 , temporary >= 1.2 && < 1.3 , directory == 1.3.* , text == 1.2.* , filepath == 1.4.* , filemanip == 0.3.6.* , transformers == 0.5.* , pureMD5 == 2.1.* , bytestring == 0.10.* , yaml == 0.8.26.* other-modules: Paths_Gifcurry , GuiRecords , GuiCapabilities , Gifcurry , GuiStyle , GuiTextOverlays , GuiPreview , GuiKeyboard , GuiMisc , GtkMainSyncAsync , GiCairoCairoBridge ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -freverse-errors hs-source-dirs: ./lib/ , ./src/ , ./src/gui/ , ./src/lib/ default-language: Haskell2010 executable gifcurry_cli main-is: Main.hs build-depends: base == 4.11.* , process >= 1.6.2.0 , temporary >= 1.2 && < 1.3 , directory == 1.3.* , cmdargs == 0.10.* , text == 1.2.* , filepath == 1.4.* , filemanip == 0.3.6.* , aeson == 1.4.2.* , bytestring == 0.10.* , yaml == 0.8.26.* other-modules: Gifcurry ghc-options: -Wall -freverse-errors hs-source-dirs: ./src/ , ./src/cli/ , ./src/lib/ default-language: Haskell2010 ```

And replace ~/Downloads/gifcurry/stack.yaml with the following.

stack.yaml ```yaml flags: {} extra-package-dbs: [] packages: - '.' explicit-setup-deps: ! '*': true extra-deps: - aeson-1.4.2.0 - temporary-1.2.1.1 - yaml-0.8.26 - haskell-gi-0.23.0 - haskell-gi-base-0.23.0 - gi-atk-2.0.21 - gi-gobject-2.0.22 - gi-gio-2.0.25 - gi-glib-2.0.23 - gi-pango-1.0.22 - gi-gdk-3.0.22 - gi-gdkpixbuf-2.0.23 - gi-gtk-3.0.32 - gi-cairo-1.0.23 - gi-gstbase-1.0.22 - gi-gst-1.0.22 - gi-gstvideo-1.0.22 resolver: lts-12.14 compiler-check: match-exact ```

This will remove the dependency conflicts.

With the two files replaced, try running through the build process again.

stack setup
stack clean
stack install alex happy
stack install gtk2hs-buildtools
stack install hsc2hs
stack install
stack exec -- gifcurry_gui

:+1:

EthanZeigler commented 4 years ago

Success! Build now succeeds on macos 10.14.6

lettier commented 4 years ago

Hello @EthanZeigler

That's great. Thank you for testing Gifcurry on Mojave. I will create a new release with the updated dependencies.

:+1:

EthanZeigler commented 4 years ago

Quick question: what's with the gtkstreamer missing warning? I found the library but the binary was talking foreverto download

lettier commented 4 years ago

Hello @EthanZeigler

Was the message one of these?

:+1:

EthanZeigler commented 4 years ago

Third

lettier commented 4 years ago

The gtksink plugin integrates GStreamer and GTK by providing GStreamer with a GUI widget it can render every video frame to. Without it, Gifcurry will fallback to showing the first and last frame of the GIF as the preview.

👍

SigmaX commented 4 years ago

FWIW, I get the same error on macOS Catalina.

--  While building package gi-pango-1.0.21 using:
      /private/var/folders/vl/rzww4vjs563dcwsk3mp9dd980000gn/T/stack21489/gi-pango-1.0.21/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
Progress 64/70
Lastofthefirst commented 4 years ago

Hello, I have been unable to install on macOS Catalina, with the following error:

--  While building package gi-pango-1.0.21 using:
      /private/var/folders/pf/vwkh48ps7qdbwz2xxn8mxp6r0000gn/T/stack12999/gi-pango-1.0.21/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
Progress 1/4
lettier commented 4 years ago

Fixed in 6.0.1.0.

:+1: