[GHC] #8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib --------------------------------+------------------------------------------ Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Keywords: | Operating System: MacOS X Architecture: x86_64 | Type of failure: Installing GHC failed (amd64) | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | --------------------------------+------------------------------------------ It looks like a homebrew (or something else?) dependency snuck into the RC2 build: {{{ % ./configure --prefix=/Users/awick/tools/ghc7.8.0 checking for path to top of build tree... dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib Referenced from: /Users/awick/tools/ghc-7.8.0.20140228/utils/ghc-pwd /dist-install/build/tmp/ghc-pwd Reason: image not found configure: error: cannot determine current directory }}} As not all of us use homebrew, it'd be lovely if the binary installer only required base Mac libraries to be installed rather than homebrew/macports/whatever. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by carter): who's RC2 mac build did you use? Mine or austins? Mine is unofficial and has that brew dep. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by awick): I pulled the one from here: http://www.haskell.org/ghc/dist/7.8.1-rc2/ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by thoughtpolice): Hmmmm... So, this was an error on my part, but it makes me think of something I'm not sure we considered: - Right now, if you *don't* have GMP available at build time, and you use the in-tree GMP, GHC will link it statically into your applications. That is, GHC will build GMP locally to use it, and resulting applications won't have a dynamic link to `libgmp.so`. - If you have an external GMP at build time, then it will link resulting binaries against that. Since GHC self-bootstraps as you can see, this includes GHC itself. This happened to me because I did `brew install gmp` to test something. Adam, I can provide another binary in the mean time with the caveat it statically links to GMP. Is this acceptable? For some people I know (out of principle or otherwise) this isn't, and they will want to dynamically link, so perhaps there should be two for now. Frankly, the binary proliferation here is a bit silly almost... we should really carefully evaluate what to do with GMP etc in a discussion in the future. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by thoughtpolice): On second thought, I wonder how much effort it would be to just fix the build system to install a dynamic version of the in-tree GMP instead for the final release... It looks like there's some code to already do this, but it's commented out and slightly bitrotted. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by awick): Just to get things working, I just symlinked my MacPorts copy over to /usr/local/lib, for now. Personally, I'd much prefer GHC to include an "extra" version of GMP than assume the right one is around on a Mac. From my point of view, either using a statically linked set of binaries or just including a copy of libgmp.10.dylib are equally fine. Ideally, it'd be nifty if the installer did a check for a local version. If there was one, it'd point the installed binaries to that. If not, then it'd have a spare copy it could install for GHC. But I don't know how hard that redirection would be, and for now, I suspect just always including GMP would be easier. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by carter): I think that "install time" detection is totally doable, its just someone would have to do it.... (and likely need different tricks per platform perhaps) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Changes (by thoughtpolice): * cc: hvr (added) Comment: It's not easily possible to do it at install time because it all depends on how GHC itself was built, not how it's going to be installed. Theoretically you could do something I gues to change the rpath (perhaps `nix` does this for OS X already) but that seems fragile to incorporate right now - plus we need to ensure GHC itself does the right thing once this is detected. It sounds like a bit of work. I think the better thing to do would be to investigate cleaning up the in- tree GMP build to install a `.dylib` which we can fall back on, since we need the in-tree build for Windows and generally OS X (as it doesn't come along). Linux is not so much of a problem. In the mean time - I've updated the binaries for the RC2 download. They link statically just like RC1. Do give them a go. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by awick): Hmmm. Which binaries did you update, and where did you put them? I grabbed: {{{ ghc-7.8.0.20140228-x86_64-apple-darwin-mavericks.tar.bz2 }}} from http://www.haskell.org/ghc/dist/7.8.1-rc2/ and got the same problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by thoughtpolice): I downloaded the same binary from that URL, sha1 hash `b3e68ae11d5438442cafacfaef729d80cc948cb3`. There is no dynamic link to `libgmp.dylib`, nor do I have it in my system: {{{ $ find /usr/local/lib/ | grep gmp $ $ otool -L ./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd | grep gmp @rpath/libHSinteger-gmp-0.5.1.0-ghc7.8.0.20140228.dylib (compatibility version 0.0.0, current version 0.0.0) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8837: GHC 7.8.1-rc2 requires /usr/local/lib/libgmp10.10.dylib ------------------------------------------+-------------------------------- Reporter: awick | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Changes (by awick): * status: new => closed * resolution: => fixed Comment: Ah, apologies. Looks like I downloaded the new one but unpacked the old one. Having now unpacked the right one, the update worked for me, so I'll close the ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8837#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC