Re: Is dbm module missing?

Thomas Freeman (tfreeman@netcom.com)
Mon, 15 Aug 1994 09:42:28 -0700

Cc: python-list@cwi.nl
References: <tfreemanCu345K.GqM@netcom.com>
From: Guido.van.Rossum@cwi.nl
X-Organization: CWI (Centrum voor Wiskunde en Informatica)
X-Address: P.O. Box 94079, 1090 GB Amsterdam, The Netherlands
X-Phone: +31 20 5924127 (work), +31 20 6225521 (home), +31 20 5924199 (fax)
Date: Tue, 09 Aug 1994 16:16:38 +0200
Sender: Guido.van.Rossum@cwi.nl

> Is the "dbm" module not properly linked into the current version
> of Python? I've tried using "dbm.open(...)" and the interpreter
> complains about the name "dbm". I looked at the Makefile in
> the Modules/ directory, and the dbm code sure doesn't look like
> it gets put in the library....

Look in the Modules/Setup file -- I bet the line for dbm is commented
out.

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>

Yes, that is right. Though I had to change a couple of things
to get it to link properly. I am running UnixWare 1.1, and I
had to change the Modules/Makefile. Here is the change:

old:
LIBS = -ldl -lsocket -lnsl -ldl -lsocket -lnsl
new:
LIBS = -ldl -lsocket -lnsl -ldl -lsocket -lnsl -L /usr/ucblib -lucb

old:
dbmmodule.o: $(srcdri)/dbmmodule.c; $(CC) $(CFLAGS) - $(srcdir)/dbmmodule.c
new:
dbmmodule.o: $(srcdri)/dbmmodule.c; $(CC) $(CFLAGS) -c -I /usr/ucbinclude $(srcdir)/dbmmodule.c

This is because ndbm is in the ucb compatibility stuff, but I compile
the rest of python as SVR4.

I realize that the Makefile isn't the right place to make this change.

Hope you find this info useful.

-Tom Freeman