I am using the most recent version of GHC distributed with Ubuntu 11.10 (7.0.3).
When I try to install glade, I get this:
$ cabal install glade
Resolving dependencies...
Downloading glade-0.12.1...
[1 of 2] Compiling SetupWrapper ( /tmp/glade-0.12.129125/glade-0.12.1/SetupWrapper.hs, /tmp/glade-0.12.129125/glade-0.12.1/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /tmp/glade-0.12.129125/glade-0.12.1/Setup.hs, /tmp/glade-0.12.129125/glade-0.12.1/dist/setup/Main.o )
Linking /tmp/glade-0.12.129125/glade-0.12.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 glade-0.12.1...
Preprocessing library glade-0.12.1...
gtk2hsC2hs: UName: root name supply used after saving
cabal: Error: some packages failed to install:
glade-0.12.1 failed during the building phase. The exception was:
ExitFailure 1
gtk2hs-buildtools and gtk were successfully installed via cabal. But glade does not install. Is this a bug?
I've managed to install the latest glade package via
$ cabal unpack glade
...
$ cd glade-0.12.1
$ runhaskell Setup.hs configure --user
...
$ runhaskell Setup.hs build
...
$ runhaskell Setup.hs build # Note: twice - first build has failed.
...
$ runhaskell Setup.hs install
...
Too bad I have no idea what has caused the error.
Related
When I install glib this is the error that I get. I think my problem has to do with the "legacy fallback" part but I have no way to fix that.
ghc version: 8.6.5
cabal version: 3.0.0.0
$ cabal install glib
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- glib-0.13.8.0 (lib:glib) (requires build)
Starting glib-0.13.8.0 (all, legacy fallback)
Building glib-0.13.8.0 (all, legacy fallback)
Failed to build glib-0.13.8.0.
Build log (
/home/dagon/.cabal/logs/ghc-8.6.5/glib-0.13.8.0-83f4ff904d65860d6da22747d08c5e962bdbbd1be59c0e6934c51b56a26d7fa7.log
):
[1 of 1] Compiling Main ( /tmp/cabal-install.-14521/dist-newstyle/tmp/src-14521/glib-0.13.8.0/dist/setup/setup.hs, /tmp/cabal-install.-14521/dist-newstyle/tmp/src-14521/glib-0.13.8.0/dist/setup/Main.o )
Linking /tmp/cabal-install.-14521/dist-newstyle/tmp/src-14521/glib-0.13.8.0/dist/setup/setup ...
Configuring glib-0.13.8.0...
Preprocessing library for glib-0.13.8.0..
c2hs/c/CAST.hs:(1017,5)-(1069,22): Non-exhaustive patterns in function put_
cabal: Failed to build glib-0.13.8.0. See the build log above for details.
$ rm -rf ~/.cabal ~/.ghc
$ cabal upadte
$ cabal install glib
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.
I have Ubuntu 14.04LTS. I downloaded the latest ghc-7.8.3 from http://www.haskell.org/ghc/download_ghc_7_8_3#x86_64linux and installed it to /usr/local.
Then I updated my cabal to version 1.20.0.3.
I typed cabal install QuickCheck into my terminal, and got:
Resolving dependencies...
Configuring tf-random-0.5...
Building tf-random-0.5...
Preprocessing library tf-random-0.5...
[1 of 4] Compiling System.Random.TF.Gen ( src/System/Random/TF/Gen.hs, dist/build/System/Random/TF/Gen.o )
[2 of 4] Compiling System.Random.TF.Init ( src/System/Random/TF/Init.hs, dist/build/System/Random/TF/Init.o )
src/System/Random/TF/Init.hs:94:5: Warning:
In the use of ‘bitSize’ (imported from Data.Bits):
Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"
[3 of 4] Compiling System.Random.TF.Instances ( src/System/Random/TF/Instances.hs, dist/build/System/Random/TF/Instances.o )
[4 of 4] Compiling System.Random.TF ( src/System/Random/TF.hs, dist/build/System/Random/TF.o )
/usr/bin/ld: cannot find -lHSrandom-1.0.1.1-ghc7.8.3
collect2: error: ld returned 1 exit status
Failed to install tf-random-0.5
cabal: Error: some packages failed to install:
QuickCheck-2.7.5 depends on tf-random-0.5 which failed to install.
tf-random-0.5 failed during the building phase. The exception was:
ExitFailure 1
BTW, I already have haskell-platform with ghc-7.6.3 installed via apt-get before.
I remember having a similar issue when setting up ghc-7.8. It has something to do with the new cabal, which somehow isn't compatible with libraries installed with an older versio (but it fails to give the correct problem reason.
Anyway, I think reinstalling the packages in question
cabal install random --reinstall --force-reinstalls
sets it up so cabal install tf-random should then succeed.
I just did a cabal update and tried to install 'lens' from hackage. That gave me the following error -
$ cabal install -j lens
Resolving dependencies...
Configuring dlist-0.7.0.1...
... <snip>
Configuring mtl-2.0.1.0...
Building mtl-2.0.1.0...
Failed to install mtl-2.0.1.0
Last 10 lines of the build log ( /home/aj/.cabal/logs/mtl-2.0.1.0.log ):
Building mtl-2.0.1.0...
Preprocessing library mtl-2.0.1.0...
[ 1 of 21] Compiling Control.Monad.Writer.Class (
Control/Monad/Writer/Class.hs, dist/build/Control/Monad/Writer/Class.o )
[ 2 of 21] Compiling Control.Monad.State.Class ( Control/Monad/State/Class.hs,
dist/build/Control/Monad/State/Class.o )
[ 3 of 21] Compiling Control.Monad.Reader.Class (
Control/Monad/Reader/Class.hs, dist/build/Control/Monad/Reader/Class.o )
[ 4 of 21] Compiling Control.Monad.RWS.Class ( Control/Monad/RWS/Class.hs,
dist/build/Control/Monad/RWS/Class.o )
[ 5 of 21] Compiling Control.Monad.Identity ( Control/Monad/Identity.hs,
dist/build/Control/Monad/Identity.o )
[ 6 of 21] Compiling Control.Monad.Error.Class ( Control/Monad/Error/Class.hs,
dist/build/Control/Monad/Error/Class.o )
Control/Monad/Error/Class.hs:93:18: Not in scope: `catch'
... <snip>
cabal: Error: some packages failed to install:
aeson-0.7.0.3 depends on mtl-2.0.1.0 which failed to install.
exceptions-0.6 depends on mtl-2.0.1.0 which failed to install.
free-4.7.1 depends on mtl-2.0.1.0 which failed to install.
lens-4.1.2 depends on mtl-2.0.1.0 which failed to install.
mtl-2.0.1.0 failed during the building phase. The exception was:
ExitFailure 1
So looks like mtl-2.0.1.0 is broken. However some more dependency tracking reveals that nothing in the lens package definition actually depends on that version of mtl. Infact, the next thing I tried was -
$ cabal install -j aeson
$ cabal install -j free
$ cabal install -j lens
And that succeeds without problems.
So why would cabal try to install mtl-2.0.1.0 when installing lens directly? I've tried removing my .ghc and .cabal directories and repeating the steps, with the same results. The cabal version I'm using is 1.16 -
$ cabal -V
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
The workaround that I am using is to first install transformers-compat with the transformers 3 flag
$ cabal install -ftransformer3 transformers-compat
and then install lens with the transformers 0.3.0.0 constraint
$ cabal install --constraint="transformers==0.3.0.0" lens
I hit this error too. I think I've managed to fix it by manually unpacking mtl-2.0.1.0, explicitly adding catch to the import list of Control.Exception in Control/Monad/Error/Class.hs (L:55), then running cabal install.
After that I was able to run cabal install lens. I'd be interested to know if that works for you too!
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!