Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#998605: krita: FTBFS: sip: /usr/lib/python3/dist-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error

236 views
Skip to first unread message

Lucas Nussbaum

unread,
Nov 4, 2021, 4:20:07 PM11/4/21
to
Source: krita
Version: 1:4.4.8+dfsg-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20211104 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> make[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> [ 90%] Generating krita/sipkritapart0.cpp
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/plugins/extensions/pykrita/sip && /usr/bin/cmake -E echo
>
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/plugins/extensions/pykrita/sip && /usr/bin/cmake -E touch /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/plugins/extensions/pykrita/sip/./krita/sipkritapart0.cpp
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/plugins/extensions/pykrita/sip && /usr/bin/sip -t ALL -t WS_X11 -t Qt_5_15_0 -g -o -x PyKDE_QVector -n PyQt5.sip -j 1 -c /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/plugins/extensions/pykrita/sip/./krita -I /usr/share/sip -I /usr/lib/python3/dist-packages/PyQt5/bindings -I /<<PKGBUILDDIR>>/plugins/extensions/pykrita/sip/krita /<<PKGBUILDDIR>>/plugins/extensions/pykrita/sip/krita/kritamod.sip
> sip: /usr/lib/python3/dist-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error
> make[3]: *** [plugins/extensions/pykrita/sip/CMakeFiles/python_module_PyKrita_krita.dir/build.make:113: plugins/extensions/pykrita/sip/krita/sipkritapart0.cpp] Error 1


The full build log is available from:
http://qa-logs.debian.net/2021/11/04/krita_4.4.8+dfsg-1_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.

Dmitry Shachnev

unread,
Nov 4, 2021, 5:40:03 PM11/4/21
to
Hi,

On Thu, Nov 04, 2021 at 08:49:47PM +0100, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
>
> Relevant part (hopefully):
> > sip: /usr/lib/python3/dist-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error

It looks like a result of recent pyqt5 update — it broke compatibility with
SIP 4.

This issue was discussed on PyQt mailing list yesterday [1], but the upstream
developer said he is not going to rush to fix this.

I don't know what this means, but if there is a fix at least in upstream Vcs
or snapshots, I will cherry-pick it.

[1]: https://www.riverbankcomputing.com/pipermail/pyqt/2021-November/044346.html

--
Dmitry Shachnev
signature.asc

Dmitry Shachnev

unread,
Nov 7, 2021, 4:30:03 AM11/7/21
to
Hi Jochen!

On Fri, Nov 05, 2021 at 09:13:14AM +0100, Jochen Sprickerhof wrote:
> Hi Dmitry,
>
> Agreed, this also affects src:ros-rviz, src:qgis and src:pyqwt3d, in
> #998561, #998567 and #998595. I didn't reassign the bugs as sip4 is
> deprecated.

Thank you for giving me a list of these bugs!

> The easy fix would be to revert the change in
>
> /usr/lib/python3/dist-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23
>
> Alternatively we could add py_ssize_t_clean to the sip4 parser, see the
> attached patch.
>
> I've verified that both fix ros-rviz.

I prefer adding functionality to SIP 4 to removing the functionality from
SIP 6 or PyQt5.

So thank you for the patch, I have applied it to sip4 package and uploaded.

> Looking at
>
> https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=mitya57%40debian.org&tag=sip5
>
> I guess we want to src:ros-rviz and src:qgis to the list.
> Do you have any documentation on how to port from sip4 to sip6?
> Esp how to do code generation like /usr/bin/sip with sip6.

Unfortunately there is no replacement for /usr/bin/sip. The recommended
way is to use the new sip-build tool, and two files to configure it:
pyproject.toml and project.py.

Here are some examples of porting:

- https://github.com/frescobaldi/python-poppler-qt5/pull/41
- https://github.com/GauiStori/PyQt-Qwt/pull/14
- https://github.com/qgis/QGIS/pull/45128
- https://github.com/kovidgoyal/calibre/commit/7a4b3f61ff24f8c3
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964127#51

You can also look at what QScintilla2 does, it is developed by the same
person as SIP and PyQt so it will always use the best practice:

https://www.riverbankcomputing.com/software/qscintilla/download

Alternatively, if your project is a complex one and has more than just
a SIP binding, you may use sipbuild Python API directly. I have some
examples of this too:

- https://github.com/veusz/veusz/pull/545
- https://github.com/wxWidgets/Phoenix/pull/1916

By the way, wxpysip.py with my patch from the last link is the best
approximation of old sip tool that I know of. But it is recommended to
use the sip-build tool because sipbuild API is not stable and breaks
from time to time.

--
Dmitry Shachnev
0 new messages