[issue28898] Can't compile gdb with Python 3.6

Charalampos Stratakis report at bugs.python.org
Wed Dec 7 13:14:39 EST 2016


New submission from Charalampos Stratakis:

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

----------
components: Interpreter Core
files: fix-gdb-compilation.patch
keywords: patch
messages: 282649
nosy: cstratak
priority: normal
severity: normal
status: open
title: Can't compile gdb with Python 3.6
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45791/fix-gdb-compilation.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28898>
_______________________________________


More information about the Python-bugs-list mailing list