Skip to content

MacOS: ghcup requires Brew, which is bad

Created by: mouse07410

Describe the bug It is unclear to me what's happening. I never had Brew installed on any of my machines, and the shared libraries required are on the search path in /opt/local/lib. However,

$ghcup install 8.6.2
. . . . .
ranlib: file: /Users/ur20980/.ghcup/ghc/8.6.2/lib/ghc-8.6.2/rts/libHSrts_thr_p.a(elf_util.thr_p_o) has no symbols
ranlib: file: /Users/ur20980/.ghcup/ghc/8.6.2/lib/ghc-8.6.2/rts/libHSrts_thr_p.a(Select.thr_p_o) has no symbols
"utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy libraries/ghc-prim dist-install "strip" '' '/Users/ur20980/.ghcup/ghc/8.6.2' '/Users/ur20980/.ghcup/ghc/8.6.2/lib/ghc-8.6.2' '/Users/ur20980/.ghcup/ghc/8.6.2/share/doc/ghc-8.6.2/html/libraries' 'v p dyn'  
dyld: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
  Referenced from: /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/tmp.4gjlUil6/ghc-8.6.2/libraries/base/dist-install/build/libHSbase-4.12.0.0-ghc8.6.2.dylib
  Reason: image not found
gmake[1]: *** [ghc.mk:990: install_packages] Abort trap: 6
gmake: *** [Makefile:51: install] Error 2
Failed to install, consider updating this script via: ghcup upgrade
$ 

fails because it expects to find /opt/local/lib/libgmp.10.dylib in /usr/local/opt/gmp/lib/libgmp.10.dylib

To Reproduce Steps to reproduce the behavior:

  1. Observe that you have the latest ghcup, ghc-8.6.3 and ghc-8.6.4 installed, and the required shared libraries are in /opt/local/lib
  2. Since HIE requires ghc-8.6.2, type ghcup install 8.6.2

Observe the result: ghcup-brew-screwed.txt

System information

$ ghcup debug-info
Script version: 0.0.7

Script variables:
  GHC install location:     /Users/ur20980/.ghcup/ghc
  Binary install location:  /Users/ur20980/.ghcup/bin
  Tarball cache location:   /Users/ur20980/.ghcup/cache
  Downloader:               curl --fail -O <url>
  Script update url:        https://raw.githubusercontent.com/haskell/ghcup/master//ghcup
  GHC download baseurl:     https://downloads.haskell.org/~ghc
  Meta download url         https://raw.githubusercontent.com/haskell/ghcup/master//.download-urls
  Meta download format      1
  Meta version url          https://raw.githubusercontent.com/haskell/ghcup/master//.available-versions
  Meta version format       1

Detected system information:
  Architecture:   x86_64
  Distribution:   Darwin
  Distro alias:   darwin
  Distro version: 18.5.0
$ 
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information