Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] "Error while building custom runtime system"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-16 (09:18)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Initialization order bug
Olivier Andrieu provided the right answer to this:

> This sort of things happen when :
>  - you have lots of externals in your module (here Perl)
>  - the module runs some initialization-time code that doesn't appear
>    in the interface
>  - the only values referenced by other values are externals
> then the module is in fact not linked in : it's not needed because the
> other modules directly call the external functions. The problem is
> that often these externals do not work without the proper
> initialization.
> Some workarounds are to :
>  - make the initialization code appear in the .mli, through a init
>    function for instance
>  - use `val' instead of `external' in the .mli
>  - use -linkall when linking the program

It works now, but I still think this is a bug.


Richard Jones.
Merjis Ltd. - all your business data are belong to you.
MONOLITH is an advanced framework for writing web applications in C, easier
than using Perl & Java, much faster and smaller, reusable widget-based arch,
database-backed, discussion, chat, calendaring:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: