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.
Related
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.
I am trying to install the diagrams package. If I do
cabal install diagrams
I get (towards the end)
Configuring lens-4.2...
Building lens-4.2...
Preprocessing library lens-4.2...
src/Control/Lens/Internal/Zoom.hs:47:8:
Could not find module `Control.Monad.Trans.Except'
It is a member of the hidden package `transformers-0.4.1.0'.
Perhaps you need to add `transformers' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
Failed to install lens-4.2
cabal: Error: some packages failed to install:
diagrams-1.2 depends on lens-4.2 which failed to install.
diagrams-contrib-1.1.2 depends on lens-4.2 which failed to install.
diagrams-core-1.2.0.1 depends on lens-4.2 which failed to install.
diagrams-lib-1.2.0.1 depends on lens-4.2 which failed to install.
diagrams-svg-1.1 depends on lens-4.2 which failed to install.
force-layout-0.3.0.4 depends on lens-4.2 which failed to install.
lens-4.2 failed during the building phase. The exception was:
ExitFailure 1
So then I try
$cabal install lens transformers diagrams
And I get (towards the end)
In-place registering diagrams-lib-1.2.0.1...
Installing library in /home/theking/.cabal/lib/diagrams-lib-1.2.0.1/ghc-7.6.3
Registering diagrams-lib-1.2.0.1...
Installed diagrams-lib-1.2.0.1
cabal: Error: some packages failed to install:
cairo-0.12.5.3 failed during the configure step. The exception was:
ExitFailure 1
diagrams-0.3 depends on glib-0.12.5.4 which failed to install.
diagrams-cairo-1.2 depends on glib-0.12.5.4 which failed to install.
glib-0.12.5.4 failed during the configure step. The exception was:
ExitFailure 1
pango-0.12.5.3 depends on glib-0.12.5.4 which failed to install.
So I tried one more thing
$ cabal install glib
Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( /tmp/glib-0.12.5.4-9179/glib-0.12.5.4/SetupWrapper.hs, /tmp/glib-0.12.5.4-9179/glib-0.12.5.4/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /tmp/glib-0.12.5.4-9179/glib-0.12.5.4/Setup.hs, /tmp/glib-0.12.5.4-9179/glib-0.12.5.4/dist/setup/Main.o )
Linking /tmp/glib-0.12.5.4-9179/glib-0.12.5.4/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 glib-0.12.5.4...
setup: The program gtk2hsC2hs version >=0.13.8 is required but the version
found at /usr/bin/gtk2hsC2hs is version 0.13.6
Failed to install glib-0.12.5.4
cabal: Error: some packages failed to install:
glib-0.12.5.4 failed during the configure step. The exception was:
ExitFailure 1
And I got stuck here. So how do I install diagrams. I don't really care how it gets installed (getting a little fed up with cabal) as long as it gets installed.
Notes: I am on linux. I also tried cabal install gtk2hs-buildtools.
The second error block says that:
diagrams-0.3 depends on glib-0.12.5.4 which failed to install.
diagrams-0.3 is a very old version of diagrams, and in normal circumstances cabal shouldn't be trying to install it. Recent versions of diagrams do not even depend on diagrams-cairo, so as long as you don't need the Cairo backend you can work around the Cairo/GTK issues by asking for the current version of diagrams, as in:
cabal install diagrams-1.2
Ideally, it would be good to find out why your cabal is pulling the old version. cabal install diagrams --dry-run (which only show the packages that would be pulled without actually installing them) and ghc-pkg list (which shows the packages currently in your system) might help figuring that out.
As for the Cairo-related issues, as Daniel Wagner suggests a PATH issue might be preventing cabal from using the latest versions of the gtk2hs-buildtools you have installed. For instance, you might have a global installation of the tools, which is overriding the local one you have done with cabal. ghc-pkg list allows you to verify that. Also, check this relevant question.
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!
I tried to install few modules this morning to get Eclipse FP to work, scion-browser and buildwrapper failed.
[root#localhost ghc-mod]# cabal install scion-browser
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: scion-browser-0.3.0
[root#localhost ghc-mod]# cabal install buildwrapper
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: buildwrapper-0.8.0
I briefly went on #haskell IRC but couldn't get an answer but I didn't hang around long in IRC. Then I gave up on EclipseFP and went on merry path with vim. I've used vim before for other languages and I thought I will be fine even though I might not have a debugger. But curiosity took me to install few plugins that can enhance my coding experience in haskell, however one of the plugins require ghc-mod so I thought I'll give cabal install a go again. I ended up with following error.
[root#localhost ghc-mod]# cabal install ghc-mod
Resolving dependencies...
Configuring ghc-mod-0.3.0...
Building ghc-mod-0.3.0...
Preprocessing executable 'ghc-mod' for ghc-mod-0.3.0...
[1 of 6] Compiling Param ( Param.hs, dist/build/ghc-mod/ghc-mod-tmp/Param.o )
[2 of 6] Compiling Lang ( Lang.hs, dist/build/ghc-mod/ghc-mod-tmp/Lang.o )
[3 of 6] Compiling List ( List.hs, dist/build/ghc-mod/ghc-mod-tmp/List.o )
[4 of 6] Compiling Check ( Check.hs, dist/build/ghc-mod/ghc-mod-tmp/Check.o )
[5 of 6] Compiling Browse ( Browse.hs, dist/build/ghc-mod/ghc-mod-tmp/Browse.o )
Browse.hs:41:72:
Not in scope: data constructor `ExplicitForall'
Perhaps you meant `ExplicitForAll' (imported from Language.Haskell.Exts.Extension)
Failed to install ghc-mod-0.3.0
cabal: Error: some packages failed to install:
ghc-mod-0.3.0 failed during the building phase. The exception was:
ExitFailure 1
I tried cloning the project then running cabal install and I end up with following result.
[root#localhost ghc-mod]# cabal install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-4.1.0
I'd really like to get to the bottom of this issue. I don't know exactly where cabal is failing so it is really hard to find out what dependency it is complaining about exactly. By the way following are the versions of cabal and ghc.
[root#localhost ghc-mod]# cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
[root#localhost ghc-mod]#
[root#localhost ghc-mod]# ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
Could anyone help me understand the error message from cabal please? I'm relatively new to haskell so apologies if I've missed a trivial point.
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?