[GHC] #15769: GHC 8.6 for macOS depends on homebrew

#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

#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 Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by elaforge): I had this same problem. I do use homebrew, but hadn't installed with it `gmp`. So `brew install gmp` fixed it for me. If homebrew's gmp is an intentional dependency now it should probably be documented! Otherwise it would be nice to continue linking it statically, or whatever it was that older compiles did. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by kazu-yamamoto): I installed GHC 8.6.2. 1) The first problem ("sudo make install") is gone. 2) But the second problem remains. "ld: library not found for -lgmp" I cannot find what kind of assumption is made for libgmp on macOS from the manual. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by kazu-yamamoto): I would like to suggest to ship GHC 8.6.3 with integer-simple for macOS. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Resolution: | 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: | -------------------------------------+------------------------------------- Comment (by carter): did ben forget to build with an intree-gmp? my GHC OSX builds do in-tree properly ... this sounds like a failure of packaging rather than anything else -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15769: GHC 8.6 for macOS depends on homebrew -------------------------------------+------------------------------------- Reporter: kazu-yamamoto | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.2 Component: Compiler | Version: 8.6.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Installing GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: #15404 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => duplicate * related: => #15404 Comment: This is a duplicate of #15404, which was fixed in 8.6.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15769: GHC 8.6 for macOS depends on homebrew -------------------------------------+------------------------------------- Reporter: kazu-yamamoto | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.2 Component: Compiler | Version: 8.6.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Installing GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: #15404 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nshimaza): It seems binary distribution ghc-8.6.2-x86_64-apple-darwin.tar.xz still lacks intree-gmp. make install fails with the same error if /usr/local/opt/gmp/lib/libgmp.10.dylib is missing. {{{ "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy libraries /ghc-prim dist-install "strip" '' '/Users/nshimaza/Documents/Hack/haskell/tmp/inst' '/Users/nshimaza/Documents/Hack/haskell/tmp/inst/lib/ghc-8.6.2' '/Users/nshimaza/Documents/Hack/haskell/tmp/inst/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: /Users/nshimaza/Documents/Hack/haskell/tmp/ghc-8.6.2/libraries/base/dist- install/build/libHSbase-4.12.0.0-ghc8.6.2.dylib Reason: image not found make[1]: *** [install_packages] Abort trap: 6 make: *** [install] Error 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15769: GHC 8.6 for macOS depends on homebrew -------------------------------------+------------------------------------- Reporter: kazu-yamamoto | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.2 Component: Compiler | Version: 8.6.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Installing GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: #15404 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by kazu-yamamoto): Ben, there were two issues. The first one (installation) was fixed in 8.6.2. But the second one was not. I cannot use GHC 8.6.2 without: {{{ % export LIBRARY_PATH=/usr/lib:/opt/local/lib }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15769: GHC 8.6 for macOS depends on homebrew -------------------------------------+------------------------------------- Reporter: kazu-yamamoto | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.6.2 Component: Compiler | Version: 8.6.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Installing GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: #15404 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by kazu-yamamoto): GHC 8.6.3 fixes this issue. Thank you, Ben! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15769#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC