Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Unable to install 0.4.0.1 on Mac #1001

Closed
Rhywun opened this issue Dec 18, 2018 · 9 comments
Closed

Unable to install 0.4.0.1 on Mac #1001

Rhywun opened this issue Dec 18, 2018 · 9 comments

Comments

@Rhywun
Copy link
Contributor

Rhywun commented Dec 18, 2018

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 #992 (comment)

@Anrock
Copy link
Collaborator

Anrock commented Dec 18, 2018

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

@Rhywun
Copy link
Contributor Author

Rhywun commented Dec 18, 2018

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

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

stderr.txt
stdout.txt

@2mol
Copy link

2mol commented Dec 18, 2018

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: improving the build/installation process #1002.

@Rhywun
Copy link
Contributor Author

Rhywun commented Dec 18, 2018

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.

@wz1000 wz1000 added this to the 2018-12 milestone Dec 24, 2018
@wz1000
Copy link
Collaborator

wz1000 commented Dec 24, 2018

@Rhywun we will accept a PR to the README.

@Anrock
Copy link
Collaborator

Anrock commented Dec 26, 2018

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.

@ingun37
Copy link

ingun37 commented Dec 26, 2018

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

@alanz alanz modified the milestones: 2018-12, 2019-01 Dec 31, 2018
@Rhywun
Copy link
Contributor Author

Rhywun commented Jan 7, 2019

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

@wz1000 wz1000 closed this as completed in 9ee04b2 Jan 7, 2019
@wz1000
Copy link
Collaborator

wz1000 commented Jan 7, 2019

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants