[Python-Dev] Please give this patch for building bsddb a try

Skip Montanaro skip@pobox.com
Wed, 19 Jun 2002 16:10:24 -0500


    BAW> I'm still having build trouble on my RH6.1 system, but maybe it's
    BAW> just too old to worry about (I /really/ need to upgrade one of
    BAW> these days
    BAW> ;).

    BAW> -------------------- snip snip --------------------
    BAW> building 'bsddb' extension
    BAW> gcc -g -Wall -Wstrict-prototypes -fPIC -DHAVE_DB_185_H=1 -I/usr/local/BerkeleyDB.3.3/include -I. -I/home/barry/projects/python/./Include -I/usr/local/include -I/home/barry/projects/python/Include -I/home/barry/projects/python -c /home/barry/projects/python/Modules/bsddbmodule.c -o build/temp.linux-i686-2.3/bsddbmodule.o
    BAW> In file included from /home/barry/projects/python/Modules/bsddbmodule.c:25:
    BAW> /usr/local/BerkeleyDB.3.3/include/db_185.h:171: parse error before `*'
    BAW> /usr/local/BerkeleyDB.3.3/include/db_185.h:171: warning: type defaults to `int' in declaration of `__db185_open'
    BAW> /usr/local/BerkeleyDB.3.3/include/db_185.h:171: warning: data definition has no type or storage class
    BAW> /home/barry/projects/python/Modules/bsddbmodule.c: In function `newdbhashobject':
    BAW> /home/barry/projects/python/Modules/bsddbmodule.c:74: warning: assignment from incompatible pointer type
    BAW> /home/barry/projects/python/Modules/bsddbmodule.c: In function `newdbbtobject':
    BAW> /home/barry/projects/python/Modules/bsddbmodule.c:124: warning: assignment from incompatible pointer type
    BAW> /home/barry/projects/python/Modules/bsddbmodule.c: In function `newdbrnobject':
    BAW> /home/barry/projects/python/Modules/bsddbmodule.c:182: warning: assignment from incompatible pointer type
    BAW> -------------------- snip snip --------------------

I think you might have to define another CPP macro.  In my post from last
night about building dbmmodule.c I included

                                       define_macros=[('HAVE_BERKDB_H',None),
                                                      ('DB_DBM_HSEARCH',None)],

in the Extension constructor.  Maybe DB_DBM_HSEARCH is also needed for older
bsddb?  I have no trouble building though.

Skip