#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 explaining about the bootstrapping. I didn't realise there were ''three'' stages. FWIW I just built GHC again with a doctored version of the build script that doesn't build gmp - it just uses a symlink. (It does, however, build libffi. I just wanted to change the treatment of gmp.) And (as you say) GHCi won't even start up without that symlink. libgmp.so points at libgmp.so.10.05 (the system version). This doesn't seem to be what would be expected given what you say about stage 2, and it may be something wrong with my package. However the real package (with the old gmp) does actually work, and the Salix devs don't seem to mind having a package like that. The package should also work on Slackware itself, and on other compatible Slackware-derived distros. More generally, I don't see how a package could be made that doesn't require some hack, because the stage 0 compiler needs the old gmp. That wasn't a problem when it wasn't old, but as soon as any given distro upgrades to a more recent gmp, that GHC can surely only build on it either with a symlink or a "magic library". That wouldn't matter except that in the world of Haskell, it seems any given version of ghc will continue to have currency some time after it has been superseded, because it forms part of a software distribution (haskell-platform) and may also be needed by other software (such as xmonad). So my concrete suggestion is the following. Why not ship any such libraries with the GHC source so it can still build on a system that doesn't have them any more? If my suggestion is feasible, it would entail building gmp (and whatever other libraries) as a very first step before executing the stage 0 GHC binary, if those libraries are not present on the build system in the versions needed. I appreciate that this isn't really any cleaner than leaving each distro's packagers to do effectively the same thing, because ultimately, as I understand it, GHC can't be built strictly from source because of the bootstrapping problem; but it would satisfy the letter of the law. It would also mean the work would be done once (by you guys) instead of once each per distro. And at least for libffi(#5743), there are people patching the source to avoid hackish packaging. The rules are the rules, and all that. Maybe GHC could become more widely represented in the Linux ecosystem that way. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7375#comment:7> 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