
On Dec 17, 2007 5:58 PM, Manuel M T Chakravarty
Ian Lynagh:
On Mon, Dec 17, 2007 at 12:53:32PM +1100, Manuel M T Chakravarty wrote:
Actually, I think, we should use the gmp/ in the ghc repo by default
If you want to use it when building a bindist that might be used on other computers you shold be able to set HaveLibGmp = NO HaveFrameworkGMP = NO in mk/build.mk, although I'm not sure I've ever tried it.
The disadvantages of using it are it might be out of date (we had some Windows segfaults a while ago that were fixed by updating the in-tree gmp) and wasted space.
Sure we waste some space, but the alternative is worse. Programs compiled with GHC will essentially not run on any computer, but the one where they were compiled. For example, the number of Macs with gmp installed is minuscule. The default should be to build programs that run everywhere with minimal hassle (not programs that save some space, but are unusable on most computers).
My understanding was that one major reason to dynamically link against GMP is to satisfy the LGPL, not just to save disk space. I found a couple old but relevant posts by Wolfgang Thaller, who originally created HaskellSupport.framework (now GMP.framework): http://www.haskell.org/pipermail/glasgow-haskell-users/2002-June/003494.html http://www.haskell.org/pipermail/cvs-ghc/2005-March/023769.html The gist of those posts is the following: - Statically linking against GMP puts extra license requirements on any ghc-compiled program; thus, dynamic linking is preferable. - On OS X, installing new frameworks is very easy (just drag-and-drop the framework into ~/Library/Frameworks or /Library/Frameworks; the former doesn't even need admin privileges). This doesn't seem like much to ask of users. Best, -Judah