I don't understand the error because it appears to be requiring a version of the same package that I'm trying to install.
$ cabal install gtk-mac-integration
Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/SetupWrapper.hs, /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/Setup.hs, /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/Main.o )
Linking /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.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 gtk-mac-integration-0.1.0.4...
setup: The pkg-config package gtk-mac-integration version >=0.9.6 is required
but it could not be found.
cabal: Error: some packages failed to install:
gtk-mac-integration-0.1.0.4 failed during the configure step. The exception
was:
ExitFailure 1
It doesn't want the Haskell package gtk-mac-integration, it wants the system package gtk-mac-integration. That is, the Haskell package you're trying to install is just a binding to the gtk-mac-integration library (which I think is bundled with GTK+); you'll have to install it separately before you can install the Haskell package.
If you already have GTK+ installed, then the problem is that the pkg-config tool Cabal uses to find external library dependencies can't find the corresponding .pc files for the library. I don't know how to fix that, though; at least not without more details.
Related
I wiped and reinstalled the Haskell platform (Haskell.org: cabal, stack, ghc), but now no addon package will install properly. Cabal always end with ExitFailure1. Probably because not being able to find a dependency. Most of the times however it is the main package it cannot resolve for some reason.
Any experience with that phenomenon?
Local stack build
-- While building custom Setup.hs for package json-lesson-0.1.0.0 using:
/Users/administrator/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/administrator/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/administrator/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/administrator/.stack/snapshots/x86_64-osx/lts-12.5/8.4.3/pkgdb --package-db=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/pkgdb --libdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/lib --bindir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/bin --datadir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/share --libexecdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/libexec --sysconfdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/etc --docdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --htmldir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --haddockdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --dependency=aeson=aeson-1.3.1.1-v8c5j6KkT8PoXkOVjikF --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=text=text-1.2.3.0
Process exited with code: ExitFailure 1
Using cabal install:
MacBook-2:Haskell administrator$ cabal install aeson
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
Downloading base-compat-0.10.4...
Downloading dlist-0.8.0.4...
Configuring dlist-0.8.0.4...
Downloading tagged-0.8.6...
Downloading th-abstraction-0.2.8.0...
Configuring tagged-0.8.6...
Configuring base-compat-0.10.4...
Configuring th-abstraction-0.2.8.0...
Building dlist-0.8.0.4...
Building tagged-0.8.6...
Building base-compat-0.10.4...
Building th-abstraction-0.2.8.0...
Installed dlist-0.8.0.4
Downloading time-locale-compat-0.1.1.4...
Configuring time-locale-compat-0.1.1.4...
Building time-locale-compat-0.1.1.4...
Installed tagged-0.8.6
Downloading uuid-types-1.0.3...
Configuring uuid-types-1.0.3...
Installed time-locale-compat-0.1.1.4
Building uuid-types-1.0.3...
Failed to install uuid-types-1.0.3
Build log ( /Users/administrator/.cabal/logs/ghc-8.4.3/uuid-types-1.0.3-tE9Bfk2PgXDUPgbtamBdI.log ):
cabal: Entering directory '/var/folders/81/50s00bl11pv7fn8dw4n0w03m0000gn/T/cabal-tmp-5513/uuid-types-1.0.3'
Configuring uuid-types-1.0.3...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for uuid-types-1.0.3..
Building library for uuid-types-1.0.3..
<command line>: cannot satisfy -package-id hashable-1.2.7.0-3hrKWzET808E40baaqgc23
(use -v for more information)
cabal: Leaving directory '/var/folders/81/50s00bl11pv7fn8dw4n0w03m0000gn/T/cabal-tmp-5513/uuid-types-1.0.3'
Installed th-abstraction-0.2.8.0
Installed base-compat-0.10.4
Updating documentation index
/Users/administrator/Library/Haskell/share/doc/x86_64-osx-ghc-8.4.3/index.html
cabal: Error: some packages failed to install:
aeson-1.4.0.0-64eUw61rbC49Aocs9eETca depends on aeson-1.4.0.0 which failed to
install.
uuid-types-1.0.3-tE9Bfk2PgXDUPgbtamBdI failed during the building phase. The
exception was:
ExitFailure 1
Solution to the broken package issues with Cabal: in OSX there's a 'Frameworks' directory. This holds a Haskell-framework, that you need to delete, otherwise ghc stays active in the background and package building by cabal will fail. In general you need to delete the (hidden) .cabal, .stack and .ghc directories, as well the Haskell framework in 'Frameworks'. There are also two (!) Haskell directories in ~/Library and ~/User/Library you'd better delete.
Stumbled across this when looking for the Rails framework. Thank you all for contributing with possible solutions!
I cannot use emacs on a new stack project because intero fails to build.
I've just installed stack 1.6.3 on ubuntu 16.04
I created a new (lts-10.2) stack project ('play') using: stack new play
When I try to open the source files in emacs it fails to build intero
Intero is not installed in the Stack environment.
Installing intero-0.1.24 automatically ...
intero-0.1.24: configure
intero-0.1.24: build
-- While building custom Setup.hs for package intero-0.1.24 using:
/home/wmorgan/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /home/wmorgan/haskell/play/.stack-work/logs/intero-0.1.24.log
Configuring intero-0.1.24...
Preprocessing executable 'intero' for intero-0.1.24..
Building executable 'intero' for intero-0.1.24..
[1 of 8] Compiling GhciTypes ( src/GhciTypes.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/GhciTypes.o )
[2 of 8] Compiling GhciMonad ( src/GhciMonad.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/GhciMonad.o )
[3 of 8] Compiling GhciTags ( src/GhciTags.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/GhciTags.o )
[4 of 8] Compiling GhciInfo ( src/GhciInfo.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/GhciInfo.o )
[5 of 8] Compiling GhciFind ( src/GhciFind.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/GhciFind.o )
[6 of 8] Compiling Paths_intero ( .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/autogen/Paths_intero.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/Paths_intero.o )
[7 of 8] Compiling InteractiveUI ( src/InteractiveUI.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/InteractiveUI.o )
[8 of 8] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/intero/intero ...
/usr/bin/ld.gold: error: cannot find -ltinfo
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
Could not install Intero!
(I've also tried building intero from the command-line with the same results.)
Edit: if I edit stack.yaml (in my project) to use lts-9.5 then intero builds OK - so this problem seems to be lts-10.2 specific.
Any ideas about how to fix this?
sudo apt-get install libncurses-dev
I found this information via this search https://github.com/commercialhaskell/intero/search?q=-ltinfo&type=Issues&utf8=%E2%9C%93 leading to https://github.com/commercialhaskell/intero/issues/456
I encountered this recently when installing intero for an lts-11.8 project on Kubuntu 18.04. The problem is the system is missing the tinfo library. The following command fixed the issue for me.
sudo apt-get install libtinfo-dev
I try to install cabal with the command on terminal
cabal install cabal-install
Resolving dependencies...
Configuring hackage-security-0.5.2.2...
Building hackage-security-0.5.2.2...
Failed to install hackage-security-0.5.2.2
Build log ( /Users/developer/.cabal/logs/hackage-security-0.5.2.2.log ):
cabal: Entering directory '/var/folders/2x/t_2cl03x2092dkzvc702d7lc0000gn/T/cabal-tmp-586/hackage-security-0.5.2.2'
Configuring hackage-security-0.5.2.2...
Building hackage-security-0.5.2.2...
Preprocessing library hackage-security-0.5.2.2...
[ 1 of 42] Compiling Prelude ( src/Prelude.hs, dist/build/Prelude.o )
[ 2 of 42] Compiling Text.JSON.Canonical ( src/Text/JSON/Canonical.hs, dist/build/Text/JSON/Canonical.o )
Failed to load interface for ‘Data.Text’
There are files missing in the ‘text-1.2.2.1’ package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
cabal: Leaving directory '/var/folders/2x/t_2cl03x2092dkzvc702d7lc0000gn/T/cabal-tmp-586/hackage-security-0.5.2.2'
cabal: Error: some packages failed to install:
cabal-install-1.24.0.2 depends on hackage-security-0.5.2.2 which failed to
install.
hackage-security-0.5.2.2 failed during the building phase. The exception was:
ExitFailure 1
I am using macOS Sierra Version 10.12.1. The Haskell installation package is from https://www.haskell.org/platform/mac.html. The installation was successful.
When I try to install cabal install ghc-mod I've got following error:
cabal install ghc-mod
Resolving dependencies...
Configuring haskell-src-exts-1.18.2...
Building haskell-src-exts-1.18.2...
Failed to install haskell-src-exts-1.18.2
Build log ( /Users/developer/.cabal/logs/haskell-src-exts-1.18.2.log ):
cabal: Entering directory '/var/folders/2x/t_2cl03x2092dkzvc702d7lc0000gn/T/cabal-tmp-713/haskell-src-exts-1.18.2'
Configuring haskell-src-exts-1.18.2...
Building haskell-src-exts-1.18.2...
Preprocessing library haskell-src-exts-1.18.2...
[ 1 of 17] Compiling Language.Haskell.Exts.Syntax ( src/Language/Haskell/Exts/Syntax.hs, dist/build/Language/Haskell/Exts/Syntax.o )
[ 2 of 17] Compiling Language.Haskell.Exts.SrcLoc ( src/Language/Haskell/Exts/SrcLoc.hs, dist/build/Language/Haskell/Exts/SrcLoc.o )
[ 3 of 17] Compiling Language.Haskell.Exts.ParseSyntax ( src/Language/Haskell/Exts/ParseSyntax.hs, dist/build/Language/Haskell/Exts/ParseSyntax.o )
[ 4 of 17] Compiling Language.Haskell.Exts.Pretty ( src/Language/Haskell/Exts/Pretty.hs, dist/build/Language/Haskell/Exts/Pretty.o )
[ 5 of 17] Compiling Language.Haskell.Exts.Fixity ( src/Language/Haskell/Exts/Fixity.hs, dist/build/Language/Haskell/Exts/Fixity.o )
[ 6 of 17] Compiling Language.Haskell.Exts.Extension ( src/Language/Haskell/Exts/Extension.hs, dist/build/Language/Haskell/Exts/Extension.o )
[ 7 of 17] Compiling Language.Haskell.Exts.ExtScheme ( src/Language/Haskell/Exts/ExtScheme.hs, dist/build/Language/Haskell/Exts/ExtScheme.o )
[ 8 of 17] Compiling Language.Haskell.Exts.Comments ( src/Language/Haskell/Exts/Comments.hs, dist/build/Language/Haskell/Exts/Comments.o )
[ 9 of 17] Compiling Language.Haskell.Exts.ExactPrint ( src/Language/Haskell/Exts/ExactPrint.hs, dist/build/Language/Haskell/Exts/ExactPrint.o )
[10 of 17] Compiling Language.Haskell.Exts.ParseMonad ( src/Language/Haskell/Exts/ParseMonad.hs, dist/build/Language/Haskell/Exts/ParseMonad.o )
[11 of 17] Compiling Language.Haskell.Exts.InternalLexer ( src/Language/Haskell/Exts/InternalLexer.hs, dist/build/Language/Haskell/Exts/InternalLexer.o )
[12 of 17] Compiling Language.Haskell.Exts.Lexer ( src/Language/Haskell/Exts/Lexer.hs, dist/build/Language/Haskell/Exts/Lexer.o )
[13 of 17] Compiling Language.Haskell.Exts.ParseUtils ( src/Language/Haskell/Exts/ParseUtils.hs, dist/build/Language/Haskell/Exts/ParseUtils.o )
[14 of 17] Compiling Language.Haskell.Exts.InternalParser ( dist/build/Language/Haskell/Exts/InternalParser.hs, dist/build/Language/Haskell/Exts/InternalParser.o )
[15 of 17] Compiling Language.Haskell.Exts.Parser ( src/Language/Haskell/Exts/Parser.hs, dist/build/Language/Haskell/Exts/Parser.o )
[16 of 17] Compiling Language.Haskell.Exts.Build ( src/Language/Haskell/Exts/Build.hs, dist/build/Language/Haskell/Exts/Build.o )
[17 of 17] Compiling Language.Haskell.Exts ( src/Language/Haskell/Exts.hs, dist/build/Language/Haskell/Exts.o )
src/Language/Haskell/Exts.hs:55:1: error:
Failed to load interface for ‘Language.Preprocessor.Unlit’
There are files missing in the ‘cpphs-1.20.2’ package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
cabal: Leaving directory '/var/folders/2x/t_2cl03x2092dkzvc702d7lc0000gn/T/cabal-tmp-713/haskell-src-exts-1.18.2'
cabal: Error: some packages failed to install:
ghc-mod-5.7.0.0 depends on haskell-src-exts-1.18.2 which failed to install.
haskell-src-exts-1.18.2 failed during the building phase. The exception was:
ExitFailure 1
hlint-1.9.40 depends on haskell-src-exts-1.18.2 which failed to install.
The following cabal version is installed:
cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
I also tried to run ghc-pkg check and got a lot of package problems, few examples:
There are problems in package monad-journal-0.7.2:
Warning: library-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2/monad-journal-0.7.2-6mtwu36per6DTorptNDDzP doesn't exist or isn't a directory
Warning: dynamic-library-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2 doesn't exist or isn't a directory
Warning: haddock-interfaces: /Users/developer/.cabal/share/doc/x86_64-osx-ghc-8.0.2/monad-journal-0.7.2/html/monad-journal.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/developer/.cabal/share/doc/x86_64-osx-ghc-8.0.2/monad-journal-0.7.2/html doesn't exist or isn't a directory
import-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2/monad-journal-0.7.2-6mtwu36per6DTorptNDDzP doesn't exist or isn't a directory
cannot find any of ["Control/Monad/Journal.hi","Control/Monad/Journal.p_hi","Control/Monad/Journal.dyn_hi"]
cannot find any of ["Control/Monad/Journal/Class.hi","Control/Monad/Journal/Class.p_hi","Control/Monad/Journal/Class.dyn_hi"]
cannot find any of ["Control/Monad/Trans/Journal.hi","Control/Monad/Trans/Journal.p_hi","Control/Monad/Trans/Journal.dyn_hi"]
cannot find any of ["libHSmonad-journal-0.7.2-6mtwu36per6DTorptNDDzP.a","libHSmonad-journal-0.7.2-6mtwu36per6DTorptNDDzP.p_a","libHSmonad-journal-0.7.2-6mtwu36per6DTorptNDDzP-ghc8.0.2.so","libHSmonad-journal-0.7.2-6mtwu36per6DTorptNDDzP-ghc8.0.2.dylib","HSmonad-journal-0.7.2-6mtwu36per6DTorptNDDzP-ghc8.0.2.dll"] on library path
There are problems in package either-4.4.1.1:
Warning: library-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2/either-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL doesn't exist or isn't a directory
Warning: dynamic-library-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2 doesn't exist or isn't a directory
Warning: haddock-interfaces: /Users/developer/.cabal/share/doc/x86_64-osx-ghc-8.0.2/either-4.4.1.1/html/either.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/developer/.cabal/share/doc/x86_64-osx-ghc-8.0.2/either-4.4.1.1/html doesn't exist or isn't a directory
import-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2/either-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL doesn't exist or isn't a directory
cannot find any of ["Control/Monad/Trans/Either.hi","Control/Monad/Trans/Either.p_hi","Control/Monad/Trans/Either.dyn_hi"]
cannot find any of ["Data/Either/Combinators.hi","Data/Either/Combinators.p_hi","Data/Either/Combinators.dyn_hi"]
cannot find any of ["Data/Either/Validation.hi","Data/Either/Validation.p_hi","Data/Either/Validation.dyn_hi"]
cannot find any of ["libHSeither-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL.a","libHSeither-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL.p_a","libHSeither-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL-ghc8.0.2.so","libHSeither-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL-ghc8.0.2.dylib","HSeither-4.4.1.1-CrzaYJSOcIXAyUkEE7mRiL-ghc8.0.2.dll"] on library path
There are problems in package free-4.12.4:
Warning: library-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2/free-4.12.4-Hbi0FikbXDW7eNkrPW79mM doesn't exist or isn't a directory
Warning: dynamic-library-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2 doesn't exist or isn't a directory
Warning: haddock-interfaces: /Users/developer/.cabal/share/doc/x86_64-osx-ghc-8.0.2/free-4.12.4/html/free.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/developer/.cabal/share/doc/x86_64-osx-ghc-8.0.2/free-4.12.4/html doesn't exist or isn't a directory
import-dirs: /Users/developer/.cabal/lib/x86_64-osx-ghc-8.0.2/free-4.12.4-Hbi0FikbXDW7eNkrPW79mM doesn't exist or isn't a directory
cannot find any of ["Control/Applicative/Free.hi","Control/Applicative/Free.p_hi","Control/Applicative/Free.dyn_hi"]
cannot find any of ["Control/Applicative/Free/Final.hi","Control/Applicative/Free/Final.p_hi","Control/Applicative/Free/Final.dyn_hi"]
cannot find any of ["Control/Applicative/Trans/Free.hi","Control/Applicative/Trans/Free.p_hi","Control/Applicative/Trans/Free.dyn_hi"]
cannot find any of ["Control/Alternative/Free.hi","Control/Alternative/Free.p_hi","Control/Alternative/Free.dyn_hi"]
cannot find any of ["Control/Alternative/Free/Final.hi","Control/Alternative/Free/Final.p_hi","Control/Alternative/Free/Final.dyn_hi"]
cannot find any of ["Control/Comonad/Cofree.hi","Control/Comonad/Cofree.p_hi","Control/Comonad/Cofree.dyn_hi"]
cannot find any of ["Control/Comonad/Cofree/Class.hi","Control/Comonad/Cofree/Class.p_hi","Control/Comonad/Cofree/Class.dyn_hi"]
cannot find any of ["Control/Comonad/Trans/Cofree.hi","Control/Comonad/Trans/Cofree.p_hi","Control/Comonad/Trans/Cofree.dyn_hi"]
cannot find any of ["Control/Comonad/Trans/Coiter.hi","Control/Comonad/Trans/Coiter.p_hi","Control/Comonad/Trans/Coiter.dyn_hi"]
cannot find any of ["Control/Monad/Free.hi","Control/Monad/Free.p_hi","Control/Monad/Free.dyn_hi"]
cannot find any of ["Control/Monad/Free/Church.hi","Control/Monad/Free/Church.p_hi","Control/Monad/Free/Church.dyn_hi"]
cannot find any of ["Control/Monad/Free/Class.hi","Control/Monad/Free/Class.p_hi","Control/Monad/Free/Class.dyn_hi"]
cannot find any of ["Control/Monad/Free/TH.hi","Control/Monad/Free/TH.p_hi","Control/Monad/Free/TH.dyn_hi"]
cannot find any of ["Control/Monad/Trans/Free.hi","Control/Monad/Trans/Free.p_hi","Control/Monad/Trans/Free.dyn_hi"]
cannot find any of ["Control/Monad/Trans/Free/Church.hi","Control/Monad/Trans/Free/Church.p_hi","Control/Monad/Trans/Free/Church.dyn_hi"]
cannot find any of ["Control/Monad/Trans/Iter.hi","Control/Monad/Trans/Iter.p_hi","Control/Monad/Trans/Iter.dyn_hi"]
cannot find any of ["libHSfree-4.12.4-Hbi0FikbXDW7eNkrPW79mM.a","libHSfree-4.12.4-Hbi0FikbXDW7eNkrPW79mM.p_a","libHSfree-4.12.4-Hbi0FikbXDW7eNkrPW79mM-ghc8.0.2.so","libHSfree-4.12.4-Hbi0FikbXDW7eNkrPW79mM-ghc8.0.2.dylib","HSfree-4.12.4-Hbi0FikbXDW7eNkrPW79mM-ghc8.0.2.dll"] on library path
What am I doing wrong?
I can't compile a simple hello world or install packages with cabal install when using ghc 7.8, cabal 1.18.1.3 and cabal-install 1.18.0.2.
When doing a cabal install stm (or any other package) from a command prompt Windows shows a "ghc.exe has stopped working" window, and the output is:
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install stm-2.4.2
Extracting
Waiting for install task to finish...
C:\Users\%USER%\AppData\Roaming\cabal\packages\hackage.haskell.org\stm\2.4.2\stm-2.4.2.tar.gz
to C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556...
Updating stm.cabal with the latest revision from the index.
Configuring stm-2.4.2...
creating C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist\setup
creating C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist
creating C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist\setup
"c:\ghc-7.8.0\bin\ghc.exe" "--make" "-odir" "C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist\setup" "-hidir" "C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist\setup" "-i" "-iC:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2" "-package-id" "Cabal-1.18.1.3-ac8664a5c71d605f2a4a8e21170969e0" "C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist\setup\setup.hs" "-o" "C:\Users\%USER%\AppData\Local\Temp\stm-2.4.2-6556\stm-2.4.2\dist\setup\setup.exe"
Failed to install stm-2.4.2
Last 10 lines of the build log ( C:\Users\%USER%\AppData\Roaming\cabal\logs\stm-2.4.2.log ):
World file is already up to date.
cabal.exe: Error: some packages failed to install:
stm-2.4.2 failed during the configure step. The exception was:
user error
I installed(?) GHC 7.8 and cabal-install with the following steps
Downloaded GHC 7.8 RC2 (http://www.haskell.org/ghc/dist/7.8.1-rc2/ghc-7.8.0.20140228-i386-unknown-mingw32.tar.bz2)
Extracted the contents of the tar to folder $GHC$
Added $GHC$\bin and $GHC$\mingw\bing folder to the PATH.
Downloaded prebuilt cabal-install (
http://www.haskell.org/cabal/release/cabal-install-1.18.0.2/cabal.exe)
Copied cabal.exe to $GHC$\bin so it's in the path
Run cabal update
Run cabal install stm (or any other package)
Before doing all this, I uninstalled my previous Haskell Platform, deleted folders cabal and ghc from %USER%\AppData\Roaming, and other haskell stuff from the Program Files folder.
I am not sure if GHC needed any additional installation steps
I need GHC 7.8 because I want to try out GHCJS.
PS:
I also added LANG=C to my env variables so that compiling does not throw a UTF-8 encoding error.
cabal --version shows:
cabal-install version 1.18.0.2
using version 1.18.1 of the Cabal library
Which seems to be ok except that the cabal library shows up as 1.18.1 instead of 1.18.1.3, but i'm not sure that's an error.
ghc-pkg list shows:
c:/ghc-7.8.0\lib\package.conf.d:
Cabal-1.18.1.3
Win32-2.3.0.1
array-0.5.0.0
base-4.7.0.0
bin-package-db-0.0.0.0
binary-0.7.1.0
rts-1.0
bytestring-0.10.4.0
containers-0.5.4.0
deepseq-1.3.0.2
directory-1.2.0.2
filepath-1.3.0.2
(ghc-7.8.0.20140228)
ghc-prim-0.3.1.0
(haskell2010-1.1.1.1)
(haskell98-2.0.0.3)
hoopl-3.10.0.0
hpc-0.6.0.1
integer-gmp-0.5.1.0
old-locale-1.0.0.6
old-time-1.1.0.2
pretty-1.1.1.1
process-1.2.0.0
template-haskell-2.9.0.0
time-1.4.1
transformers-0.3.0.0
** EDIT **: Trying to compile stm manually by going into its folder and running ghc generates the same error window and gives the output:
EDIT 2: Actually, I can't even compile a simple hello world with ghc helloworld.hs:
main = putStrLn "Hello, World!"
Compiling with "-v3" gives the following (uninformative) output:
Glasgow Haskell Compiler, Version 7.8.0.20140228, stage 2 booted by GHC version 7.6.3
Using binary package database: C:\ghc-7.8.0\lib\package.conf.d\package.cache
wired-in package ghc-prim mapped to ghc-prim-0.3.1.0-ce20d91f79b43ede95508e8cfd2188b0
wired-in package integer-gmp mapped to integer-gmp-0.5.1.0-67cd00feecdc491a633c46b0f7652b46
wired-in package base mapped to base-4.7.0.0-d4a0afe8e5c5f0dff2237b1231b56978
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.9.0.0-f798cb95c80f3e3751ec33b413381b57
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags:
wired-in package ghc-prim mapped to ghc-prim-0.3.1.0-ce20d91f79b43ede95508e8cfd2188b0
wired-in package integer-gmp mapped to integer-gmp-0.5.1.0-67cd00feecdc491a633c46b0f7652b46
wired-in package base mapped to base-4.7.0.0-d4a0afe8e5c5f0dff2237b1231b56978
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.9.0.0-f798cb95c80f3e3751ec33b413381b57
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Chasing dependencies:
Chasing modules from: *asd.hs
Stable obj: []
Stable BCO: []
Ready for upsweep
[NONREC
ModSummary {
ms_hs_date = 2014-03-10 04:11:51 UTC
ms_mod = main:Main,
ms_textual_imps = [import (implicit) Prelude]
ms_srcimps = []
}]
*** Deleting temp files:
Deleting:
compile: input file asd.hs
Created temporary directory: C:\Users\facuq\AppData\Local\Temp\ghc6824_1
*** Checking old interface for main:Main:
[1 of 1] Compiling Main ( asd.hs, asd.o )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size of Desugar (after optimization)
= {terms: 7, types: 5, coercions: 0}
*** Simplifier:
Result size of Simplifier = {terms: 7, types: 5, coercions: 0}
*** Tidy Core:
Result size of Tidy Core = {terms: 7, types: 5, coercions: 0}
*** CorePrep:
Result size of CorePrep = {terms: 9, types: 6, coercions: 0}
*** Stg2Stg:
*** CodeOutput:
*** New CodeGen:
*** CPSZ:
*** CPSZ:
It's actually a bug in GHC; it was confirmed on the GHC mailing list, and two people can reproduce it (ghc's bug manager thread).
your ghc.exe path and cabal.exe path should be in your path variable
It has worked for me.
I've just got a new mac, and I'm struggling to install Cairo for use with Haskell (diagrams in particular). I remember having a lot of problems with my previous machine, but I'm at a dead end this time.
$ cabal install cairo
Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/SetupWrapper.hs, /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/Setup.hs, /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/dist/setup/Main.o )
Linking /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.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 cairo-0.12.3.1...
setup: The program pkg-config version >=0.9.0 is required but it could not be
found.
cabal: Error: some packages failed to install:
cairo-0.12.3.1 failed during the configure step. The exception was:
ExitFailure 1
The program pkg-config needs to be installed. There are various ways to do this (e.g. I imagine it's available as part of MacPorts and similar package managers) but in the event that you need to download and install it from source, this is the place:
http://www.freedesktop.org/wiki/Software/pkg-config/