Exit Code 11 installing Persistent (Yesod) - haskell

I'm trying to install Yesod on my Mac (running Mavericks), but installation fails because of an error installing Persistent. Specifically, cabal install persistent yields:
Failed to install persistent-1.3.0.2
Updating documentation index /Users/Max/Library/Haskell/doc/index.html
cabal: Error: some packages failed to install:
persistent-1.3.0.2 failed during the building phase. The exception was:
ExitFailure 11
(The full output is available as a gist)
I don't think this is an issue with conflicts, because I ran rm -rf ~/.ghc ~/.cabal before trying this (though I think 3 globally installed packages might not have been erased—unsure).
I'm using the latest Haskell Platform with the ghc-clang-wrapper script.
Cabal versions:
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
GHC version:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3

Reinstalling Haskell platform allowed me to install Persistent, but the real issue was that I needed to install gcc48. Installing this cleared everything up. https://stackoverflow.com/a/21285413/1176156

Related

cabal-install failed to install a version that depends on the same version

I'm completely new to Haskell and I'm trying to replicate the code.world environment locally, so I need to install codeworld-api so that I can import CodeWorld. The problem is that when I run cabal install codeworld-api, it fails, and the following errors occur:
cabal: Error: some packages failed to install:
codeworld-api-0.7.0-JVbla7smM91CfqAXV0vVqz depends on codeworld-api-0.7.0
which failed to install.
haskell-src-exts-1.23.1-Z8xb2tkymYIClPofvAOw3 failed during the configure
step. The exception was:
ExitFailure 1
haskell-src-meta-0.8.7-GrcU6O1imfWLP5hRNzLFKK depends on
haskell-src-meta-0.8.7 which failed to install.
haskell-tests-0.1.0.0-IkWvWTmkph53PXtIhZGNWg depends on haskell-tests-0.1.0.0
which failed to install.
reflex-0.8.1.0-5XPDDia7wXx4bpQRZBxYDv depends on reflex-0.8.1.0 which failed
to install.
I also tried to add codeworld-api in the build-depends section in .cabal, but nothing changes.
I've read this, but --allow-newer also does nothing.
I tried, with no success:
cabal update
cabal install Cabal cabal-install
cabal new-install codeworld-api
cabal new-build
codeworld-api also doesn't show up in ghc-pkg list.
I have no idea what's happening...
Platform info
Ubuntu 20.04
cabal-install version 2.4.0.0
Cabal library version 2.4.0.1
ghc version 8.6.5
Packages installed from apt:
ghc
ghc-doc
cabal-install

Issue installing Snap on macOS Sierra

