From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA31422; Sat, 18 May 2002 20:23:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA31436 for ; Sat, 18 May 2002 20:23:21 +0200 (MET DST) Received: from moutng0.schlund.de (moutng0.kundenserver.de [212.227.126.170]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g4IINKr00152 for ; Sat, 18 May 2002 20:23:20 +0200 (MET DST) Received: from [212.227.126.160] (helo=mrelayng0.kundenserver.de) by moutng0.schlund.de with esmtp (Exim 3.22 #2) id 1798rQ-0007pf-00 for caml-list@inria.fr; Sat, 18 May 2002 20:23:20 +0200 Received: from [80.129.98.41] (helo=gate.gerd-stolpmann.de) by mrelayng0.kundenserver.de with asmtp (Exim 3.22 #2) id 1798rP-0008NG-00 for caml-list@inria.fr; Sat, 18 May 2002 20:23:20 +0200 Received: from ice.gerd-stolpmann.de (ice.gerd-stolpmann.de [192.168.0.13]) by gate.gerd-stolpmann.de (Postfix) with ESMTP id EB2D4CCCF for ; Sat, 18 May 2002 20:23:17 +0200 (CEST) Received: from ice (localhost [127.0.0.1]) by ice.gerd-stolpmann.de (Postfix) with ESMTP id 1C31D1AD4B for ; Sat, 18 May 2002 20:23:17 +0200 (MEST) Date: Sat, 18 May 2002 20:23:16 +0200 From: Gerd Stolpmann To: caml-list@inria.fr Subject: [Caml-list] OCaml packaging problems: findlib helps! Message-ID: <20020518202316.C629@ice.gerd-stolpmann.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Balsa 1.2.4 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello list, I have prepared an experimental version of findlib (download see below) that allows users to store DLLs into a shared directory, called "libexec". As you may know, findlib organizes packages by directory. For example, an installation with three packages X, Y, and Z could look like: /usr/local/lib/ocaml/site-lib/X/ /usr/local/lib/ocaml/site-lib/Y/ /usr/local/lib/ocaml/site-lib/Z/ Previous versions of findlib put DLLs simply into the package directories, and findlib tried to update the ld.conf file (which may fail because of missing file permissions). A similar solution is also used by the Debian packagers. There are some problems with it: - There are scalability problems when really many directories are in ld.conf - Package management systems like dpkg and rpm must use postinstall scripts which makes packaging more difficult - There is a conflict between dpkg/rpm packages and additional manual installations: Who is responsible for which line in ld.conf? - Name clashes are hard to detect (e.g. X and Y use both dllfoo.so) The experimental version of findlib recognizes a special directory libexec: /usr/local/lib/ocaml/site-lib/libexec/ The simple existence of this directory causes that all files with the suffixes .so and .dll are copied into this directory (no symlinks). Of course, this breaks the current way of representing the ownership of files. In previous versions, all files in the package directory for X are owned by X. This is simple, and works for everything else very well. In libexec, there are now .owner files, e.g. for dllfoo.so findlib creates a second file dllfoo.so.owner, containing only one line with the name of the owner. Knowing the owner of files is necessary to delete a package. The advantages of this solution are: - It is not necessary to update ld.conf when a package is installed or deleted. Usually, there are very few such libexec directories, and they are known in advance. - dpkg and rpm do no longer need postinstall scripts. - The lookup of DLLs is faster. - findlib checks whether there are name clashes. Nothing is perfect: - Recognizing a DLL by its file extension may be wrong - The .owner files are ugly, and this functionality overlaps with dpkg/rpm. - It is still difficult to install several versions of the same library. Although findlib supports several package repositories, this does not help, because all libexec directories must be mentioned in ld.conf, and the order in this file determines which library is loaded. The workaround is to set CAML_LD_LIBRARY_PATH to influence the search order manually. If you want to look at this experiment, you can download it from http://www.ocaml-programming.de/packages/findlib-0.7-pre.tar.gz Gerd -- ---------------------------------------------------------------------------- Gerd Stolpmann Telefon: +49 6151 997705 (privat) Viktoriastr. 45 64293 Darmstadt EMail: gerd@gerd-stolpmann.de Germany ---------------------------------------------------------------------------- ------------------- 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