caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: Sven Luther <luther@dpt-info.u-strasbg.fr>,
	Xavier Leroy <xavier.leroy@inria.fr>
Cc: Yang Shouxun <yangsx@fltrp.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Error during partial linking
Date: Tue, 22 Oct 2002 09:17:53 -0700	[thread overview]
Message-ID: <4.3.2.7.2.20021022090712.035f4e78@mail.d6.com> (raw)
In-Reply-To: <20021022092103.GA1344@iliana>


>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


  reply	other threads:[~2002-10-22 16:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-22  5:33 Yang Shouxun
2002-10-22  8:42 ` Xavier Leroy
2002-10-22  9:21   ` Sven Luther
2002-10-22 16:17     ` Chris Hecker [this message]
2002-10-22 16:47       ` Sven Luther
2002-10-22 17:14     ` [Caml-list] on the -pack option Xavier Leroy
2002-10-22 19:30       ` Sven Luther
2002-10-22  9:37   ` [Caml-list] Error during partial linking Yang Shouxun
2002-10-22 16:07     ` Chris Hecker
2002-10-22 17:00       ` Xavier Leroy
2002-10-22 17:12         ` Chris Hecker
2002-10-22 17:21         ` brogoff
2002-10-22 20:06           ` Dmitry Bely
2002-10-22 20:25             ` Alain Frisch
2002-10-22 20:37               ` Dmitry Bely
2002-10-22 20:53                 ` Alain Frisch
2002-10-22 21:10                   ` Dmitry Bely
2002-10-23  7:15                 ` Alessandro Baretta
     [not found]         ` <Pine.LNX.4.44.0210221008100.6093-100000@grace.speakeasy.ne t>
2002-10-22 17:44           ` Chris Hecker
2002-10-22 19:31         ` Sven Luther
2002-10-22 23:38           ` Chris Hecker
2002-10-23  4:16             ` David Brown
2002-10-23 10:01           ` Diego Olivier Fernandez Pons
2002-10-23 10:36             ` Sven Luther
2002-10-23 11:41               ` Alessandro Baretta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20021022090712.035f4e78@mail.d6.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=luther@dpt-info.u-strasbg.fr \
    --cc=xavier.leroy@inria.fr \
    --cc=yangsx@fltrp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).