When I try to install hsc2hs with the command
cabal install hsc2hs
the following error was returned:
Main.hs:14:0:
fatal error: ../../includes/ghcconfig.h: No such file or directory
compilation terminated.
World file is already up to date.
cabal.exe: Error: some packages failed to install:
hsc2hs-0.67.20120610 failed during the building phase. The exception was:
ExitFailure 1
hsc2hs is distributed together with GHC.
If you for some reason want to build a newer or modified version, you'll have to build it together with GHC itself.
Related
I first tried to install Hlint. cabal install hlint but then I got the error:
cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.18.2 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.37 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77
Then I tried to install ghc-mod since I read that hlint is a dependency of that package(?). Thinking that it might resolve the problem. So i did cabal install ghc-mod which gave me the error.
cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
ghc-mod-5.6.0.0 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.17.1 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.35 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77
So it seems to be the same problem, around my the package old-time-1.1.0.3.
The best way to know where it fails is to go through each failed package and install them one after the other.
I had issue with haskell-src-exts in which showed up in hlint and when I tried to cabal install haskell-src-exts it was happythat wasn't properly installed.
There are lots of variables that could be at play to explain what's going on, including cabal-install and ghc versions. It would be useful if you included the cabal --version and ghc --version output in your question.
That said: I'd recommend trying out the installation using Stack. Once you have Stack installed (on POSIX systems, usually sufficient to run curl -sSL https://get.haskellstack.org/ | sh), you can install with stack --resolver lts-6.16 --install-ghc --no-system-ghc install hlint.
Are you on Windows or Linux? What does ghc --version say? What about ghc-pkg old-time? I recommend trying to run cabal install old-time directly, which should reproduce the error directly.
Solution by OP.
Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines:
extra-prog-path: C:\Program Files\Haskell Platform\8.0.1\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\include
I'm trying to install hsc3 following this tutorial:
http://rd.slavepianos.org/?t=hsc3-texts&e=lhs/hsc3-tutorial.lhs
But I get this error:
Sound/SC3/UGen/Type.hs:482:5:
bitSizeMaybe' is not a (visible) method of classBits'
Failed to install hsc3-0.16
cabal:
Error: some packages failed to install:
hsc3-0.16 failed during the building phase. The exception was:
ExitFailure 1
Tried both the "cabal install hsc3" method and downloading from the darcs repository.
GHC --version is 7.6.3
I'm probably missing something trivial.
I'm trying to build an application using Yesod on Windows. I installed the haskell platform, and then Yesod using cabal. The command yesod init works, but after installing the dependencies cabal exits with the following message:
Resolving dependencies...
Configuring yosog-0.0.0...
Building yosog-0.0.0...
Failed to install yosog-0.0.0
Last 10 lines of the build log ( C:\Users\dna\AppData\Roaming\cabal\logs\yosog-0.0.0.log ):
Installing library in
C:\Users\dna\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\yosog-0.0.0
Installing executable(s) in C:\Users\dna\AppData\Roaming\cabal\bin
C:\Program Files\Haskell Platform\2014.2.0.0\mingw\bin\strip.exe: unable to rename 'C:\Users\dna\AppData\Roaming\cabal\bin\yosog.exe'; reason: File exists
cabal.exe: Error: some packages failed to install:
yosog-0.0.0 failed during the final install step. The exception was:
ExitFailure 1
Do you have any idea about what can be causing this error?
The version of the haskel platform I have installed ships with ghc 4.8.3, and cabal-install version 1.18.1.3 of the Cabal library.
I'm trying to install http-conduit-1.9.6, and running cabal install http-conduit-1.9.6 gives me the following error:
Network/HTTP/Conduit/Request.hs:43:8:
Could not find module `Network.URI'
It is a member of the hidden package `network-2.5.0.0'.
Perhaps you need to add `network' to the build-depends in your .cabal file.
It is a member of the hidden package `network-2.4.1.2'.
Perhaps you need to add `network' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
Failed to install http-conduit-1.9.6
World file is already up to date.
cabal: Error: some packages failed to install:
http-conduit-1.9.6 failed during the building phase. The exception was:
ExitFailure 1
I have installed network-2.5.0.0 and network-2.4.1.2, the output of ghc-pkg list network is:
/var/lib/ghc/package.conf.d
/root/.ghc/x86_64-linux-7.6.3/package.conf.d
network-2.4.1.2
network-2.5.0.0
network-2.6.0.2
I'm new with Haskell, and I'm now sure if having two repositories could be a problem. My work platform is Ubuntu 14.04, GHC 7.6.3, and cabal 1.20.
I am having some issues installing packages using cabal. Issuing the following command:
> cabal install ghc-mod stylish-haskell haskell-docs hdevtools
produces these errors
Building yaml-0.8.8.3...
Preprocessing library yaml-0.8.8.3...
<command line>: cannot satisfy -package-id aeson-0.7.0.6-b19228a032fb34be4eef122
913c6e81a
(use -v for more information)
Failed to install yaml-0.8.8.3
cabal: Error: some packages failed to install:
ghc-mod-4.1.1 depends on haskell-src-exts-1.15.0.1 which failed to install.
haskell-docs-0.2.0.0 failed during the building phase. The exception was:
ExitFailure 1
haskell-src-exts-1.15.0.1 failed while unpacking the package. The exception
was:
C:\Users\Arnob\AppData\Local\Temp\haskell-src-exts-1.15.0.1-5840\haskell-src-ext
s-1.15.0.1\dist-tmp:
MoveFileEx
"C:\\Users\\Arnob\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-5840\\haskell
-src-exts-1.15.0.1\\dist-tmp"
"C:\\Users\\Arnob\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-5840\\haskell
-src-exts-1.15.0.1\\dist":
permission denied (Access is denied.)
hdevtools-0.1.0.5 depends on unix-2.7.0.1 which failed to install.
hlint-1.8.61 depends on haskell-src-exts-1.15.0.1 which failed to install.
stylish-haskell-0.5.10.0 depends on yaml-0.8.8.3 which failed to install.
unix-2.7.0.1 failed during the configure step. The exception was:
ExitFailure 1
yaml-0.8.8.3 failed during the building phase. The exception was:
ExitFailure 1
I have also tried installing the windows fork of hdevltools by running
> cabal install
on the cloned github repo. However this also produces errors.
As a last ditch effort, I tried changing the remote repo to "stackage", i.e.
remote-repo: stackage: http://www.stackage.org/stackage/44ea140bd97cbb0f6140d331f8f7f8667a637eda
but this did not help either.
All help is appreciated!
It looks like this is a Windows specific issue, where cabal cannot move some required files in the haskell-src-exts distribution (the issue is also seen in other packages, such as pandoc). This might be related to the issue reported here: https://github.com/haskell/cabal/issues/1698
I was able to get the haskell-src-exts package installed by doing the following:
> cabal unpack haskell-src-exts
> cd haskell-src-exts
> cabal install
Your problem is listed right in Cabal's error message:
MoveFileEx ... ...:
permission denied (Access is denied.)
So it seems you have a permission problem with your Windows installation (or at least your user temp folder), which is why Cabal stumbles.