[M3devel] order of module initialization...

Olaf Wagner wagner at elegosoft.com
Wed Apr 25 09:10:20 CEST 2007


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



More information about the M3devel mailing list