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

Can't compile gdb with Python 3.6 #73084

Closed
stratakis mannequin opened this issue Dec 7, 2016 · 10 comments
Closed

Can't compile gdb with Python 3.6 #73084

stratakis mannequin opened this issue Dec 7, 2016 · 10 comments
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@stratakis
Copy link
Mannequin

stratakis mannequin commented Dec 7, 2016

BPO 28898
Nosy @vstinner, @benjaminp, @ned-deily, @stratakis
Files
  • fix-gdb-compilation.patch
  • 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 2016-12-16.07:51:07.749>
    created_at = <Date 2016-12-07.18:14:39.455>
    labels = ['interpreter-core', '3.7']
    title = "Can't compile gdb with Python 3.6"
    updated_at = <Date 2016-12-16.07:51:07.747>
    user = 'https://github.com/stratakis'

    bugs.python.org fields:

    activity = <Date 2016-12-16.07:51:07.747>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-12-16.07:51:07.749>
    closer = 'ned.deily'
    components = ['Interpreter Core']
    creation = <Date 2016-12-07.18:14:39.455>
    creator = 'cstratak'
    dependencies = []
    files = ['45791']
    hgrepos = []
    issue_num = 28898
    keywords = ['3.6regression']
    message_count = 10.0
    messages = ['282649', '282695', '282696', '282713', '282753', '282754', '282768', '282772', '283378', '283381']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'benjamin.peterson', 'ned.deily', 'python-dev', 'cstratak']
    pr_nums = []
    priority = None
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28898'
    versions = ['Python 3.6', 'Python 3.7']

    @stratakis
    Copy link
    Mannequin Author

    stratakis mannequin commented Dec 7, 2016

    Trying to compile gdb, with python support and by having it depend on Python 3.6 produces an error that the HAVE_LONG_LONG has been redefined [0].

    This seems to have been introduced by this commit [1].

    I'm in no way expert on gdb, but from what I could deduct from the build logs, the #define HAVE_LONG_LONG line in pyport.h [2] is the issue, as gdb also sets the same constant to 1 [3][4]

    I build python and gdb as rpm's, but I can't verify if it happens as well outside this environment. Could someone more experienced with gdb take a look at it?

    The issue seems to be fixed by wrapping the #define HAVE_LONG_LONG with an #ifndef HAVE_LONG_LONG

    Attaching a patch for consideration

    [0] https://copr-be.cloud.fedoraproject.org/results/cstratak/python3.6/fedora-26-x86_64/00485858-gdb/build.log.gz

    [1] https://hg.python.org/cpython/rev/cf6e9968ebb7/

    [2] https://hg.python.org/cpython/file/tip/Include/pyport.h#l42

    [3] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/config.in;h=3f8a72326b5d32db6ad8966c05045e248f955498;hb=HEAD#l282

    [4] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/configure;h=6df88d9049b546a9e906b943f67374dc90d90d6d;hb=HEAD#l11662

    @stratakis stratakis mannequin added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Dec 7, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 8, 2016

    New changeset 4745d801cae2 by Benjamin Peterson in branch '3.6':
    guard HAVE_LONG_LONG definition to prevent redefinition (bpo-28898)
    https://hg.python.org/cpython/rev/4745d801cae2

    New changeset 1afc3f4f5502 by Benjamin Peterson in branch 'default':
    merge 3.6 (bpo-28898)
    https://hg.python.org/cpython/rev/1afc3f4f5502

    @benjaminp
    Copy link
    Contributor

    I think we should take this for 3.6.

    @vstinner
    Copy link
    Member

    vstinner commented Dec 8, 2016

    The pushed change 4745d801cae2 LGTM for a cherry-pick in 3.6.0.

    @vstinner
    Copy link
    Member

    vstinner commented Dec 9, 2016

    Oh, the problem has introduced a crash on OpenIndiana:
    ---
    Fatal Python error: Aborted

    Current thread 0x0000000000000001 (most recent call first):
    File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/ctypes/init.py", line 273 in _reset_cache
    ...
    ---

    http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/37/steps/test/logs/stdio

    @vstinner
    Copy link
    Member

    vstinner commented Dec 9, 2016

    The OpenIndiana uses gcc and has the long long type. Extract of the ./configure script:
    ---
    checking for gcc... gcc
    (...)
    checking size of long long... 8
    ---
    http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/37/steps/configure/logs/stdio

    @benjaminp
    Copy link
    Contributor

    Why do you think this change caused that breakage? That bot looks like it's been broken for days. This change should have no behavior change whatsoever for Python itself.

    @vstinner
    Copy link
    Member

    vstinner commented Dec 9, 2016

    Why do you think this change caused that breakage? That bot looks like it's been broken for days. This change should have no behavior change whatsoever for Python itself.

    It's right that the buildbot is broken for years:
    https://mail.python.org/pipermail/python-dev/2016-September/146538.html

    But the error changed, since the build 37, tests started to fail with a very specific error: "Fatal Python error: Aborted". The build 37 contains your change 1afc3f4f5502 and two other changes which only modify the Doc/ directory.

    Sorry, I don't know more :-/ Maybe it's a false alarm, but it's worth to investigate.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 16, 2016

    New changeset d6c8803c55b4 by Benjamin Peterson in branch '3.6':
    guard HAVE_LONG_LONG definition to prevent redefinition (bpo-28898)
    https://hg.python.org/cpython/rev/d6c8803c55b4

    New changeset 9d0765c22bed by Ned Deily in branch '3.6':
    Issue bpo-28898: add Misc/NEWS entry
    https://hg.python.org/cpython/rev/9d0765c22bed

    @ned-deily
    Copy link
    Member

    [cherrypicked for 3.6.0rc2]

    @ned-deily ned-deily removed their assignment Dec 16, 2016
    @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
    3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants