From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA20726; Thu, 16 Oct 2003 11:18:40 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA00473 for ; Thu, 16 Oct 2003 11:18:39 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9G9Ic106294 for ; Thu, 16 Oct 2003 11:18:39 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1AA4HG-0000V5-00 for ; Thu, 16 Oct 2003 10:18:38 +0100 Date: Thu, 16 Oct 2003 10:18:38 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Initialization order bug Message-ID: <20031016091838.GA1219@redhat.com> References: <20031015093613.GA21312@redhat.com> <20031015165723.GA26016@redhat.com> <16269.37646.599166.88324@karryall.dnsalias.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16269.37646.599166.88324@karryall.dnsalias.org> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bug:01 andrieu:01 workarounds:01 mli:01 mli:01 -linkall:01 bug:01 freshmeat:01 ltd:98 linked:01 olivier:02 referenced:02 arch:02 linking:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - 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: http://www.annexia.org/freeware/monolith/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners