19

I'm trying to install the ghcjs-dom package on Mac OSX. It's been bumpy as there are a lot of dependencies. Webkitgtk3 is my current nemesis

cabal install ghcjs-dom
Resolving dependencies...
Configuring webkitgtk3-0.14.1.1...
Failed to install webkitgtk3-0.14.1.1
Build log ( /Users/markkaravan/.cabal/logs/webkitgtk3-0.14.1.1.log ):
[1 of 2] Compiling SetupWrapper     ( /var/folders/br/4zwhphlx3816v87cc0bb5sxh0000gn/T/cabal-tmp-24401/webkitgtk3-0.14.1.1/SetupWrapper.hs, /var/folders/br/4zwhphlx3816v87cc0bb5sxh0000gn/T/cabal-tmp-24401/webkitgtk3-0.14.1.1/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /var/folders/br/4zwhphlx3816v87cc0bb5sxh0000gn/T/cabal-tmp-24401/webkitgtk3-0.14.1.1/dist/setup/setup.hs, /var/folders/br/4zwhphlx3816v87cc0bb5sxh0000gn/T/cabal-tmp-24401/webkitgtk3-0.14.1.1/dist/setup/Main.o )
Linking /var/folders/br/4zwhphlx3816v87cc0bb5sxh0000gn/T/cabal-tmp-24401/webkitgtk3-0.14.1.1/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring webkitgtk3-0.14.1.1...
setup: The pkg-config package 'webkitgtk-3.0' version >=1.8 is required but it
could not be found.
cabal: Error: some packages failed to install:
ghcjs-dom-0.2.3.1 depends on webkitgtk3-0.14.1.1 which failed to install.
webkitgtk3-0.14.1.1 failed during the configure step. The exception was:
ExitFailure 1

I've tried the following commands to install this sucker:

brew install gtk+3    
brew install webkitgtk
brew install webkitgtk3
brew install webkitgtk+3
cabal install webkitgtk3

...but no such luck. does anyone know how to install this package?

michaelmesser
  • 3,601
  • 2
  • 19
  • 42
Mark Karavan
  • 2,654
  • 1
  • 18
  • 38
  • what error do you get with `cabal install webkitgtk3` it should be available at https://hackage.haskell.org/package/webkitgtk3 – epsilonhalbe Jan 13 '16 at 19:45
  • @epsilonhalbe `setup: The pkg-config package 'webkitgtk-3.0' version >=1.8 is required but it could not be found.` It seems to require an OS package, but there doesn't seem to be one for homebrew. – Mark Karavan Jan 13 '16 at 19:52
  • 1
    Is `webkitgtk-3.0` listed in `pkg-config --list-all`? If it doesn't, try to find `webkitgtk-3.0.pc` file (or something similar) and add path to it to `PKG_CONFIG_PATH` environment variable. Also try `cabal configure -v3` for detailed log. – Yuras Jan 13 '16 at 21:34
  • 1
    @Yuras: I found a tar.gz file in `~/.cabal/packages/hackage.haskell.org/webkitgtk3/`, but no `.pc` file. When I `--list-all` I see `webkit2gtk-web-extension-4.0` and `webkit2gtk-4.0`. – Mark Karavan Jan 13 '16 at 22:51
  • Did you ever figure this out? – michaelmesser Aug 01 '16 at 01:54
  • This sounds like what @MarkKaravan wrote in the comment: A missing OS package. That almost always means an OS package in its "dev" version. Maybe when installing GTK you can choose something? Maybe you can compile one from source? Otherwise, the only thing left is to wonder why the heck ghcjs would need such a package and switch either OS or language. There are some EDSLs in Haskell that compile to JS (Haste, Sunroof), there are Haskell-inspired JS-wrappers like Purecript or Elm and according to documentation UHC can compile Haskell to JS, too. – MarLinn Aug 17 '16 at 23:05
  • @MarLinn ghcjs-dom not ghcjs needs it when it is using webkit-gtk not ghc-js – michaelmesser Aug 18 '16 at 19:42
  • FWIW, the docs seem to reference requiring MacPorts in order to install. Homebrew currently doesn't implement WebKitGTK3: https://github.com/leksah/leksah#building-on-os-x ; https://github.com/gtk2hs/webkit/issues/13 – Wade Williams Oct 12 '16 at 18:44

1 Answers1

1

As I'm still running into this problem now, I've created a repository here with an attempt at a homebrew tap to solve this problem. It's not fully functional yet but I think it's close.

John
  • 14,944
  • 12
  • 57
  • 57