Reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1577396 With Python 3.7, gdb fails to build because it uses internal-only function _PyImport_FixupBuiltin whose signature has changed. The solution is to use the inittab machinery instead to make the _gdb builtin module known to Python.
The master branch has been updated by Paul Koning <pkoning@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aeab512851bf6ed623d1c6c4305b6ce05e51a10c commit aeab512851bf6ed623d1c6c4305b6ce05e51a10c Author: Paul Koning <paul_koning@dell.com> Date: Fri Jun 8 13:26:36 2018 -0400 Fix build issue with Python 3.7 Originally reported in https://bugzilla.redhat.com/show_bug.cgi?id=1577396 -- gdb build fails with Python 3.7 due to references to a Python internal function whose declaration changed in 3.7. gdb/ChangeLog 2018-06-08 Paul Koning <paul_koning@dell.com> PR gdb/23252 * python/python.c (do_start_initialization): Avoid call to internal Python API. (init__gdb_module): New function.
The patch just committed resolves this issue.
Can you merge it to the 8.1 branch too, please?
> On Jun 8, 2018, at 3:09 PM, palves at redhat dot com <sourceware-bugzilla@sourceware.org> wrote: > > https://sourceware.org/bugzilla/show_bug.cgi?id=23252 > > Pedro Alves <palves at redhat dot com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |palves at redhat dot com > > --- Comment #3 from Pedro Alves <palves at redhat dot com> --- > Can you merge it to the 8.1 branch too, please? Yes, I believe so. I don't know the branch processes; anything you can point me to? Is it just a matter of doing a merge, or are there rules about how to track things, or how to mark them in the changelogs, or stuff like that? I've never done this before. paul
I shouldn't have said "merge", as we don't really do real non-fast-forward merges. It's just a matter of applying the same patch on the branch, making sure the ChangeLog ends up as the top entry with the current day as date, and then pushing.
The gdb-8.1-branch branch has been updated by Paul Koning <pkoning@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=863d5065467b16304f6b5c80a186e3bcc68c48a6 commit 863d5065467b16304f6b5c80a186e3bcc68c48a6 Author: Paul Koning <paul_koning@dell.com> Date: Sat Jun 9 13:24:34 2018 -0400 Fix build issue with Python 3.7 Originally reported in https://bugzilla.redhat.com/show_bug.cgi?id=1577396 -- gdb build fails with Python 3.7 due to references to a Python internal function whose declaration changed in 3.7. gdb/ChangeLog 2018-06-09 Paul Koning <paul_koning@dell.com> PR gdb/23252 * python/python.c (do_start_initialization): Avoid call to internal Python API. (init__gdb_module): New function.