I have a Mac as well, but it is an intel one.  GHC does NOT support dynamic linking of Haskell libraries on intel macs, but C libraries like readline & GMP dynamically link just fine.  For example:

$ otool -L /usr/local/ghc/lib/ghc-6.5/ghc-6.5
/usr/local/ghc/lib/ghc-6.5/ghc-6.5:
        /usr/local/lib/libreadline.5.0.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.3)
        GMP.framework/Versions/A/GMP (compatibility version 7.0.0, current version 7.0.0)

  

On Aug 10, 2006, at 7:15 PM, Alec Berryman wrote:

Reilly Hayes on 2006-08-10 18:36:49 -0700:

There's one thing I don't entirely understand about the GMP problem.   
I understand that there are some limitations on GHC's ability to  
generate relocatable (and therefore dynamically linkable) code on x86  
(a register allocation problem related to the mangler if I recall the  
comments in the code correctly).  But this shouldn't prohibit linking  
GMP in dynamically, should it?  It's just a C library and GCC should  
happily generate relocatable code.  As a dynamically linked library,  
there should be no tainting issues to worry about even if the  
dynamically linked code is shipped with the executable.

Am I missing something?

No, the LGPL doesn't mandate source redistribution when you redistribute
a binary that is dynamically linked to a LGPL-licensed library.  If GHC
did support dynamically linking programs, it wouldn't be an issue, but
GHC only supports that on OS X.  

I was wondering something similar - is it really easier to replace the
functionality and speed of GMP than to extend GHC's dynamic library
support to other platforms?

_______________________________________________
Glasgow-haskell-users mailing list

Reilly Hayes




_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to