473,606 Members | 2,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Building Python with gdbm support

Ed
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._defaul tmod.__name__ == 'dumbdbm'
or anydbm._default mod.__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

Jul 19 '05 #1
1 4096
Ed
I've actually sorted myself out. I updated Modules/Setup.dist, so that
it has the following line...

gdbm gdbmmodule.c -I/ct/ctapp/gnu/bin/gdbm-1.8.3/include
-L/ct/ctapp/gnu/bin/gdbm-1.8.3/lib -lgdbm

Rebuilt everything in Python. I also had to ensure that my environment
using the newly-built Python contained the gdbm/lib directory in it's
LD_LIBRARY_PATH (the same value as what's passed to -L in the above
line).

I'm assuming this is alright. I guess if I change anything, I have to
remember to update Setup.dist. If I'm missing a step, or if there's an
easier way, I'm all ears... :)

Thanks,
Ed

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2099
by: Dave Harrison | last post by:
Ok before I start, please dont mail me telling me to use a more recent version of Python, I _would_ use 2.2.x but due to an existing framework all based on using 2.1.1 I have been specifically told to use 2.1.1 to avoid any crossover issues/problems. Thanks ;-) So ... Using gcc Im compiling Python2.1.1, and it configures quite reasonably, the ./configure is trascribed at the bottom of this email. now once I have done that I compile it...
0
434
by: Mike Maxwell | last post by:
First, apologies if this is not the appropriate newsgroup (and let me know what would be a better group). I downloaded the Python 2.3.3, did the ./configure and make routine. 'configure' seems to run OK, but 'make' produces a large number of errors, including "undefined reference to 'PyInt_FromLong'", "undefined reference to 'PyErr_SetString'", and a host of others. Clearly something is wrong, but I'm not sure where to start. One...
7
2414
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the up-arrow would previously give you the last command line to edit, it now just prints "^[[A".) This is a feature I use often, and it kinda nullifies that warm fuzzy feeling you get when things are otherwise working as expected. Python 2.2.2 was...
1
1341
by: Jerry LeVan | last post by:
Is it possible to build the python postgresql support library on Mac OSX 10.3.5 with the default python install? Adding "--with-python" gets an error message about libpython not being a shared library when attempting to build postgresql. (pg 7.4.5) Thanks for any pointers. Jerry
5
1484
by: mrstephengross | last post by:
Ok, I'm working on building python 2.4.2 on cygwin. I *think* it's version 3.0 or 3.1 (is there a quick way to find out what version of cygwin is running within a shell?) Anyway, it appears to 'configure' fine, but gcc reports a compile error when it gets to posixmodule.c. Here's the first few lines of the error message: ============================== gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
1
1696
by: J. Jeffrey Close | last post by:
Hi all, I have been trying for some time to build Python 2.4.x from source on OS X 10.4.6. I've found *numerous* postings on various mailing lists and web pages documenting the apparently well-known problems of doing so. Various problems arise either in the ../configure step, with configure arguments that don't work, or in the compile, or in my case in the link step with libtool.
2
1578
by: Thomas Ploch | last post by:
Hello, I followed the instructions in the Mac/README file. I ran ./configure --enable-framework But when I try to build from source with gcc 4.0.2, following happens:
4
3131
by: Arnaud Delobelle | last post by:
Hi fellow python enthusiasts. Having recently acquired a MacBook Pro (Intel Core 2 Duo) which comes with python2.5, I have been installing some modules that I need (PIL, psycopg2, PyXML ...). The problem is that compiles all the binaries to universal files for i386 and ppc32, but not x86_64 or ppc64. It does not appear to be a problem when running scripts from the shell (as python seems to run as a 32 bits problems), but it is a...
0
1304
by: Chris | last post by:
Hi, I'm trying to build Python on Windows using Visual Studio 2005. I have no trouble compiling tcl/tk 8.5, but when I subsequently build Python it doesn't find tcl/tk (I get a message about being unable to find tcl.h). I'm using the source distribution of Python 2.5.2, not the svn version. I'm trying to follow the instructions in PCbuild8/readme.txt, but I'm not sure I understand them correctly. Here is the part of the
0
8045
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7981
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8127
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6803
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5994
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5470
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2458
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1315
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.