<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,<br>
    </p>
    <p>I am taking the first steps in order to get a python-PyQt6 rpm
      package into the openSUSE Tumbleweed distribution. Currently, I
      get this error while trying to build:</p>
    <pre class="p-4 bg-light text-pre-wrap" id="log-space" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 11.2px; margin-top: 0px; margin-bottom: 1rem; overflow: auto; display: block; color: rgb(33, 37, 41); background-color: rgb(248, 249, 250) !important; padding: 1.5rem !important; white-space: pre-wrap; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[   12s] [269/385] cumulate libQt6Core6-6.0.0-2.3
...
[   12s] [280/385] cumulate libQt6DBus6-6.0.0-2.3
...
[   12s] [288/385] cumulate dbus-1-1.12.20-3.2
...
[   12s] [294/385] cumulate dbus-1-devel-1.12.20-3.2
...
[   29s] + sip-build-3.6 --verbose --api-dir /usr/share/qt6/qsci/api/python_3.6/ --no-make --qmake=/usr/lib64/qt6/bin/qmake --qmake-setting 'QMAKE_CFLAGS += -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g ' --qmake-setting 'QMAKE_CXXFLAGS += -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g ' --pep484-pyi --confirm-license --qt-shared
[   30s] Querying qmake about your Qt installation...
[   30s] /usr/lib64/qt6/bin/qmake -query
[   30s] This is the GPL version of PyQt 6.0.1 (licensed under the GNU General Public License) for Python 3.6.12 on linux.
...
[  123s] g++ -c -pipe -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -O2 -std=gnu++1z -fno-exceptions -Wall -Wextra -D_REENTRANT -fPIC -DPy_LIMITED_API=0x03040000 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/python3.6m -I/usr/include/qt6 -I/usr/include/qt6/QtCore -I. -I/usr/lib64/qt6/mkspecs/linux-g++ -o moc_helper.o moc_helper.cpp
[  124s] ../../dbus/dbus.cpp: In function 'dbus_bool_t add_watch(DBusWatch*, void*)':
[  124s] ../../dbus/dbus.cpp:43:37: warning: 'int dbus_watch_get_fd(DBusWatch*)' is deprecated [-Wdeprecated-declarations]
[  124s]    43 |     int fd = dbus_watch_get_fd(watch);
[  124s]       |                                     ^
[  124s] In file included from /usr/include/dbus-1.0/dbus/dbus-bus.h:30,
[  124s]                  from /usr/include/dbus-1.0/dbus/dbus.h:31,
[  124s]                  from /usr/include/dbus-1.0/dbus/dbus-python.h:35,
[  124s]                  from ../../dbus/dbus.cpp:27:
[  124s] /usr/include/dbus-1.0/dbus/dbus-connection.h:481:21: note: declared here
[  124s]   481 | DBUS_DEPRECATED int dbus_watch_get_fd      (DBusWatch        *watch);
[  124s]       |                     ^~~~~~~~~~~~~~~~~
<font color="#ff0000">[  124s] ../../dbus/dbus.cpp:64:19: error: 'pyqt6DBusHelper::Watchers' {aka 'class QMultiHash<int, pyqt6DBusHelper::Watcher>'} has no member named 'insertMulti'
[  124s]    64 |     hlp->watchers.insertMulti(fd, watcher);</font>
[  124s]       |                   ^~~~~~~~~~~
[  124s] ../../dbus/dbus.cpp: In function 'void remove_watch(DBusWatch*, void*)':
[  124s] ../../dbus/dbus.cpp:76:37: warning: 'int dbus_watch_get_fd(DBusWatch*)' is deprecated [-Wdeprecated-declarations]
[  124s]    76 |     int fd = dbus_watch_get_fd(watch);
[  124s]       |                                     ^
[  124s] In file included from /usr/include/dbus-1.0/dbus/dbus-bus.h:30,
[  124s]                  from /usr/include/dbus-1.0/dbus/dbus.h:31,
[  124s]                  from /usr/include/dbus-1.0/dbus/dbus-python.h:35,
[  124s]                  from ../../dbus/dbus.cpp:27:
[  124s] /usr/include/dbus-1.0/dbus/dbus-connection.h:481:21: note: declared here
[  124s]   481 | DBUS_DEPRECATED int dbus_watch_get_fd      (DBusWatch        *watch);
[  124s]       |                     ^~~~~~~~~~~~~~~~~
[  124s] ../../dbus/dbus.cpp: In function 'void toggle_watch(DBusWatch*, void*)':
[  124s] ../../dbus/dbus.cpp:108:37: warning: 'int dbus_watch_get_fd(DBusWatch*)' is deprecated [-Wdeprecated-declarations]
[  124s]   108 |     int fd = dbus_watch_get_fd(watch);
[  124s]       |                                     ^
[  124s] In file included from /usr/include/dbus-1.0/dbus/dbus-bus.h:30,
[  124s]                  from /usr/include/dbus-1.0/dbus/dbus.h:31,
[  124s]                  from /usr/include/dbus-1.0/dbus/dbus-python.h:35,
[  124s]                  from ../../dbus/dbus.cpp:27:
[  124s] /usr/include/dbus-1.0/dbus/dbus-connection.h:481:21: note: declared here
[  124s]   481 | DBUS_DEPRECATED int dbus_watch_get_fd      (DBusWatch        *watch);
[  124s]       |                     ^~~~~~~~~~~~~~~~~
[  124s] ../../dbus/dbus.cpp: In function 'PyObject* DBusQtMainLoop(PyObject*, PyObject*, PyObject*)':
[  124s] ../../dbus/dbus.cpp:356:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
[  124s]   356 |     static char *argnames[] = {"set_as_default", 0};
[  124s]       |                                ^~~~~~~~~~~~~~~~
[  124s] ../../dbus/dbus.cpp: At global scope:
[  124s] ../../dbus/dbus.cpp:400:24: warning: cast between incompatible function types from 'PyObject* (*)(PyObject*, PyObject*, PyObject*)' {aka '_object* (*)(_object*, _object*, _object*)'} to 'PyCFunction' {aka '_object* (*)(_object*, _object*)'} [-Wcast-function-type]
[  124s]   400 |     {"DBusQtMainLoop", (PyCFunction)DBusQtMainLoop, METH_VARARGS|METH_KEYWORDS,
[  124s]       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[  124s] ../../dbus/dbus.cpp: In function 'PyObject* PyInit_dbus_mainloop()':
[  124s] ../../dbus/dbus.cpp:415:5: warning: missing initializer for member 'PyModuleDef::m_slots' [-Wmissing-field-initializers]
[  124s]   415 |     };
[  124s]       |     ^
[  124s] ../../dbus/dbus.cpp:415:5: warning: missing initializer for member 'PyModuleDef::m_traverse' [-Wmissing-field-initializers]
[  124s] ../../dbus/dbus.cpp:415:5: warning: missing initializer for member 'PyModuleDef::m_clear' [-Wmissing-field-initializers]
[  124s] ../../dbus/dbus.cpp:415:5: warning: missing initializer for member 'PyModuleDef::m_free' [-Wmissing-field-initializers]
[  124s] make[1]: *** [Makefile:316: dbus.o] Error 1

</pre>
    <p>Replacing `.insertMulti` with `.insert` in dbus/dbus.cpp seems to
      help.</p>
    <p>(Don't be distracted by the Python 3.6 message, the same happens
      on Python 3.8)<br>
    </p>
    <p><br>
    </p>
    <p>Regards,<br>
      Ben<br>
    </p>
  </body>
</html>