Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_dbm not building on Fedora 17 #59249

Closed
ncoghlan opened this issue Jun 11, 2012 · 9 comments
Closed

_dbm not building on Fedora 17 #59249

ncoghlan opened this issue Jun 11, 2012 · 9 comments
Labels
build The build process and cross-build extension-modules C modules in the Modules dir

Comments

@ncoghlan
Copy link
Contributor

BPO 15044
Nosy @ncoghlan, @davidmalcolm
Files
  • gdbm.patch: patch to fix the issue
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-03-30.05:52:44.927>
    created_at = <Date 2012-06-11.12:54:35.406>
    labels = ['extension-modules', 'build']
    title = '_dbm not building on Fedora 17'
    updated_at = <Date 2014-03-30.05:52:44.925>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2014-03-30.05:52:44.925>
    actor = 'ncoghlan'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-03-30.05:52:44.927>
    closer = 'ncoghlan'
    components = ['Extension Modules']
    creation = <Date 2012-06-11.12:54:35.406>
    creator = 'ncoghlan'
    dependencies = []
    files = ['25943']
    hgrepos = []
    issue_num = 15044
    keywords = ['patch']
    message_count = 9.0
    messages = ['162612', '162688', '162691', '163028', '163031', '163033', '163034', '163036', '215167']
    nosy_count = 4.0
    nosy_names = ['ncoghlan', 'dmalcolm', 'rosslagerwall', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue15044'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @ncoghlan
    Copy link
    Contributor Author

    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

    @ncoghlan ncoghlan added extension-modules C modules in the Modules dir build The build process and cross-build labels Jun 11, 2012
    @rosslagerwall
    Copy link
    Mannequin

    rosslagerwall mannequin commented Jun 12, 2012

    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.

    @rosslagerwall
    Copy link
    Mannequin

    rosslagerwall mannequin commented Jun 12, 2012

    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.

    @ncoghlan
    Copy link
    Contributor Author

    Patch works for me, and looks pretty safe for other platforms.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 17, 2012

    New changeset e2be1f43beed by Nick Coghlan in branch '3.2':
    Issue bpo-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 bpo-15044: Handle Fedora 17's approach to ndbm compatibility)
    http://hg.python.org/cpython/rev/1f6c23ed8218

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 17, 2012

    New changeset 4d62f788aa19 by Nick Coghlan in branch '2.7':
    Issue bpo-15044: Handle Fedora 17's approach to ndbm compatibility (backport from 3.x)
    http://hg.python.org/cpython/rev/4d62f788aa19

    @ncoghlan
    Copy link
    Contributor Author

    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)

    @rosslagerwall
    Copy link
    Mannequin

    rosslagerwall mannequin commented Jun 17, 2012

    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.

    @ncoghlan
    Copy link
    Contributor Author

    I think we can skip the belated NEWS entry for something that happened a couple of years ago...

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant