[M3devel] order of module initialization...

Dragiša Durić dragisha at m3w.org
Wed Apr 25 09:44:52 CEST 2007


I've debugged this before, and I know the drill... Problem with
initialization, sometimes, is in it passing pass 2 of RTLinker for some
modules and never coming to pass 3... I've noticed that. Last few days I
am using -linkall, and after I've deleted some redundant EXPORTS it kind
of works ok.

I remember you telling me about this non-initialization of non-imported
modules once before. It is where CM3 differs from both SRC and PM3 in
big way. Don't remember rationalization, but I don't like situation
where I can't make/exploit plugin architecture simply by mentioning new
module in m3makefile and letting it initialize itself in standardized
manner.

dd

On Wed, 2007-04-25 at 09:10 +0200, Olaf Wagner wrote:
> Dragiša Durić wrote:
> > I remember debugging this first time we tried to migrate to CM3... And
> > then we solved it, for current CM3 and current version of our software,
> > mentioning some imported module in EXPORTS clause... at the moment, this
> > linked these modules in initialization chain  and it worked ok... Right
> > now, it does not.
> >
> > Module XLBuiltin is one imported regularly, and XLModuleUDP (for
> > example) both EXPORTS and IMPORTs XLBuiltin. It is linked and starts to
> > initialize, but _before_ XLBuiltin... And, fails. Something is NIL @
> > wrong moment...
> >
> > What would be solution for this?
> >   
> The order of module initialization in CM3 is extensively traced. Try to
> run your program with  @M3tracelinker and see what's wrong. The
> code for module initialization is in
> 
>   cm3/m3-libs/m3core/src/runtime/common/RTLinker.m3
> 
> If the initialization does not work as expected, we must be missing
> of overlooking some dependency there.
> 
> If you can provide a simple and small example that does not work,
> I can probably have a look at it at the next weekend.
> 
> Sorry for the late answer,
> 
> Olaf
-- 
Dragiša Durić <dragisha at m3w.org>




More information about the M3devel mailing list