Building Python with gdbm support
Ed
edhillmann at yahoo.com
Mon Jun 6 00:31:24 EDT 2005
I am trying to use a Perl script which requires a Database module other
than "dbm" to be the default Mod. So, what the script is checking is
import anydbm
if (anydbm._defaultmod.__name__ == 'dumbdbm'
or anydbm._defaultmod.__name__ == 'dbm'):
First of, I'm doing this on a Sparc/Solaris 8 box.
So, I'm trying to get gdbm to be the default mod. I've downloaded and
built gdbm-1.8.3. It has not been build to /usr (I don't have root
access). I've built this fine.
When I build Python 2.4.1, it at first doesn't pick up on the gdbm
module ("dbm" is still the default module, and Modules directory in the
Python source doesn'thave a .o file for the gdbmmodule file).
I've nosed around, and found the a line commented out Modules/Setup
file, regarding building the gdbm module. I uncommented it (being sure
that the approrpiate directories for the .h and lib files are
provided), and it looked like it built the module. But when I attempt
to start python, I get an error:
ld.so.1: python: fatal: libgdbm.so.3: open failed: No such file or
directory
Killed
Look, the bottom line is I don't know what the correct steps are to get
the gdbm module built in as part of the Python installation (as well as
setting it as the default database module). I've tried to piece
together bits and pieces of various newsgroup messages, as I haven't
found a decent spot for any doco.
Can anyone point me in the right direction, in regards to how to get my
Python installation set up the way I want?
Is it correct to edit the Modules/Setup file? I would have thought
that the configure approach would support these types of isses, rather
than manually editing a file? Should I be using the setup.py script?
I have no idea what that does, or where I would call it, but the name
of it sounds like it should be included?
Thanks for any help,
Ed
More information about the Python-list
mailing list