Apache OpenOffice (AOO) Bugzilla – Issue 118621
python: build breaks due to undefined symbol: dbm_nextkey in dbm.so module
Last modified: 2013-02-21 23:22:40 UTC
Build breaks on Fedora 16: building 'dbm' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_GDBM_NDBM_H -I. -I/mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/Python-2.6.1/./Include -I. -IInclude -I./Include -I/usr/local/include -I/mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/Python-2.6.1/Include -I/mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/Python-2.6.1 -c /mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/Python-2.6.1/Modules/dbmmodule.c -o build/temp.linux-x86_64-2.6/mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/Python-2.6.1/Modules/dbmmodule.o gcc -pthread -shared build/temp.linux-x86_64-2.6/mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/Python-2.6.1/Modules/dbmmodule.o -L/mnt/build/openoffice/apache/trunk/main/python/unxlngx6/misc/build/python-inst/lib -L/usr/local/lib -L. -lgdbm -lpython2.6 -o build/lib.linux-x86_64-2.6/dbm.so *** WARNING: renaming "dbm" since importing it failed: build/lib.linux-x86_64-2.6/dbm.so: undefined symbol: dbm_nextkey [...] Failed to build these modules: dbm [...] ERROR: error 65280 occurred while making /mnt/build/openoffice/apache/trunk/main/python Modules/dbmmodule.c uses the old interface, but links only to gdbm, where the function is named gdbm_nextkey. It should also link against the compatiblity library (in systems where there is one).
Notice that the second time you try to build the python module, without cleaning the output directory, the build does not fail (does Python modules are built by Python itself, not make, and does no return an exit code in this case).
the issue is solved in upstream-Python: Issue 4587 Title: Need to rework the dbm lib/include selection process http://bugs.python.org/issue4587 http://hg.python.org/cpython/diff/2ef2cb5773fe/setup.py
Created attachment 77036 [details] Patch to solve linking issues The patch applies the upstream fix http://hg.python.org/cpython/diff/2ef2cb5773fe/setup.py This patch is attached here just in case anyone wants to build the dbm.so module. It can not be applied in OOo because it will not work in a generic Linux build (the module is linked against different libraries on different systems, so a generic build may result in undefined symbols). I guess no one will complain about OOo not including this python module, it seems it wasn't shipped with the generic Linux build (at least 330m20 (Build:9567) does not ship it).
Fixed in Revision 1204286