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 CAA30435; Wed, 15 Oct 2003 02:13:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA05836 for ; Wed, 15 Oct 2003 02:13:53 +0200 (MET DST) Received: from mz1.forethought.net (mzpi3.forethought.net [216.241.36.12]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9F0DU125357 for ; Wed, 15 Oct 2003 02:13:34 +0200 (MET DST) Received: from [216.241.35.41] (helo=swordfish) by mz1.forethought.net with esmtp (Exim 4.14) id 1A9ZI4-0003nZ-V4 for caml-list@pauillac.inria.fr; Tue, 14 Oct 2003 18:13:25 -0600 Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 1A9ZIC-00077C-00 for ; Tue, 14 Oct 2003 18:13:32 -0600 Date: Tue, 14 Oct 2003 18:13:32 -0600 From: Matt Gushee To: caml-list@pauillac.inria.fr Subject: [Caml-list] DBM in OCaml 3.07 Message-ID: <20031015001332.GB26799@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@pauillac.inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; gushee:01 gushee:01 3.07:01 all--:01 3.07:01 'configure':01 ndbm:01 ndbm:01 3.06,:01 '--i:99 3.06.:01 incompatible:01 3.06.:01 3.06:01 hash:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, all-- I built and installed OCaml 3.07 for the first time yesterday, and noticed a couple of issues with the Dbm module. First of all, when I ran 'configure', I got an error message saying that NDBM support was not available. Now, strictly speaking that is true: I am running Debian GNU/Linux 3.0 with GDBM, not NDBM. But I had DBM working under OCaml 3.06, and as far as I can remember no special measures were required to build it. More specifically, the configure script tests for the existence of $INCLUDE_PATH/gdbm-ndbm.h; if that file is found, it then tests 'sh ./hasgot -lgdbm_compat -lgdbm dbm_open' (line 1253). This test fails on my system, since there is no libgdbm_compat.so, and as far as I can tell there is no Debian package that provides that library (nor is there any Debian package providing NDBM--the alternatives to GDBM are packages called 'libdb2' and 'libdb3'--I haven't tried either, but judging from the file names in the packages, they aren't intended to be used in place of NDBM). Now, I was able to configure and build the Dbm module simply by adding the lines elif sh ./hasgot -lgdbm dbm_open; then dbm_link="-lgdbm" to the configure script, and I seem to have a working Dbm module ... or do I? I notice I can't open a DBM database in write-only mode, which was also the case with OCaml 3.06. So I'm wondering if the build was supposed to fail. So I don't know if the configure script needs to be fixed or not. If not, though, there should probably be some documentation explaining exactly what libraries and headers are needed for DBM. The second issue I encountered is that the databases produced by the 3.07 version of Dbm are incompatible with those created under 3.06. E.g. $ file /var/lib/fontdb/ttf.db # old file, created under 3.06 /var/lib/fontdb/ttf.db: Berkeley DB 1.85 \ (Hash, version 2, native byte-order) $ file /var/tmp/spam.dir # new files, created under 3.07 /var/tmp/spam.dir: GNU dbm 1.x or ndbm database, little endian $ file /var/tmp/spam.pag /var/tmp/spam.pag: GNU dbm 1.x or ndbm database, little endian Shouldn't there be at least a Changelog entry for this? -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- 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