From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 31B47BBBB for ; Tue, 24 Jan 2006 23:04:11 +0100 (CET) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k0OM4AhY020973 for ; Tue, 24 Jan 2006 23:04:10 +0100 Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 8B8FCD3000D; Tue, 24 Jan 2006 17:04:08 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Tue, 24 Jan 2006 17:04:08 -0500 X-Sasl-enc: mjBjb3ABxfQOrWiGL619zr1IXlOErGx/UMP+1bp1n1iv 1138140247 Received: from munge (burnham.ljcrf.edu [192.231.106.2]) by frontend2.messagingengine.com (Postfix) with ESMTP id 0B45F571482; Tue, 24 Jan 2006 17:04:05 -0500 (EST) Date: Tue, 24 Jan 2006 14:03:57 -0800 (PST) From: Martin Jambon X-X-Sender: martin@munge To: Florian Weimer Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlopt -a and module order In-Reply-To: <87fynd737p.fsf@mid.deneb.enyo.de> Message-ID: References: <87fynd737p.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 43D6A45A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlopt:01 ocamlopt:01 link-time:01 initialized:01 topological:01 ocamldsort:01 howto:01 wrote:01 cyclic:01 modules:01 modules:01 jambon:01 jambon:01 florian:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Tue, 24 Jan 2006, Florian Weimer wrote: > When creating libraries using ocamlopt -a, it seems that it is > necessary to give the modules on the command line in such an order > that all inter-module references are to modules which precede on the > command line. Otherwise, I get link-time errors when using the > library. > > In my case, there are no cyclic module references, and there is no > requirement that the modules are initialized in a particular order > (beyond that what is implied by explicit references), so a simple > topological sort could come up with a proper ordering. Is there some > way to have ocamlopt do this for me? ocamldsort can do that. Martin -- Martin Jambon, PhD http://martin.jambon.free.fr Visit http://wikiomics.org, the Bioinformatics Howto Wiki