Haskell Dynamic Loading with -fllvm

David Terei dave.terei at gmail.com
Wed Dec 12 19:03:55 CET 2012

Hi Nathan,

So dynamic libraries should be supported on a few platforms but not
all, not as many as the NCG. Support also varies from LLVM version.
What platform and version of LLVM are you trying to utilize? And
specifically what flags are you using?


On 11 December 2012 08:53, Nathaniel Neitzke <nightski at gmail.com> wrote:
> Essentially I have a use case that, if worked, would save countless hours in
> development time.  I am writing a scientific computing web service utilizing
> the Repa and Snap libraries.  The Snap framework has a dynamic loader that
> will load modules on the fly when the source files change.
> This works excellent!  The problem is that the modules must be compiled with
> full optimizations (including -fllvm) or web service operations take minutes
> instead of < second to execute at run time.  I do not mind the penalty paid
> for optimized compilation.  It is still much faster than recompiling and
> linking the entire exe from scratch and restarting the server.
> The problem is when the code is compiled with -fllvm dynamically, it
> crashes.  I believe this is a known issue as listed in this trac -
> http://hackage.haskell.org/trac/ghc/ticket/4210
> NOTE: it says "The LLVM backend doesn't support dynamic libraries at the
> moment."
> My question is could anyone point me in the right direction as to what might
> need to be implemented support for this?  Is anyone currently working on it?
> It would be a huge win for the work I am currently doing, to the point where
> if I can't find a way to get this working (even if it means diving in and
> attacking it myself), I may have to switch to another language/platform.
> Thanks,
> Nathan
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

More information about the Glasgow-haskell-users mailing list