Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1717654 - dbus-python fails to build with Python 3.8
Summary: dbus-python fails to build with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dbus-python
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Alternative GTK desktop environments
QA Contact: Fedora Extras Quality Assurance
URL: https://copr.fedorainfracloud.org/cop...
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-06-05 21:44 UTC by Miro Hrončok
Modified: 2019-06-11 23:44 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-11 23:44:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-06-05 21:44:01 UTC
dbus-python fails to build with Python 3.8.0b1. See https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/dbus-python/ for actual logs. This report is automated and not very verbose, but I'll get back here with details.

Comment 1 Miro Hrončok 2019-06-05 21:45:03 UTC
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/builddir/build/BUILD/dbus-python-1.2.8/python3-build -include config.h -I/builddir/build/BUILD/dbus-python-1.2.8/python3-build/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/python3.8 -fno-strict-aliasing -Wdeprecated-declarations -Wno-duplicated-branches -Wno-redundant-decls -Wno-switch-default -Wno-write-strings -Wall -Wextra -Wundef -Wnested-externs -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wno-error=duplicated-branches -Wno-error=redundant-decls -Wno-error=switch-default -Wno-error=write-strings -Wno-error=unused-parameter -Wno-error=missing-field-initializers -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -MT dbus_bindings/abstract.lo -MD -MP -MF dbus_bindings/.deps/abstract.Tpo -c /builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c  -fPIC -DPIC -o dbus_bindings/.libs/abstract.o
In file included from /usr/include/python3.8/abstract.h:837,
                 from /usr/include/python3.8/Python.h:147,
                 from /builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/dbus_bindings-internal.h:32,
                 from /builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c:26:
/usr/include/python3.8/cpython/abstract.h: In function ‘_PyVectorcall_Function’:
/usr/include/python3.8/cpython/abstract.h:88:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   88 |     Py_ssize_t offset = tp->tp_vectorcall_offset;
      |     ^~~~~~~~~~
/usr/include/python3.8/cpython/abstract.h:90:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   90 |     vectorcallfunc *ptr = (vectorcallfunc *)(((char *)callable) + offset);
      |     ^~~~~~~~~~~~~~
/usr/include/python3.8/cpython/abstract.h: In function ‘_PyObject_Vectorcall’:
/usr/include/python3.8/cpython/abstract.h:119:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  119 |     vectorcallfunc func = _PyVectorcall_Function(callable);
      |     ^~~~~~~~~~~~~~
/usr/include/python3.8/cpython/abstract.h:124:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  124 |     PyObject *res = func(callable, args, nargsf, kwnames);
      |     ^~~~~~~~
/builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c: In function ‘dbus_py_init_abstract’:
/builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c:793:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  793 |     DBusPyBytesBase_Type.tp_print = NULL;
      |                         ^
/builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c:804:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  804 |     DBusPyFloatBase_Type.tp_print = NULL;
      |                         ^
/builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c:808:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  808 |     DBusPyLongBase_Type.tp_print = NULL;
      |                        ^
/builddir/build/BUILD/dbus-python-1.2.8/python3-build/dbus_bindings/abstract.c:812:23: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  812 |     DBusPyStrBase_Type.tp_print = NULL;
      |                       ^
make[2]: *** [Makefile:1416: dbus_bindings/abstract.lo] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/dbus-python-1.2.8/python3-build/build/temp.linux-x86_64-3.8'
make[1]: *** [Makefile:1606: all-recursive] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/dbus-python-1.2.8/python3-build/build/temp.linux-x86_64-3.8'
make: Leaving directory '/builddir/build/BUILD/dbus-python-1.2.8/python3-build/build/temp.linux-x86_64-3.8'
make: *** [Makefile:1020: all] Error 2
Traceback (most recent call last):
  File "setup.py", line 83, in <module>
    setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 67, in run
    subprocess.check_call(['make', '-C', builddir] + make_args)
  File "/usr/lib64/python3.8/subprocess.py", line 348, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-C', '/builddir/build/BUILD/dbus-python-1.2.8/python3-build/build/temp.linux-x86_64-3.8', 'pythondir=/builddir/build/BUILD/dbus-python-1.2.8/python3-build/build/lib.linux-x86_64-3.8', 'pyexecdir=/builddir/build/BUILD/dbus-python-1.2.8/python3-build/build/lib.linux-x86_64-3.8']' returned non-zero exit status 2.
error: Bad exit status from /var/tmp/rpm-tmp.kth40u (%build)

Comment 2 Petr Viktorin 2019-06-06 12:48:16 UTC
/usr/include/python3.8/cpython/abstract.h:124:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  124 |     PyObject *res = func(callable, args, nargsf, kwnames);
      |     ^~~~~~~~

This is a bug in Python 3.8.0b1 -- the headers should be compatible with C90. I'll work on a patch tomorrow.

Comment 3 Miro Hrončok 2019-06-06 12:55:50 UTC
However the actual error is:

error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’

AFAIK this has actually been removed, correct? It's not documented in https://docs.python.org/3.8/whatsnew/3.8.html

Comment 4 Petr Viktorin 2019-06-06 13:07:06 UTC
Yes, tp_print has been removed; python-dbus needs to change.

Comment 5 Petr Viktorin 2019-06-06 13:36:47 UTC
> [C90 incompatibility] is a bug in Python 3.8.0b1 -- the headers should be compatible with C90. I'll work on a patch tomorrow.

OK, my bad. Python needs C99 since 3.6; python-dbus needs to change here as well.

Comment 6 Miro Hrončok 2019-06-10 16:41:23 UTC
This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. The fix should be pushed on the master branch and no release bump is required.

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

This issue needs to be resolved by next week, if other rebuilds of Python 3.8 beta 1 go well. If this is unrealistic for you, let us know how much time you need.

If you don't have free cycles to dedicate fixing your package, notify us and we'll try to provide some pointers. Let us know if we can push a fix directly without a pull request, in the case we happen to have one before you do.

We recommend always consulting with upstream, chances are this is already fixed there.

Comment 7 Rex Dieter 2019-06-10 17:45:46 UTC
No good options, lots of things depend on dbus-python and there has been little activity upstream since the last release (as far as I can tell).

Comment 8 Miro Hrončok 2019-06-10 18:00:12 UTC
So we'll patch. Should be easy (#if PY_MAJOR_VERSION < 3, do the tp_print, else don't).

Comment 9 Miro Hrončok 2019-06-11 15:20:44 UTC
I'm working on a patch.


Note You need to log in before you can comment on or make changes to this bug.