I'm having trouble installing the Haskell framework Snap on macOS Sierra. Whenever I install it, I get the following message:
Resolving dependencies...
Configuring securemem-0.1.9...
Configuring skein-1.0.9.4...
Configuring configurator-0.3.0.0...
Configuring cryptonite-0.24...
Building configurator-0.3.0.0...
Building securemem-0.1.9...
Building skein-1.0.9.4...
Failed to install configurator-0.3.0.0
Build log ( /Users/nicholas/.cabal/logs/ghc-8.2.1/configurator-0.3.0.0-6dySPcNCURWFswtMXJvzho.log ):
cabal: Entering directory '/tmp/cabal-tmp-66175/configurator-0.3.0.0'
Configuring configurator-0.3.0.0...
Preprocessing library for configurator-0.3.0.0..
Building library for configurator-0.3.0.0..
<command line>: cannot satisfy -package-id attoparsec-0.13.2.0-5dp4kBDsiGY4dQpLKbD5rk:
attoparsec-0.13.2.0-5dp4kBDsiGY4dQpLKbD5rk is unusable due to shadowed dependencies:
scientific-0.3.5.1-L0qYzdp0wpz8rO8gircNSR text-1.2.2.2-EGUst8sqNAZCw1xLPcmcMH
(use -v for more information)
cabal: Leaving directory '/tmp/cabal-tmp-66175/configurator-0.3.0.0'
Configuring transformers-base-0.4.4...
Building cryptonite-0.24...
Building transformers-base-0.4.4...
Installed securemem-0.1.9
Installed transformers-base-0.4.4
Installed skein-1.0.9.4
Installed cryptonite-0.24
Updating documentation index
/Users/nicholas/Library/Haskell/share/doc/x86_64-osx-ghc-8.2.1/index.html
cabal: Error: some packages failed to install:
configurator-0.3.0.0-6dySPcNCURWFswtMXJvzho failed during the building phase.
The exception was:
ExitFailure 1
snap-1.0.0.2-5CZKyA9EY4oLgkpHYCVfnv depends on snap-1.0.0.2 which failed to
install.
I'm using the Haskell Platform installed using homebrew (brew cask install haskell-platform), and cabal version 2.0.0.2. I have tried using sudo and deleting my ~/.ghc file
There was an issue with full 8.2.1 binary platform builds that's just been resolved: https://mail.haskell.org/pipermail/haskell-cafe/2017-October/127979.html
This was likely an instance of that.
(see also: GHC cannot find libraries on fresh install of Haskell-Platform)
This looks like a bug in Cabal 2 (or potentially GHC 8.2). See https://github.com/haskell/cabal/issues/4728. I'd recommend sticking to GHC 8.0.2 for the moment with either cabal 1.24 or Stack. I'm the case of Stack, the version won't matter, since it will use the Cabal version shipped with GHC.

cabal cabal-install error in Ubuntu 14.04

I followed the procedure here for installing GHC and cabal, and then for ghc-mod.
But, I get this error at this step
cabal update && cabal install cabal-install
Configuring cabal-install-1.24.0.2... Failed to install
cabal-install-1.24.0.2 cabal: Error: some packages failed to install:
cabal-install-1.24.0.2 failed during the configure step. ExitFailure
11
If you install haskell-platform via apt-get, version of ghc is under 7.10.3 until yakkety (Ubuntu 16.10).
This is problematic because cabal-1.24 requires ghc >= 8.0.1.
To solve this
install more recent version of ghc from its code,
just use stack and ghc-mod for stack.
P.S. if you are emacsen, I recommand you to use intero (site) instead of ghc-mod.

runhaskell Setup install Setup error

I am trying to install packages from haskell's Hackage using Cabal.
In particular, I am trying to download the gloss package:
cabal install gloss
Comes up with this error:
binary-0.7.1.0 failed during the building phase.
The exception was:
ExitFailure 1
bmp-1.2.5.2 depends on binary-0.7.1.0 which failed to install.
gloss-1.8.1.1 depends on binary-0.7.1.0 which failed to install.
I also tried binary-0.6.0.0. Because cabal install is not working, I am trying:
runhaskell Setup configure
runhaskell Setup build
runhaskell Setup install
...in the directory of the package, and I get the same error for every package:
Setup: Error: Could not find module: Data.Binary with any suffix: ["hi"] in
the search path: ["dist/build"]
I am also having trouble installing the newest version of Cabal.
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
The Glorious Glasgow Haskell Compilation System, version 7.6.3
Mac OSX 10.8 on MacBook Pro Retina
The binary package fails to install on latest versions of osx because osx uses clang instead of gcc, and 'gcc' is usually just a symlink to clang. gcc is used in the pre-processor stage (haskell supports c-like macros) but clang does not support all the features for the pre-processor stage that gcc supports.
To know if this is your problem, type 'gcc' in the terminal. If it says 'clang' somewhere, then this is the issue.
The solution is to get gcc, and replace the symlink to gcc with real gcc. Using 'runhaskell' will still have the same issue. For the most part, you should never try to install packages without cabal, it is by far the easiest way.
This is not an answer.
If you have downloaded package binary-0.7.1.0, you can untar it first, and go into that folder, and run
cabal configure
cabal build
cabal install
There must be more error message, such as line number, but I didn't see it.

installing reactive banana-wx or wx on redhat based linux with ghc 7.0.4

