Haskell-ide-engine: Unable to install 0.4.0.1 on Mac

Created on 18 Dec 2018  路  9Comments  路  Source: haskell/haskell-ide-engine

I am trying a clean install of stack and HIE and the HIE install quits with the following appearing in the terminal after running make build-all in the HIE source directory:

$ make build-all
Downloading nightly-2018-12-01 build plan ...
Downloaded nightly-2018-12-01 build plan.
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Preparing to download ghc-8.6.2 ...
ghc-8.6.2: download has begun
ghc-8.6.2: 12.97 MiB / 221.33 MiB ( 5.86%) downloaded...
-etc.-
ghc-8.6.2: 221.33 MiB / 221.33 MiB (100.00%) downloaded...
Downloaded ghc-8.6.2.
Unpacking GHC into /Users/me/.stack/programs/x86_64-osx/ghc-8.6.2.temp/ ...
Configuring GHC ...
Installing GHC ...
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /Users/me/.stack/programs/x86_64-osx/ghc-8.6.2.temp/ghc-8.6.2/

Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Preparing to download ghc-8.6.2 ...
Already downloaded.
Unpacking GHC into /Users/pat/.stack/programs/x86_64-osx/ghc-8.6.2.temp/ ...
Configuring GHC ...
Installing GHC ...
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /Users/me/.stack/programs/x86_64-osx/ghc-8.6.2.temp/ghc-8.6.2/

git submodule sync
Synchronizing submodule url for 'submodules/HaRe'
Synchronizing submodule url for 'submodules/brittany'
Synchronizing submodule url for 'submodules/cabal-helper'
Synchronizing submodule url for 'submodules/ghc-mod'
git submodule update --init
stack install cabal-install
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Installing GHC ...
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /Users/me/.stack/programs/x86_64-osx/ghc-8.6.2.temp/ghc-8.6.2/

make: * [cabal] Error 1

I don't know where to find a log file that might explain what went wrong.

Some notes:

  • I did ensure that the Xcode tools were re-installed with xcode-select --install.
  • stack installed GHC version 8.4.4 and defaulted to resolver lts-12.23
  • I was able to install GHC 8.2.2 by opening a project that was set to lts-10.10

_Originally posted by @Rhywun in https://github.com/haskell/haskell-ide-engine/issues/992#issuecomment-447619046_

documentation macOS

Most helpful comment

gmp was not installed. brew install gmp followed by make build-all succeeded. A quick check in VSCode shows the various features are working. All seems good - thanks!

So my guess would be that GHC >= 8.6 requires gmp and maybe this needs to be noted in the installation instructions? I did not need to install it in the past when my max version of GHC was 8.4.x.

All 9 comments

What happens if you run make in /Users/me/.stack/programs/x86_64-osx/ghc-8.6.2.temp/ghc-8.6.2/ manually?

Run "make install" to install
make: *** [default] Error 1

This time I thought to redirect the output - for make install:

stderr.txt
stdout.txt

You have a problem with libgmp that I've had in the past. I don't remember the solution for sure, but try brew reinstall gmp?

edit:

  1. you can also first check if /usr/local/opt/gmp/lib/libgmp.10.dylib or /usr/local/opt/gmp/lib/libgmp.dylib exist.
  2. I suggest you try to install only one specific HIE version, that way compilation is a lot faster. The process is not optimal right now, but it should be easy enough to improve. Meanwhile you can find a list of things I did to just install 8.4.4, which is a bit manual, but the result is great: https://github.com/haskell/haskell-ide-engine/issues/1002.

gmp was not installed. brew install gmp followed by make build-all succeeded. A quick check in VSCode shows the various features are working. All seems good - thanks!

So my guess would be that GHC >= 8.6 requires gmp and maybe this needs to be noted in the installation instructions? I did not need to install it in the past when my max version of GHC was 8.4.x.

@Rhywun we will accept a PR to the README.

So my guess would be that GHC >= 8.6 requires gmp and maybe this needs to be noted in the installation instructions?

Looks like it was a couple of bugs in 8.6 regarding gmp lib: https://ghc.haskell.org/trac/ghc/ticket/15769, https://ghc.haskell.org/trac/ghc/ticket/15404
Reported to be fixed in 8.6.3.

you can give --verbose option when running stack build. It gives the information. Thats how I knew gmp was missing.

@wz1000 I have created PR #1027 for the README file

Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fendor picture fendor  路  3Comments

ajeetdsouza picture ajeetdsouza  路  3Comments

rvion picture rvion  路  3Comments

nponeccop picture nponeccop  路  4Comments

alanz picture alanz  路  3Comments