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: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] OCaml packaging problems
Vitaly Lugovsky <vsl@ontil.ihep.su> writes:

>  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.

The debian ocaml package use the following method :

- the ocaml package contain an executable (ocaml-ldconf) which is in
  charge of the generation of the ld.conf
- it use a file (/var/lib/ocaml/ld.conf) that contain line which look
  like /usr/lib/ocaml/lablgtk  add     liblablgtk-ocaml
  that mean : the liblablgtk-ocaml package have add the
  /usr/lib/ocaml/lablgtk directory to the /usr/lib/ocaml/ld.conf file 
  (it also use the /etc/ocaml/ld.conf file for addition of new
  directory by the administrator)

so when a new package is installed, it run in its postinst script
things like
ocaml-ldconf -pliblablgtk-ocaml -a /usr/lib/ocaml/lablgtk

and when it is remove it run in its prerm script :
ocaml-ldconf -pliblablgtk-ocaml -r /usr/lib/ocaml/lablgtk

and the ocaml-ldconf take care of every thing else...



> 
>  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
> access functions in the Pervasives library, and Unix library is
> not accessible from the runtime - we can't rewrite dll.ml to
> use this approach. May be, it'll be nice to provide some basic
> directory access functionality from Pervasives?

You may also add a dll/ directory with link to each dll...
-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
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