RE: Dynamic loading problem

2004-05-05 Thread Simon Marlow
On 30 April 2004 18:01, Duncan Coutts wrote: > On Fri, 2004-04-30 at 17:36, Simon Marlow wrote: >> On 30 April 2004 11:26, Duncan Coutts wrote: >> >>> Could someone remind me what the remaining issues are in getting ghc >>> to build Haskell modules/packaged into unix .so shared libraries? > >> I

RE: Dynamic loading problem

2004-04-30 Thread Duncan Coutts
On Fri, 2004-04-30 at 17:36, Simon Marlow wrote: > On 30 April 2004 11:26, Duncan Coutts wrote: > > > Could someone remind me what the remaining issues are in getting ghc > > to build Haskell modules/packaged into unix .so shared libraries? > It might be possible to do this, but only if you want

RE: Dynamic loading problem

2004-04-30 Thread Simon Marlow
On 30 April 2004 11:26, Duncan Coutts wrote: > Could someone remind me what the remaining issues are in getting ghc > to build Haskell modules/packaged into unix .so shared libraries? > > As I recall it seems to nearly work. Andre Pang got them to load and > function but it was a bit fragile and

RE: Dynamic loading problem

2004-04-30 Thread Duncan Coutts
Could someone remind me what the remaining issues are in getting ghc to build Haskell modules/packaged into unix .so shared libraries? As I recall it seems to nearly work. Andre Pang got them to load and function but it was a bit fragile and the rts would complain after a short while: http://www.m

RE: Dynamic loading problem

2004-04-30 Thread Simon Marlow
On 29 April 2004 16:55, Hampus Ram wrote: > by using the RTS I've made it possible to dynamically load modules for > quite some time now. However, recently I've stumbled inte quite a > problem. > > I've created a bunch of modules to handle all dynamic loading for me > and things are good for simp

Re: Dynamic loading problem

2004-04-29 Thread Hampus Ram
On Thu, Apr 29 2004, Gregory Wright wrote: > It has nothing to do with shared objects. No, it hasn't and I have never claimed that it is so. > the main program (the one that loads the loadable modules) to explicitly > link all of the object files that the set {, modules>} > depends on. No. The

Re: Dynamic loading problem

2004-04-29 Thread Gregory Wright
Hi, I was playing with dynamically loaded modules and had the same problem. It has nothing to do with shared objects. What you have to do is to force the main program (the one that loads the loadable modules) to explicitly link all of the object files that the set {, } depends on. For example, i

Re: Dynamic loading problem

2004-04-29 Thread Hampus Ram
On Thu, Apr 29 2004, Alastair Reid wrote: > Does passing the flag RTLD_GLOBAL to dlopen help? (man dlopen for info about > this flag) No, since none of the objects involved are shared objects (I use neither dlopen or addDLL but the loadObj function). They are just compiled Haskell modules and t

Re: Dynamic loading problem

2004-04-29 Thread Alastair Reid
> The functions from the rts are ffi:ed into my program but when > dynamically loading the module, these functions can't be found > ("unknown symbol `lookupSymbol`") and neither can I load the > HSrts.o package to make them visible due to duplicate functions > ("I found a duplicate definition for

Dynamic loading problem

2004-04-29 Thread Hampus Ram
Hi, by using the RTS I've made it possible to dynamically load modules for quite some time now. However, recently I've stumbled inte quite a problem. I've created a bunch of modules to handle all dynamic loading for me and things are good for simple programs. But now I want to load my dynamic loa