This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Error building _bsddb extension
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: aimacintyre, gregory.p.smith, phd
Priority: high Keywords:

Created on 2004-12-01 20:19 by phd, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-bsddb-pget32.diff gregory.p.smith, 2004-12-16 09:52 patch against Modules/_bsddb.c to fix compilation against 3.2
Messages (5)
msg23502 - (view) Author: Oleg Broytman (phd) * Date: 2004-12-01 20:19
Trying to build Python 2.4 on Debian GNU/Linux 3.0
using gcc  3.3.4. BerkeleyDB version is 3.2, header is
/usr/include/db.h, library in /usr/lib.

Error:

gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -fPIC
-I. -I/usr/local/src/Python/Python-2.4/./Include
-I/usr/local/include
-I/usr/local/src/Python/Python-2.4/Include
-I/usr/local/src/Python/Python-2.4 -c
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c -o
build/temp.linux-i686-2.4/_bsddb.o
running build_scripts
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c: In
function `DB_pget':
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c:1464:
error: structure has no member named `pget'
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c:1482:
error: structure has no member named `primaryDBType'
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c:1483:
error: structure has no member named `primaryDBType'
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c: In
function `DBC_pget':
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c:2928:
error: structure has no member named `c_pget'
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c:2943:
error: structure has no member named `primaryDBType'
/usr/local/src/Python/Python-2.4/Modules/_bsddb.c:2944:
error: structure has no member named `primaryDBType'
msg23503 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2004-12-12 09:23
Logged In: YES 
user_id=250749

What are the DB_VERSION_MAJOR and DB_VERSION_MINOR macros
defined to in your /usr/include/db.h?

The primaryDBType symbol is only referenced in code compiled
for DB versions 3.3 and higher, and the pget symbol is
referenced in code compiled for DB 3.2 and higher.
msg23504 - (view) Author: Oleg Broytman (phd) * Date: 2004-12-12 10:47
Logged In: YES 
user_id=4799

#define	DB_VERSION_MAJOR	3
#define	DB_VERSION_MINOR	2
#define	DB_VERSION_PATCH	9
#define	DB_VERSION_STRING	"Sleepycat Software: Berkeley DB
3.2.9: (April  7, 2002)"
msg23505 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2004-12-13 12:13
Logged In: YES 
user_id=413

Yes this is easy to reproduce.  At the moment the preferred workaround is to use a more recent version of BerkeleyDB <= 4.2 (4.3 support has not yet been committed to the 2.4 maintenance branch).

I'll fix this so that 3.2 works again shortly.
msg23506 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2004-12-16 09:52
Logged In: YES 
user_id=413

fixed in python cvs both in HEAD and 2.4 (release24-maint branch).

patch attached to this bug if you just want to apply it to your python 2.4 tarball.  fwiw, its better to use a more recent version of berkeleydb if possible.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41271
2004-12-01 20:19:39phdcreate