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 SAA26690; Tue, 22 Oct 2002 18:18:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA26071 for ; Tue, 22 Oct 2002 18:18:21 +0200 (MET DST) Received: from relay.pair.com (relay1.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id g9MGIKD12182 for ; Tue, 22 Oct 2002 18:18:20 +0200 (MET DST) Received: (qmail 66101 invoked from network); 22 Oct 2002 16:18:02 -0000 Received: from adsl-host-sf-228.apexworld.net (HELO checkerlap.d6.com) (66.114.212.228) by relay1.pair.com with SMTP; 22 Oct 2002 16:18:02 -0000 X-pair-Authenticated: 66.114.212.228 Message-Id: <4.3.2.7.2.20021022090712.035f4e78@mail.d6.com> X-Sender: checker@mail.d6.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 22 Oct 2002 09:17:53 -0700 To: Sven Luther , Xavier Leroy From: Chris Hecker Subject: Re: [Caml-list] Error during partial linking Cc: Yang Shouxun , caml-list@inria.fr In-Reply-To: <20021022092103.GA1344@iliana> References: <20021022104215.A9456@pauillac.inria.fr> <200210221333.36858.yangsx@fltrp.com> <20021022104215.A9456@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >Also, i have the feeling that the correct way of distributing a bunch of >.cmo is to create a .cma, not to cram them together in a super .cmo >thanks to the pack option, i may be wrong about this though. No, if I understand the situation correctly, you actually want a packed cm[ox] (a new object), not a cmx?a (a library). This is because the libraries still require the discrete cmi files, while the packed object puts all the interfaces into a single cmi and scopes the names inside the packed namespace, which is obviously vastly superior for distribution. However, the issue with objects is whether the linker does the right thing with regards to throwing away unused code. In other words, if I have a library with a.cmo and b.cmo, and I only use module A, you won't get any of b.cmo in your app. However, if I use a packed object, c.cmo which has both as submodules, I don't know if it just includes everything or not. We should test this. The potential badness is even worse with the native code objects, becuase they're so much bigger. The right thing is obviously to have a "library" (quoted because it could be a packed object or a library) that allows merged code and interface files, nested namespaces, and also supports not linking unused code. However, -pack is still _way_ better than nothing, so I think we should all use it until the perfect solution comes along. Hopefully it'll be working on win32/msvc soon (I patched the compiler and sent the info to Xavier). Chris ------------------- 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