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

Re: Versioning OCaml in Debian [Was: Re: Buglet in ocaml-ldconf]



On Wed, May 29, 2002 at 10:13:10AM +0200, Stefano Zacchiroli wrote:
> On Tue, May 28, 2002 at 01:30:41AM +0200, Denis Barbier wrote:
> > No, I was talking about OCaml version this module has been compiled with,
> > but knowing the version of an installed module is also a user-friendly
> > feature, and this version number should appear in module documentation when
> > it exists.
> 
> Ok, our currently (upcoming) debian ocaml policy state that debian
> programs _and_ library should have depends like
>   
>   "ocaml (>= ver) (<< ver+1)"
> 
> (I know not all ocaml debian packages, including some of mines, fullfill
> this requirement).
> So the admin can just use dpkg.
> This obviuosly only apply when dependencies are debianized, for the
> other cases see below.

Well, i think it only really matters for library packages, but things
will be a mess without that.

Having thought a bit more about it (on a more practical level), lets
consider 3 debian package that clearly illustrate the problem we are
having here: ocaml ocaml-base and camlzip.

ocaml-base has the ocaml-ldconf tool + the dll.so included in the core
ocaml package, which go into /usr/lib/ocaml and /usr/lib/ocaml/labltk
(but this last one could be considered as a separate install).

Unless we support multiple common installs of ocaml, this one will be
removed when removing the current ocaml version anyway.

ocaml has the following stuff :

  most of it goes into /usr/lib/ocaml and is composed of .cm* files
  needed for linking (similar to the C .o and .so, and the .mli for
  documentation mostly, but these and the .cmi form the equivalent of
  C's .h headers. There are some other tools here also.

  then there are the manpages, going under /usr/share/man

  the big problem resides, i think, in the executables, which go under
  /usr/bin, they are ocaml ocamlc ocamlopt, etc ...

  there are a splatering of other stuff, like the C headers in
  /usr/include/caml, but basically that is it.

then there is camlzip, which basically installs a dll.so and the linker
files, all of which go into /usr/lib/ocaml/zip.

If we would go into multiple simultaneous installed versions, then we
need to do the following :

have multiple versions of /usr/lib/ocaml installed, (not only the
dll.so, but the whole lot of them).

This would mean installing stuff into :

/usr/lib/ocaml/3.04 and have /usr/lib/ocaml/ocaml or something such be a
symlink to it, or something such.

This would work ok, even it would be transparent on the installation
process (after all, ocamlc --where give access to this dir), but what
shall we do about the executables (well, alternatives may work, isn't it
?) and about the manpages (it would be a big mess, don't you think ?)
and about the C headers.

Also it would force us to make an ocaml3.04 ocaml3.05
ocaml3.04pre3.05with_patches, package, and do the same with all the load
of libraries around, and it would be a dependency mess, don't you think.

So upto now, basically the point is that you can install only the latest
(official) version of the ocaml package, and that all the libs you need
are rebuilt for this version.

This is not only something which makes ourt life (as developper) easier,
but is also, i think, the way upstream would like us to have it, Hell,
upstream doesn't even have forsk in their CVS tree for bugfixes and
development version, so ...

Additionally, i don't really think there is more than a handfull of
users trully needing to have more than version of ocaml installed, and
they mostly know what to do in these cases (basically, you can even
install your private ocaml suite in your home directory or anywhere you
please, and things will work nicely. You need to rebuild everything by
hand though, but it will not be interacting with the installed stuff).

> > Why?  One only has to install non-Debianized programs into
> > /usr/local/lib/ocaml/3.04/ instead of /usr/local/lib/ocaml/, that's
> > all.  He then knows that library or program has been compiled with
> > OCaml 3.04, without any knowledge of OCaml tools.
> 
> How can we control third part installation routines? I can set the
> default of findlib to install stuff there, but I can't surely impose to
> all third part softwares to use findlib neither can I impose to use the
> default findlib values ...

Well, the real problem is with locally installed non debianized stuff.

Here i agree that we should have a /usr/local/lib/ocaml/3.04 directory
for people to put stuff, especially dll.so files, but other files should
go there also, needing more advanced stuff than just the ld.conf
handler, but also a hack to the ocamlc -where scheme as well as all the
file finding (the -I +zip stuff) done at link and compil time.

This is something we could coordinate with upstream (lets say there is a
-where for local stuff and a -distwhere for distribution integrated
stuff), and the -I +dir will search in $(DISTLIBDIR)/dir and
$(LOCALLIBDIR)/dir.

As for installation tools, they mostly use ocamlc -where, so we can look
into that, or else make the standard instalation process broken, to
ensure people will not blindly install stuff in the wrong place (like
the current ld.conf stuff happened to work).

Finally, what is the point of this ? It is to keep multiple versions of
libraries around, but what is the point of that, if there is no way to
have multiple versions of the ocaml compiler suite ? They are only
stiking around and using space on your harddisk, unless you downgrade
the package to an older version, if you can find such a thing

(and notice, the other main reason (there not being the new version of
libraries when a new ocaml version is released) is already nicely
handlede by the unstable/testing scripts, if the dependencies are
correctly done, that is.

> How does it work with perl?
> 
> > Debianized programs can certainly live without versioning, dependencies are
> > already contained in the control file.
> 
> Agreed, as above.
> 
> > Where could I find documentation for these META files?
> 
> Have a look at the documentation of the ocaml-findlib package.
> 
> > > Even if we will choose a versioned solution, the locate way doesn't work
> > > with ocaml, because a library may ship a lot of .cmo .cma files and not
> > > a single .pm file as the majority of perl modules do. So you can't infer
> > > that an OCaml library is installed only because one of the .cmo
> > > installed match with the name of the library.
> > 
> > Sure, but an admin will use it anyway because he is not aware of these
> > intrinsics.
> 
> Ok, but the problem is how we can implement this tool: we can't just use
> locate, the better that comes in my mind is findlib (try 'ocamlfind
> list'), but we have to impose the use of findlib to all debian packages!
> (this is a real minor effort anyway ...).

Mostly the ocamlc -where is used, and we can trick it as above.

But for the dll.so in one place only, there needs to be some solution
discused with upstream also.

> > > Only if they are installing a non debianized ocaml library package and
> > > again, if we mention /usr/lib/ocaml in ocamlfind.conf and ld.conf by
> > > default they have to change no configuration files!
> > 
> > But when he later installs ocaml 3.05, he will be unable to know which
> > (non debianized) ocaml libraries have been compiled with ocaml 3.04 and 3.05.
> 
> Ok, but we (the sysadm) can't blame us as debian, he will have to blame
> the third part installation routine that doesn't install in a versioned
> subdir. We DD can just support versioned directories in /usr/local,
> nothing more.

But they will blame us, witness to that is Sergio's complain that the
debian package will break its when hand installing libraries with
ld.conf files.

Friendly,

Sven Luther


-- 
To UNSUBSCRIBE, email to debian-ocaml-maint-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: