Helm install fails on OS X - haskell

I've been trying for a couple hours to install Helm, and I can't figure it out. I followed the instructions here : http://helm-engine.org/guide/installing/. The full output of which is at the bottom. I've come across a couple cases which seemed similar to my problem here and here, but the solutions didn't work. Is there any way to install Helm on OS X Yosemite?
Output:
helm-test~ cabal sandbox init
Writing a default package environment file to
/Users/marcusbuffett/Documents/programming/playground/helm-test/cabal.sandbox.config
Creating a new sandbox at
/Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox
helm-test~ brew install sdl2
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/sdl2-2.0.3.yosemite.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/sdl2-2.0.3.yosemite.bottle.1.tar.gz
==> Pouring sdl2-2.0.3.yosemite.bottle.1.tar.gz
🍺 /usr/local/Cellar/sdl2/2.0.3: 75 files, 3.9M
helm-test~ brew install cairo --without-x
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cairo-1.14.0.yosemite.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/cairo-1.14.0.yosemite.bottle.1.tar.gz
==> Pouring cairo-1.14.0.yosemite.bottle.1.tar.gz
🍺 /usr/local/Cellar/cairo/1.14.0: 106 files, 6.4M
helm-test~ brew install pango --without-x
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pango-1.36.8.yosemite.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/pango-1.36.8.yosemite.bottle.1.tar.gz
==> Pouring pango-1.36.8.yosemite.bottle.1.tar.gz
🍺 /usr/local/Cellar/pango/1.36.8: 132 files, 4.8M
helm-test~ cabal update
Downloading the latest package list from hackage.haskell.org
helm-test~ cabal install gtk2hs-buildtools
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox
Configuring hashtables-1.1.2.1...
Building hashtables-1.1.2.1...
Installed hashtables-1.1.2.1
Configuring gtk2hs-buildtools-0.13.0.3...
Building gtk2hs-buildtools-0.13.0.3...
Installed gtk2hs-buildtools-0.13.0.3
helm-test~ cabal install helm
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox
Configuring sdl2-1.3.0...
Configuring transformers-base-0.4.3...
Configuring utf8-string-0.3.8...
Building utf8-string-0.3.8...
Building transformers-base-0.4.3...
Building sdl2-1.3.0...
Installed transformers-base-0.4.3
Configuring elerea-2.8.0...
Building elerea-2.8.0...
Installed utf8-string-0.3.8
Configuring cairo-0.13.0.5...
Configuring glib-0.13.0.6...
Failed to install cairo-0.13.0.5
Build log ( /Users/marcusbuffett/Documents/programming/playground/helm-test/.cabal-sandbox/logs/cairo-0.13.0.5.log ):
[1 of 2] Compiling SetupWrapper ( /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/SetupWrapper.hs, /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/setup.hs, /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/setup/Main.o )
Linking /var/folders/6n/q0w_nmps7n72j9fvfy1lc40h0000gn/T/cairo-0.13.0.5-29788/cairo-0.13.0.5/dist/dist-sandbox-5fb32753/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 cairo-0.13.0.5...
setup: Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
Building glib-0.13.0.6...
Installed elerea-2.8.0
Installed glib-0.13.0.6
Installed sdl2-1.3.0
cabal: Error: some packages failed to install:
cairo-0.13.0.5 failed during the configure step. The exception was:
ExitFailure 1
helm-0.6.0 depends on cairo-0.13.0.5 which failed to install.
pango-0.13.0.4 depends on cairo-0.13.0.5 which failed to install.

Your problem is here:
Configuring cairo-0.13.0.5...
setup: Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
If you have installed XQuartx, the required files (xcb-shm.pc, etc.) are in /opt/X11/lib/pkgconfig.
I was able to build cairo and pango by first setting:
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig
Update:
I got compilation errors trying to build helm-0.6.0 against pango-0.13.0.3. Here's how I was finally able to get a successful build:
cabal get helm-0.6.0
cd helm-0.6.0
Edit helm.cabal and add glib to the first build-depends section
Make the following edits on the file src/FTP/Helm.hs:
line 222: change paFamily = textTypeface to paFamily = stringToGlib textTypeface
add the import: import System.Glib.UTFString (stringToGlib)
cabal configure
cabal install

