I cannot use emacs on a new stack project because intero fails to build.
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