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 (01:24)
From: Matt Gushee <matt@g...>
Subject: Re: [Caml-list] DBM in OCaml 3.07
On Wed, Oct 15, 2003 at 09:40:48AM +0900, Jacques Garrigue wrote:
> 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

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

Well, I tinker with my system a lot, so it's possible, but I have no
memory of adding or removing anything relating to DBM, nor can I imagine
why I would have. But I think the problem may be with the configure
script anyway--see below.

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

Ah, but it effectively has a *higher* priority in the configure script:

  for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
    if test -f $dir/ndbm.h; then
    if test -f $dir/gdbm-ndbm.h; then

Since I have both GDBM and NDBM (I hadn't looked hard enough before:
Debian provides NDBM with the libc6 package), the above results in
attempting to use GDBM (as I'm sure you can tell). Perhaps that should

  for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
    if test -f $dir/ndbm.h; then
    elif test -f $dir/gdbm-ndbm.h; then


And maybe it would be useful to add a -dbm-includes option to the
configure script, to help people work around this sort of situation. I
suspect I'm not the only person with more than one DBM library.

Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through           its fields;   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                            --Lao Tzu (Peter Merel, trans.)

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