hi i'm trying to install, (without having to update or install the latest compiler),reactive-banana-wx and one of the requirement's are failing
cabal install reactive-banana-wx
and heres the error
Configuring wxc-0.90.0.4...
setup: failed
cabal: Error: some packages failed to install:
reactive-banana-wx-0.6.0.1 depends on wxc-0.90.0.4 which failed to install.
wx-0.90.0.1 depends on wxc-0.90.0.4 which failed to install.
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install
when i try to cabal install wxcore ,wx or wxc they all say failed and point towards wxc being required.
here's the error
cabal install wxc
Resolving dependencies...
[1 of 1] Compiling Main ( /tmp/wxc-0.90.0.419410/wxc-0.90.0.4/Setup.hs, /tmp/wxc-0.90.0.419410/wxc-0.90.0.4/dist/setup/Main.o )
Linking /tmp/wxc-0.90.0.419410/wxc-0.90.0.4/dist/setup/setup ...
Configuring wxc-0.90.0.4...
setup: failed
cabal: Error: some packages failed to install:
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1
here's my compiler info if it would be useful
ghc -v
Glasgow Haskell Compiler, Version 7.0.4, for Haskell 98, stage 2 booted by GHC version 7.0.4
I've got the same error trying to install phooey with ghc 7.4.1 on Debian tonight. The reason is a bug in the package wxc-0.90.0.4 and it should affect all wxHaskell-based packages. You can fix it, there is no need to downgrade your wxc package...
The easiest way to reproduce it is to do
cabal install wxc
or
cabal install glade
It might be a good idea to make sure that all prerequisites are in place, before you do it. wxc depends on a number of cabal and Linux packages and all of them should be installed and compiled... I did it in the most stupid way possible, just by running
cabal install wxc
and reading error messages which it spills out. This sweetie usually tells you what it wants... For instance, if it complains about cabal package x, just do cabal install x. If it complains about Linux package y, then use your Linux package manager and install the development version of this package, which is called normally lib<y>-dev in Debian. So, for instance, if
cabal install wxc
gives you an error saying that package gtk+2.0 is missing, you want to do
apt-get install libgtk2.0-dev
The same story with cairo, glade2 and other GTK-related libraries
When you are green with all prerequisites, you want to install wxWidgets-2.9, which is currently in the Development stage... so, it doesn't have any binaries for Linux and you should build it yourself. Download the source code from wxWidgets website and build it. It is pretty easy to do, just:
untar/unzip the source code to your favorite directory
run ./config
run ./make
If you are on wxc-0.90.0.4, at this moment you should encounter our little bug... To keep the long story short, it is in the file eljpen.cpp, which you can find in
~/.cabal/packages/hackage.haskell.org/wxc/0.90.0.4/wxc-0.90.0.4.tar.gz
Open the archive, go to the line 159 in the file and replace *_ref = NULL; with _ref = NULL or anything else what makes more sense. Then recreate the archive in the same place with the fixed eljpen.cpp file in it.
run ./make
It should work now.
run sudo make install (normally, you should have root privileges to insatll wxWidgets library...).
after it is done try to do
cabal install wx
again. It should be working now. I guess, after that you can enjoy your reactive-banana-wx, wxHaskell, phooey, etc.
PS http://sourceforge.net/tracker/index.php?func=detail&aid=3576397&group_id=73133&atid=536845. Why didn't I find it earlier? :/
I'v solved this problem on Lubuntu 12.10 so:
sudo cabal info wx
Synopsis: wxHaskell
Versions available: 0.11.1.2, 0.12.1.4, 0.12.1.5, 0.12.1.6, 0.13.2,
0.13.2.1, 0.13.2.3, 0.90, 0.90.0.1 (and 11 others)
I picked out different versions of wxHaskell, but only 0.13.2.3 was right.
sudo cabal install wx-0.13.2.3
...and everything has compiled and installed. Then I could install:
sudo cabal install reactive-banana-wx -fbuildExamples
That's no depends on the version of your Glasgow Haskell Compiler or the sort of your Linux.

Resources