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 have Windows 10
I installed Haskell Platform 8.2.1 (HaskellPlatform-8.2.1-full-x86_64-setup.exe from https://www.haskell.org/platform/windows.html) (This version have mingw and gcc 6.2.0 for what this matters)
I downloaded Achelane from https://sourceforge.net/projects/wxhaskell/files/wxInstall/
I unzipped it in a path without spaces (a bug prevents it from compiling if path has spaces).
I gave cabal update and updated the config lines extra-prog-path: and extra-lib-dirs
I called Install.bat but when installing wxdirect I get the error:
cabal: The directory "wxdirect-0.92.3.0\" already exists, not unpacking.
Resolving dependencies...
Configuring wxdirect-0.92.3.0...
Building wxdirect-0.92.3.0...
Failed to install wxdirect-0.92.3.0
Build log ( C:\Users\agranero\AppData\Roaming\cabal\logs\ghc-8.2.1\wxdirect-0.92.3.0-LWW4KzdSYghFJi8qk6ENNl.log ):
Preprocessing executable 'wxdirect' for wxdirect-0.92.3.0..
Building executable 'wxdirect' for wxdirect-0.92.3.0..
[ 2 of 12] Compiling IOExtra ( src\IOExtra.hs, dist\build\wxdirect\wxdirect-tmp\IOExtra.o )
src\IOExtra.hs:16:1: error:
Could not find module `System.IO.Strict'
There are files missing in the `strict-0.3.2' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
|
16 | import qualified System.IO.Strict as Strictly
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '.\wxdirect-0.92.3.0'
cabal: Error: some packages failed to install:
wxdirect-0.92.3.0-LWW4KzdSYghFJi8qk6ENNl failed during the building phase. The
exception was:
ExitFailure 1
O sistema não pode encontrar o arquivo especificado.
Could not install wxHaskell
The message "O sistema não pode encontrar o arquivo especificado." means "System cannot find specified file." because of my Brazilian Portuguese version of Windows.
If I follow https://wiki.haskell.org/WxHaskell/Windows#From_GitHub and try to install from github I get the same error. Idem for cabal install wx.
I had several previous attempts where I get a little more ahead but I wiped my Haskell install clean and now I am stuck on this error.
If I do not change cabal config file I get the same error too, so I thing it is not relevant (at this point yet).
UPDATE: I managed to go further, but got stuck again: I gave the ghc-pkg check that the message suggest gives a huge amount of warnings. But the summary is:
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
Cabal-1.24.2.0
process-1.4.3.0
directory-1.3.1.5
time-1.8.0.3
Win32-2.3.1.1
strict-0.3.2
Before that I get in the middle of the huge amount of warnings this:
There are problems in package strict-0.3.2:
Warning: library-dirs: C:\Users\agranero\AppData\Roaming\cabal\x86_64-windows-ghc-8.2.1\strict-0.3.2-7ZEebv7EabCEjNWrS66TpZ
doesn't exist or isn't a directory
Following the sequence (as at each Install.bat run It warned of the next lib) I reinstalled all those libs with cabal install lib --reinstall --force-reinstalls each time I advanced more.
After that I run Install.bat again and I got:
Unpacking to wxdirect-0.92.3.0\
Resolving dependencies...
In order, the following will be installed:
wxdirect-0.92.3.0 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring wxdirect-0.92.3.0...
Building wxdirect-0.92.3.0...
Installed wxdirect-0.92.3.0
1 arquivo(s) copiado(s).
Unpacking to wxc-0.92.3.0\
Resolving dependencies...
Configuring wxc-0.92.3.0...
Building wxc-0.92.3.0...
Installed wxc-0.92.3.0
1 arquivo(s) copiado(s).
Resolving dependencies...
Downloading wxcore-0.92.3.0...
Configuring wxcore-0.92.3.0...
Building wxcore-0.92.3.0...
Failed to install wxcore-0.92.3.0
Build log ( C:\Users\agranero\AppData\Roaming\cabal\logs\ghc-8.2.1\wxcore-0.92.3.0-Kq7hfMBPtCHIxCJN1O04PM.log ):
Building wxcore-0.92.3.0...
Preprocessing library wxcore-0.92.3.0...
[ 1 of 23] Compiling Graphics.UI.WXCore.GHCiSupport ( src\haskell\Graphics\UI\WXCore\GHCiSupport.hs, dist\build\Graphics\UI\WXCore\GHCiSupport.o )
[ 2 of 23] Compiling Graphics.UI.WXCore.WxcDefs ( src\haskell\Graphics\UI\WXCore\WxcDefs.hs, dist\build\Graphics\UI\WXCore\WxcDefs.o )
[ 3 of 23] Compiling Graphics.UI.WXCore.WxcObject ( src\haskell\Graphics\UI\WXCore\WxcObject.hs, dist\build\Graphics\UI\WXCore\WxcObject.o )
[ 4 of 23] Compiling Graphics.UI.WXCore.WxcClassTypes ( src\haskell\Graphics\UI\WXCore\WxcClassTypes.hs, dist\build\Graphics\UI\WXCore\WxcClassTypes.o )
[ 5 of 23] Compiling Graphics.UI.WXCore.WxcTypes ( src\haskell\Graphics\UI\WXCore\WxcTypes.hs, dist\build\Graphics\UI\WXCore\WxcTypes.o )
src\haskell\Graphics\UI\WXCore\WxcTypes.hs:752:20: error:
Ambiguous occurrence `CBool'
It could refer to either `Foreign.C.CBool',
imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
(and originally defined in `Foreign.C.Types')
or `Graphics.UI.WXCore.WxcTypes.CBool',
defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
|
752 | toCBool :: Bool -> CBool
| ^^^^^
src\haskell\Graphics\UI\WXCore\WxcTypes.hs:755:22: error:
Ambiguous occurrence `CBool'
It could refer to either `Foreign.C.CBool',
imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
(and originally defined in `Foreign.C.Types')
or `Graphics.UI.WXCore.WxcTypes.CBool',
defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
|
755 | withBoolResult :: IO CBool -> IO Bool
| ^^^^^
src\haskell\Graphics\UI\WXCore\WxcTypes.hs:760:14: error:
Ambiguous occurrence `CBool'
It could refer to either `Foreign.C.CBool',
imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
(and originally defined in `Foreign.C.Types')
or `Graphics.UI.WXCore.WxcTypes.CBool',
defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
|
760 | fromCBool :: CBool -> Bool
| ^^^^^
src\haskell\Graphics\UI\WXCore\WxcTypes.hs:763:55: error:
Ambiguous occurrence `CBool'
It could refer to either `Foreign.C.CBool',
imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
(and originally defined in `Foreign.C.Types')
or `Graphics.UI.WXCore.WxcTypes.CBool',
defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
|
763 | foreign import ccall "intToBool" intToCBool :: Int -> CBool
| ^^^^^
src\haskell\Graphics\UI\WXCore\WxcTypes.hs:764:48: error:
Ambiguous occurrence `CBool'
It could refer to either `Foreign.C.CBool',
imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
(and originally defined in `Foreign.C.Types')
or `Graphics.UI.WXCore.WxcTypes.CBool',
defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
|
764 | foreign import ccall "boolToInt" cboolToInt :: CBool -> Int
| ^^^^^
cabal: Leaving directory 'C:\Users\agranero\AppData\Local\Temp\cabal-tmp-4404\wxcore-0.92.3.0'
cabal: Error: some packages failed to install:
wx-0.92.3.0-AFrVUsv18GZGvCmfR0yEpQ depends on wx-0.92.3.0 which failed to
install.
wxcore-0.92.3.0-Kq7hfMBPtCHIxCJN1O04PM failed during the building phase. The
exception was:
ExitFailure 1
Could not install wxHaskell
Now I am completely lost. There is a report of this error on http://haskell.1045720.n5.nabble.com/GHC-14418-Compile-errors-wxcore-0-92-3-0-td5866957.html and on https://ghc.haskell.org/trac/ghc/ticket/14418
but it was closed as not being a bug of the compiler but of wxHaskell (which I agree with).
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'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/
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.