Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2002-04-30 (18:03)
From: Sven <luther@d...>
Subject: Re: [Caml-list] OCaml packaging problems
On Tue, Apr 30, 2002 at 05:28:38PM +0400, Vitaly Lugovsky wrote:
>  Hi!
>  I'm having a big troubles packaging OCaml and 3rd party
> libraries (like lablGL, lablgtk) in RPM. All the evil is in 
> the ld.conf file - foreign libraries should add lines in 
> it at the installation.

Have a look at the debian package and the solution we have adopted there.

Basically there are now 3 different files :

/usr/lib/ocaml/ld.conf (the normal one) which is autogenerated by ocaml-ldconf
from the two other ones.

/etc/ocaml/ld.conf which can be filled by the administrator to override the
dpkg generated one. (it has per line, a directory, and the command word

/var/lib/ocaml/ld.conf which is filled by a special prerm/postinst script, and
contains, not only the directory to add to ld.conf, but also the package
where this path originate. a package can provide more than one such path.

It works rather nicely, altough the ocaml-ldconf program could use some
enhancement (i wrote it hastily, but it does the job and was further
fool-tested during the debian testing process).

If this seems agreable to you, feel free to reuse any part of this scheme (the file is GPLed though, there is a basic manpage i think, and i
don't think the debhelper scripts would be usefull in a rpm context).

I also needed to add a small patch to ocam lso it will not accept comment in
the ld.conf file, but apart form that, no changes were needed.

If more people like this scheme, it could even be considered for upstream

>  The much better approach to the multi-package configurations
> is introduced, e.g. in xinetd, new crontabs, and so on - all
> external packages writes their configuration files or even
> just a symlinks to the special directory. So, it'll be better to
> have a special directory like ld.conf.dir/ with symlinks to
> the actual dynamic library paths, which will be updated safely
> when new packages are installed/removed. But, we've no directory

That would be another solution, 


Sven Luther
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: