[issue4483] Error to build _dbm module during make
Changes by Andrew Price <[EMAIL PROTECTED]>: -- nosy: +AndyP ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4483> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4483] Error to build _dbm module during make
Andrew Price <[EMAIL PROTECTED]> added the comment: I'm running the same distro as Leger and I was having the same problem. Now I've applied dbm.diff and with a clean build I'm seeing this: building '_dbm' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_GDBM_DASH_NDBM_H -I. -I/home/andy/src/python3/Python-3.0/./Include -I. -IInclude -I../Include -I/usr/local/include -I/home/andy/src/python3/Python-3.0/debug/Include -I/home/andy/src/python3/Python-3.0/debug -c /home/andy/src/python3/Python-3.0/Modules/_dbmmodule.c -o build/temp.linux-i686-3.0/home/andy/src/python3/Python-3.0/Modules/_dbmmodule.o gcc -pthread -shared build/temp.linux-i686-3.0/home/andy/src/python3/Python-3.0/Modules/_dbmmodule.o -L/usr/local/lib -lgdbm -o build/lib.linux-i686-3.0/_dbm.so *** WARNING: renaming "_dbm" since importing it failed: build/lib.linux-i686-3.0/_dbm.so: undefined symbol: dbm_firstkey ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4483> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4483] Error to build _dbm module during make
Andrew Price <[EMAIL PROTECTED]> added the comment: In Debian Lenny libgbdm-dev provides two libs, libgdbm and libgdbm_compat: [EMAIL PROTECTED]:~$ objdump -t /usr/lib/libgdbm.a | grep dbm_firstkey *UND* gdbm_firstkey 0140 g F .text 0056 gdbm_firstkey [EMAIL PROTECTED]:~$ objdump -t /usr/lib/libgdbm_compat.a | grep dbm_firstkey *UND* gdbm_firstkey g F .text 0060 dbm_firstkey *UND* gdbm_firstkey So it looks like we need to link against -lgdbm_compat instead of -lgdbm for the _dbm module. I'm attaching dbm3.diff which seems to fix the problem (I did a test build with it). Added file: http://bugs.python.org/file12230/dbm3.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4483> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4483] Error to build _dbm module during make
Andrew Price <[EMAIL PROTECTED]> added the comment: Skip, the new patch makes it fail with (highlights): ... File "/home/andy/src/python3/Python-3.0/Lib/distutils/ccompiler.py", line 844, in has_function import tempfile File "/home/andy/src/python3/Python-3.0/Lib/tempfile.py", line 35, in from random import Random as _Random File "/home/andy/src/python3/Python-3.0/Lib/random.py", line 42, in from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil ImportError: No module named math make: *** [sharedmods] Error 1 The has_function source in Lib/distutils/ccompiler.py has this comment: # this can't be included at module scope because it tries to # import math which might not be available at that point - maybe # the necessary logic should just be inlined? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4483> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4483] Error to build _dbm module during make
Andrew Price <[EMAIL PROTECTED]> added the comment: Skip, your simplified patch works for me. Makes it build fine with the following snippet: building '_dbm' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_GDBM_DASH_NDBM_H -I. -I/home/andy/src/python3/Python-3.0/./Include -I. -IInclude -I../Include -I/usr/local/include -I/home/andy/src/python3/Python-3.0/debug/Include -I/home/andy/src/python3/Python-3.0/debug -c /home/andy/src/python3/Python-3.0/Modules/_dbmmodule.c -o build/temp.linux-i686-3.0/home/andy/src/python3/Python-3.0/Modules/_dbmmodule.o gcc -pthread -shared build/temp.linux-i686-3.0/home/andy/src/python3/Python-3.0/Modules/_dbmmodule.o -L/usr/local/lib -lgdbm -lgdbm_compat -o build/lib.linux-i686-3.0/_dbm.so Thanks. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4483> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com