Issue 15044: _dbm not building on Fedora 17 (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/59249

classification

Title: _dbm not building on Fedora 17
Type: compile error Stage: resolved
Components: Extension Modules Versions: Python 3.2, Python 3.3, Python 2.7

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: dmalcolm, ncoghlan, python-dev, rosslagerwall
Priority: normal Keywords: patch

Created on 2012-06-11 12:54 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
gdbm.patch rosslagerwall,2012-06-12 19:33 patch to fix the issue review
Messages (9)
msg162612 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2012-06-11 12:54
After upgrading from Fedora 16 -> 17, my previously working trunk build is getting the following error: Building '_dbm' extension gcc -pthread -fPIC -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -DHAVE_NDBM_H -IInclude -I. -I./Include -I/usr/local/include -I/home/ncoghlan/devel/py3k -c /home/ncoghlan/devel/py3k/Modules/_dbmmodule.c -o build/temp.linux-x86_64-3.3-pydebug/home/ncoghlan/devel/py3k/Modules/_dbmmodule.o gcc -pthread -shared build/temp.linux-x86_64-3.3-pydebug/home/ncoghlan/devel/py3k/Modules/_dbmmodule.o -L/usr/local/lib -o build/lib.linux-x86_64-3.3-pydebug/_dbm.cpython-33dm.so *** WARNING: renaming "_dbm" since importing it failed: build/lib.linux-x86_64-3.3-pydebug/_dbm.cpython-33dm.so: undefined symbol: dbm_nextkey Failed to build these modules: _dbm
msg162688 - (view) Author: Ross Lagerwall (rosslagerwall) (Python committer) Date: 2012-06-12 18:19
The gdbm provided with Fedora 17 provides /usr/include/ndbm.h. This makes setup.py think that it should try link with -lndbm when it actually requires -lgdbm_compat. A workaround is to specify --with-dbmliborder=gdbm to force gdbm to be used. I'll try and make a patch for this.
msg162691 - (view) Author: Ross Lagerwall (rosslagerwall) (Python committer) Date: 2012-06-12 19:33
Attached is a patch which fixes the issue on Fedora 17. If this doesn't break other OSes I'll commit it for 2.7, 3.2 and 3.3.
msg163028 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2012-06-17 08:21
Patch works for me, and looks pretty safe for other platforms.
msg163031 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-17 08:28
New changeset e2be1f43beed by Nick Coghlan in branch '3.2': Issue #15044: Handle Fedora 17's approach to ndbm compatibility http://hg.python.org/cpython/rev/e2be1f43beed New changeset 1f6c23ed8218 by Nick Coghlan in branch 'default': Merge from 3.2. (Issue #15044: Handle Fedora 17's approach to ndbm compatibility) http://hg.python.org/cpython/rev/1f6c23ed8218
msg163033 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-17 08:35
New changeset 4d62f788aa19 by Nick Coghlan in branch '2.7': Issue #15044: Handle Fedora 17's approach to ndbm compatibility (backport from 3.x) http://hg.python.org/cpython/rev/4d62f788aa19
msg163034 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2012-06-17 08:37
I committed the fix to at least get things building again, but this should probably get a NEWS entry (since builds that would have previously used gdbm directly will now use it in ndbm compatibility mode instead)
msg163036 - (view) Author: Ross Lagerwall (rosslagerwall) (Python committer) Date: 2012-06-17 08:58
Yeah, after I submitted the patch, I was unsure if that was a good idea or if it should try and use gdbm in native mode if possible.
msg215167 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2014-03-30 05:52
I think we can skip the belated NEWS entry for something that happened a couple of years ago...
History
Date User Action Args
2022-04-11 14:57:31 admin set github: 59249
2014-03-30 05:52:44 ncoghlan set status: open -> closedresolution: fixedmessages: + stage: resolved
2012-06-17 08:58:28 rosslagerwall set messages: +
2012-06-17 08:37:58 ncoghlan set messages: +
2012-06-17 08:35:54 python-dev set messages: +
2012-06-17 08:28:10 python-dev set nosy: + python-devmessages: +
2012-06-17 08:21:47 ncoghlan set messages: +
2012-06-12 19:33:53 rosslagerwall set files: + gdbm.patchkeywords: + patchmessages: + versions: + Python 2.7, Python 3.2
2012-06-12 18:19:02 rosslagerwall set nosy: + rosslagerwallmessages: +
2012-06-11 12:54:35 ncoghlan create