[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Policy, location of .cma files in binary packages, and dynlink...



Sven Luther a écrit :
> If ocaml dynamic linking is now going to happen, the policy should be
> adapted, and the separation will always be that whatever is needed at
> runtime goes into the * package, and what is needed only at build time,
> should go into the -dev packages.

This is what I thought.

> But you speak of it in the future ? Do you have an idea of when such a
> new release will happen ? The question being how far debian will be with
> the lenny release that it may be included or not.

Just to be clear, when I talk about dynamic linking in OCaml, I am not
talking about something which could be compared to C's shared libraries.
OCaml's dynamic linking is suitable for "plugins", such as camlp4 or
ocamldoc as it has been mentioned. Maybe the problem is less obvious for
these two programs because they are usually used in a development
process, so having *-dev installed is not surprising. However, with
Ocsigen, virtually any library can be dynamically loaded, even by
someone whom doesn't expect to have *-dev packages.

Currently, dynamic linking is available for bytecode: one program can
load a .cmo or .cma as if `#load "file.cmo";;' were typed at the
toplevel. And dynamic linking is available for native code as well in
the CVS version of OCaml (so probably in 3.11). But native objects have
to be "packaged" in a special way to be linkable: .cmx/.cmxa/.a cannot
be loaded dynamically per se (so it's ok for them to be in *-dev
packages), they have to be put in a .cmxs file.

-- 
Stéphane


Reply to: