[GHC] #15769: GHC 8.6 for macOS depends on homebrew
GHC
ghc-devs at haskell.org
Thu Oct 18 07:18:26 UTC 2018
#15769: GHC 8.6 for macOS depends on homebrew
-------------------------------------+-------------------------------------
Reporter: kazu-yamamoto | Owner: (none)
Type: bug | Status: new
Priority: highest | Milestone: 8.6.2
Component: Compiler | Version: 8.6.1
Keywords: | Operating System: MacOS X
Architecture: | Type of failure: Installing GHC
Unknown/Multiple | failed
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I guess the ghc-8.6.1-x86_64-apple-darwin.tar.xz is build with homebrew.
So, it depends on homebrew's "libgmp".
Since I'm using MacPorts, the following error occurs on installation:
{{{
% sudo make install
"utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy libraries
/ghc-prim dist-install "strip" '' '/usr/local/ghc-8.6.1'
'/usr/local/ghc-8.6.1/lib/ghc-8.6.1'
'/usr/local/ghc-8.6.1/share/doc/ghc-8.6.1/html/libraries' 'v p dyn'
dyld: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib
Referenced from: /Users/kazu/Downloads/ghc-8.6.1/libraries/base/dist-
install/build/libHSbase-4.12.0.0-ghc8.6.1.dylib
Reason: image not found
make[1]: *** [install_packages] Abort trap: 6
make: *** [install] Error 2
}}}
After make a link from "/usr/local/opt/gmp/lib/libgmp.10.dylib" to
"/opt/local/lib/libgmp.10.dylib" installed by MacPorts, the installation
succeeds.
But when using GHC 8.6.1, the following error occurs:
{{{
[15 of 15] Compiling Network.DNS ( Network/DNS.hs,
dist/build/Network/DNS.o )
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
cab: callCommand: cabal build (exit 1): failed
}}}
To fix this, the following is necessary:
{{{
% export LIBRARY_PATH=/usr/lib:/opt/local/lib
}}}
- "/usr/lib" is for "libiconv" and should come first to hide
"/opt/local/lib/libiconv"
- "/opt/local/lib" is for "libgmp"
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15769>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list