In addition to what user5402 said, you will also need to manually install sdl2-1.2.0. The latest version (1.3.0) is not compatible with helm currently.

Related

Installing webkitgtk3 for GHCJS on osx

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?
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.

Not able to initialize sandbox using cabal on haskell platform

I have done the below steps to install cabal . I have already installed haskell platform using sudo apt-get install haskell-platform
http://coldwa.st/e/blog/2013-08-20-Cabal-sandbox.html
Building Cabal from git
Assuming you already have a previous version of cabal installed:
$ git clone git://github.com/haskell/cabal.git /path/to/cabal
$ cd /path/to/cabal
$ cabal install Cabal/ cabal-install/
However when I try to initialize a sandbox, it throws error as below.
vagrant#vagrant-ubuntu-trusty-32:/usr/lib/haskell-packages$ cabal sandbox --help
cabal: unrecognised command: sandbox (try --help)
Adding more details:
vagrant#vagrant-ubuntu-trusty-32:/usr/lib/haskell-packages$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
vagrant#vagrant-ubuntu-trusty-32:/usr/lib/haskell-packages$ which cabal
/home/vagrant/.cabal/bin/cabal
vagrant#vagrant-ubuntu-trusty-32:/usr/lib/haskell-packages$ cabal --help
This program is the command line interface to the Haskell Cabal infrastructure.
See http://www.haskell.org/cabal/ for more information.
Usage: cabal COMMAND [FLAGS]
or: cabal [GLOBAL FLAGS]
Global flags:
-h --help Show this help text
-V --version Print version information
--numeric-version Print just the version number
Commands:
install Installs a list of packages.
update Updates list of known packages
list List packages matching a search string.
info Display detailed information about a particular package.
fetch Downloads packages for later installation.
unpack Unpacks packages for user inspection.
check Check the package for common mistakes
sdist Generate a source distribution file (.tar.gz).
upload Uploads source packages to Hackage
report Upload build reports to a remote server.
init Interactively create a .cabal file.
configure Prepare to build the package.
build Make this package ready for installation.
copy Copy the files into the install locations.
haddock Generate Haddock HTML documentation.
clean Clean up after a build.
hscolour Generate HsColour colourised code, in HTML format.
register Register this package with the compiler.
test Run the test suite, if any (configure with UserHooks).
bench Run the benchmark, if any (configure with UserHooks).
upgrade (command disabled, use install instead)
help Help about commands
For more information about a command use:
cabal COMMAND --help
To install Cabal packages from hackage use:
cabal install foo [--dry-run]
Occasionally you need to update the list of available packages:
cabal update
You can edit the cabal configuration file to set defaults:
/home/vagrant/.cabal/config
vagrant#vagrant-ubuntu-trusty-32:/usr/lib/haskell-packages$ cabal COMMAND --help
cabal: unrecognised command: COMMAND (try --help)
vagrant#vagrant-ubuntu-trusty-32:/usr/lib/haskell-packages$ cabal sandbox --help
cabal: unrecognised command: sandbox (try --help)
The Cabal installed by apt is a little older and this is likely the one in your PATH. It gets installed to /usr/bin. You can check with:
which cabal
And to see the version:
cabal -v
You should put the one in ~/.cabal/bin in your PATH first with:
export PATH="$HOME/.cabal/bin:$PATH
(Probably best to put this in your ~/.bash_profile or similar)
On my system:
.whogan:~$ which cabal
/home/whogan/.cabal/bin/cabal
.whogan:~$ cabal -V
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
.whogan:~$ /usr/bin/cabal -V
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
Edit: Tried with a new Vagrant box, ran apt-get install haskell-platform and install from git:
[vagrant#vagrantbox:~] $ git clone git://github.com/haskell/cabal.git cabal-wip
Cloning into 'cabal-wip'...
remote: Counting objects: 48926, done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 48926 (delta 16), reused 0 (delta 0), pack-reused 48876
Receiving objects: 100% (48926/48926), 26.39 MiB | 10.37 MiB/s, done.
Resolving deltas: 100% (29033/29033), done.
Checking connectivity... done.
[vagrant#vagrantbox:~] $ cd cabal-wip
[vagrant#vagrantbox:~/cabal-wip][master] $ cabal install Cabal/ cabal-install/
Config file path source is default config file.
Config file /home/vagrant/.cabal/config not found.
Writing default configuration to /home/vagrant/.cabal/config
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
Configuring Cabal-1.23.0.0...
Building Cabal-1.23.0.0...
Preprocessing library Cabal-1.23.0.0...
[ 1 of 85] Compiling Distribution.Lex ( Distribution/Lex.hs, dist/build/Distribution/Lex.o )
..
[85 of 85] Compiling Distribution.Simple ( Distribution/Simple.hs, dist/build/Distribution/Simple.o )
In-place registering Cabal-1.23.0.0...
Installing library in /home/vagrant/.cabal/lib/Cabal-1.23.0.0/ghc-7.6.3
Registering Cabal-1.23.0.0...
Installed Cabal-1.23.0.0
[1 of 1] Compiling Main ( cabal-install/Setup.hs, cabal-install/dist/setup/Main.o )
Linking cabal-install/dist/setup/setup ...
Configuring cabal-install-1.23.0.0...
Building cabal-install-1.23.0.0...
Preprocessing executable 'cabal' for cabal-install-1.23.0.0...
[ 1 of 81] Compiling Distribution.Client.Utils.LabeledGraph ( Distribution/Client/Utils/LabeledGraph.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Utils/LabeledGraph.o )
...
[81 of 81] Compiling Main ( Main.hs, dist/build/cabal/cabal-tmp/Main.o )
Linking dist/build/cabal/cabal ...
Generating manual page dist/build/cabal/cabal.1 ...
Installing executable(s) in /home/vagrant/.cabal/bin
Installed cabal-install-1.23.0.0
It's installed 1.23.0.0 to ~/.cabal/bin, but after this the PATH is still pointing to the system one:
[vagrant#vagrantbox:~/cabal-wip][master] $ which cabal
/usr/bin/cabal
[vagrant#vagrantbox:~/cabal-wip][master] $ cabal -V
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
So I modify to put the user/git version first:
[vagrant#vagrantbox:~/cabal-wip][master] $ export PATH="~/.cabal/bin:$PATH"
[vagrant#vagrantbox:~/cabal-wip][master] $ which cabal
/home/vagrant/.cabal/bin/cabal
[vagrant#vagrantbox:~/cabal-wip][master] $ cabal -V
cabal-install version 1.23.0.0
compiled using version 1.23.0.0 of the Cabal library
It seems OK after that:
[vagrant#vagrantbox:~/cabal-wip][master] $ mkdir ~/tmp && cd ~/tmp
[vagrant#vagrantbox:~/tmp] $ cabal sandbox init
Writing a default package environment file to
/home/vagrant/tmp/cabal.sandbox.config
Creating a new sandbox at /home/vagrant/tmp/.cabal-sandbox
I used trusty64 rather than trusty32 but I would hope that's not significant in this case.

cabal install hangs installing yesod-platform

The cabal install of yesod-platform hangs downloading xss-sanitize. NetHogs shows no network activity related to this download.
$ cabal install yesod-platform
Resolving dependencies...
Downloading xss-sanitize-0.3.4...
Other packages download and install without delay.
I'm on Fedora 18. The haskell-platform and cabal-install are up-to-date from the repos.
$ cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1
Edit
I left it run overnight it seemed to give up on xss-sanitizer, and continued installing the other dependencies. Here is the tail.
...
Configuring yesod-test-1.2.1...
Building yesod-test-1.2.1...
Preprocessing library yesod-test-1.2.1...
[1 of 3] Compiling Yesod.Test.CssQuery ( Yesod/Test/CssQuery.hs, dist/build/Yesod/Test/CssQuery.o )
[2 of 3] Compiling Yesod.Test.TransversingCSS ( Yesod/Test/TransversingCSS.hs, dist/build/Yesod/Test/TransversingCSS.o )
[3 of 3] Compiling Yesod.Test ( Yesod/Test.hs, dist/build/Yesod/Test.o )
Yesod/Test.hs:113:1:
Warning: In the use of `runFakeHandler'
(imported from Yesod.Core, but defined in yesod-core-1.2.4.2:Yesod.Core.Internal.Run):
"Usually you should *not* use runFakeHandler unless you really understand how it works and why you need it."
Registering yesod-test-1.2.1...
Installing library in /home/smithd/.cabal/lib/yesod-test-1.2.1/ghc-7.4.1
cabal: Error: some packages failed to install:
xss-sanitize-0.3.4 failed while downloading the package. The exception was:
<socket: 4>: hGetBufSome: timeout (Connection timed out)
yesod-1.2.2.1 depends on xss-sanitize-0.3.4 which failed to install.
yesod-auth-1.2.2.1 depends on xss-sanitize-0.3.4 which failed to install.
yesod-form-1.3.2.1 depends on xss-sanitize-0.3.4 which failed to install.
yesod-platform-1.2.4.2 depends on xss-sanitize-0.3.4 which failed to install.
[smithd#lin2900 ~]$ cabal install yesod-platform
My companies internet filter was blocking the haskell-xss-sanitize package as a possible XSS threat. Specifically the test modules. Have your admin white-list hackage if possible.

Cabal fails to install Idris language on OSX Lion

I'm trying to install the Idris language in an OSX Lion using the installation guide provided on the official tutorial. I have alraedy installed GMP. This is the error I get:
$ cabal install idris
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
[1 of 1] Compiling Main ( /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/Setup.hs, /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/Main.o )
Linking /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/setup ...
setup: The program llvm-config version ==3.3.* is required but it could not be
found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on llvm-general-3.3.5.0 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
llvm-general-3.3.5.0 failed during the configure step. The exception was:
ExitFailure 1
Trying to install Idris without LLVM produces this error:
$ cabal install idris -f-LLVM
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on libffi-0.1 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
I was having this same problem on OSX Mavericks. To get Idris to compile, I used homebrew to install gmp, then I had to do 'export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig', and then 'cabal install idris -f-LLVM'. I got the tip to export the PKG_CONFIG_PATH variable from this site:
https://groups.google.com/d/msg/idris-lang/gxcdvRIA2OI/NqKSd4zHkI4J
Mavericks already had libffi installed, and I didn't want to install a second copy from source, which is what the PKG_CONFIG_PATH trick helped me avoid. Do 'brew info libffi' to find the correct path to export. Hopefully someone will create a homebrew formula for Idris soon...
The first error indicates you should install the LLVM development packages of your distribution (not through cabal) and the second indicates you should install the development package for the GCC libffi library. What Linux distribution are you using? Or are you on Windows/Mac?

Can't install glib with cabal on Windows - during the configure step

On windows 7 x64,
I tried:
1. install gtk+ all in one bundle 2.16
2. add MinGW's bin address to PATH Environment variables
3. add GTK+'s bin address to PATH Environment variables
On command line execute the:
cabal update
cabal install gtk2hs-buildtools
So far so good. But when I execute the:
cabal install gtk
the error arise
gtk-0.12.1 depends on glib-0.12.1 which failed to install.
I execute next command:
cabal install glib
Then I tried:
cabal install glib --ghc-option=-DCABAL_VERSION_MINOR=10
Relults:
Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( C:\Users\User\AppData\Local\Temp\glib-0.12
.16572\glib-0.12.1\SetupWrapper.hs, C:\Users\User\AppData\Local\Temp\glib-0.12.1
6572\glib-0.12.1\dist\setup\SetupWrapper.o )
[2 of 2] Compiling Main ( C:\Users\User\AppData\Local\Temp\glib-0.12
.16572\glib-0.12.1\Setup.hs, C:\Users\User\AppData\Local\Temp\glib-0.12.16572\gl
ib-0.12.1\dist\setup\Main.o )
Linking C:\Users\User\AppData\Local\Temp\glib-0.12.16572\glib-0.12.1\dist\setup\
setup.exe ...
Warning: .drectve `-aligncomm:___gmp_junk,2' unrecognized
cabal: Error: some packages failed to install:
glib-0.12.1 failed during the configure step. The exception was:
C:\Users\User\AppData\Local\Temp\glib-0.12.16572\glib-0.12.1\dist\setup\setup.exe:
runProcess: invalid argument (Exec format error)
Help, thanks!

Resources