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:
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:
xcode-select --install._Originally posted by @Rhywun in https://github.com/haskell/haskell-ide-engine/issues/992#issuecomment-447619046_
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:
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:
/usr/local/opt/gmp/lib/libgmp.10.dylib or /usr/local/opt/gmp/lib/libgmp.dylib exist.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
Most helpful comment
gmpwas not installed.brew install gmpfollowed bymake build-allsucceeded. 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
gmpand 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.