#7375: Building ghc fails because it is looking for an old version of libgmp ----------------------------------+----------------------------------------- Reporter: mimosa | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Resolution: fixed | Keywords: Os: Linux | Architecture: Unknown/Multiple Failure: Building GHC failed | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: 5743 ----------------------------------+-----------------------------------------
Comment(by mimosa): Thanks for your response, simonmar. I wasn't clear enough in my original report (though I did add a comment). I am packaging ghc for Salix (which is backwards-compatible with Slackware). There is currently no package for Slackware or as far as I know for any other Slackware-based distro. My reason for not packaging the latest ghc (which doesn't have the gmp problem, though it does have a similar problem with libffi, see #5743) is because an older ghc seems to be needed for haskell-platform, and in particular for xmonad. The nearest thing to a package for Slackware itself is the SlackBuild linked to on this website alongside packages for other distros. But that isn't a package, it's just a build script - and it doesn't resolve the problem with gmp. For the typical user who might want to install xmonad, or haskell- platform, this situation means an ugly hack is needed. The problem has come up repeatedly on the Salix forums. Such a hack isn't acceptable in a package. Since my original report here, I've managed to get the offending gmp to build. Here are links to my packages for i486 and x86_64, and the SLKBUILD: http://people.salixos.org/mimosa/packages/ghc/7.4.2/ghc-7.4.2-i486-1tjb.txz http://people.salixos.org/mimosa/packages/ghc/7.4.2/ghc-7.4.2-x86_64-1tjb.txz http://people.salixos.org/mimosa/packages/ghc/7.4.2/SLKBUILD However, even that way of doing it is pretty hackish. With regard to the libffi problem (which my build also resolves in the same way), SUSE for instance has a package with a patch - see #5743. Or is there something I should be passing to configure to tell it to use the system library? As you say: {{{ your distro, which will have a GHC correctly built for whatever is the right GMP version on your system }}} As it stands, configure just complains about the absence of libgmp.so.3. I looked into this in an older version of Ubuntu (10.10), and the solution there was to make ghc depend on a special package gmp-4.3-dev (or whatever the number is). That's basically the same as my approach, except it splits off the "magic library" into a separate package. My impression is that the truly correct way to solve this is to patch the ghc source to use system libraries when it builds. But that's far from straightforward, and not a desirable situation. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7375#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs