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] DBM in OCaml 3.07
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-15 (00:41)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] DBM in OCaml 3.07
From: Matt Gushee <>

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

This is strange enough: apparently under ocaml 3.06 you were using
Berkeley DB rather than gdbm. This is coherent with the configure
script, which tries Berkeley DB (db1) before gdbm.
Now, for some reason Berkeley DB seems not to work on your system now
(you could try to configure ocaml 3.06 again to see that).
So I think the change is in your system not in ocaml itself.
Did you remove some library?

There seems to be another problem with gdbm-ndbm.h being ignored if
there is no gdbm_compat library, which might have to be fixed, but I'm
no gdbm exert. gdbm-ndbm.h was not checked on ocaml 3.06, but it has
lower priority than ndbm.h anyway.

Jacques Garrigue

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