Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Project Proposals
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] OCaml packaging problems
Concerning this ld.conf issue, I disagree both with Sven Luther's solution
(a tool that adds/removes lines from this file) and with Vitaly
Lugovsky's suggestion (multiple configuration files in a directory).

The ld.conf mechanism was modeled after the /etc/ file used
by the Unix dynamic loader.  It is intended to list a small number of
standard directories that contain shared libraries, typically one
directory for the "system" libraries (i.e. those provided by the OCaml
core distribution), one for local extensions (e.g. /usr/local/lib),
and perhaps one or two for especially large packages with many libraries
(e.g. /usr/X11R6/lib).  

When you install a package that provides a C shared library, you don't
install it in a package-dependent directory and add a line to
/etc/ with this directory; you install in /usr/lib or
/usr/local/lib, perhaps via a symbolic link.  I urge everyone to use
the same scheme for OCaml shared libraries.

(And, yes, I haven't followed this recommendation in some of the
standard OCaml libraries (labltk) or some of my own extensions,
but I've realized my error and intend to fix this in release 3.05.)

So, to summarize, I strongly suggest the following approach for RPMs
or Debian packages:
- The main Caml package can add one or two lines to ld.conf,
  e.g. /var/lib/ocaml/shlibs (for libraries installed by other packages)
  and /usr/local/lib/ocaml/shlibs (for local stuff)
- Packages for additional Caml libraries install their shared libraries
  in /var/lib/ocaml/shlibs, either directly or via a symlink.

This is simple, consistent with C shared libraries, and supports
deinstallation of additional Caml libraries without any hassle.

- Xavier Leroy
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: