ros-noetic-arch / ros-noetic-python-qt-binding

ros-noetic-python-qt-binding AUR package
0 stars 2 forks source link

Build error - sip: PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error #7

Open drapado opened 3 years ago

drapado commented 3 years ago

Build error encountered when running yay -S ros-noetic-desktop-full on a clean install:

[ 98%] Built target color_editor_test
[ 98%] Running SIP generator for rviz_sip Python bindings...
sip: /usr/lib/python3.9/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error
Traceback (most recent call last):
  File "/opt/ros/noetic/share/python_qt_binding/cmake/sip_configure.py", line 122, in <module>
    subprocess.check_call(cmd)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/sip', '-c', '/home/david/.cache/yay/ros-noetic-rviz/src/build/sip/rviz_sip', '-b', '/home/david/.cache/yay/ros-noetic-rviz/src/build/sip/rviz_sip/pyqtscripting.sbf', '-I', '/usr/lib/python3.9/site-packages/PyQt5/bindings', '-w', '-n', 'PyQt5.sip', '-t', 'Qt_5_15_0', '-t', 'WS_X11', 'rviz.sip']' returned non-zero exit status 1.
make[2]: *** [src/python_bindings/sip/CMakeFiles/librviz_sip.dir/build.make:108: sip/rviz_sip/Makefile] Error 1
make[1]: *** [CMakeFiles/Makefile2:4831: src/python_bindings/sip/CMakeFiles/librviz_sip.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: ros-noetic-rviz
prirai commented 2 years ago

Same error on Arch, can confirm.

bismarckkk commented 2 years ago

Do as this mail https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1828544.html, remove py_ssize_t_clean=True from your PyQt5/bindings/QtCore/QtCoremod.sip:23 can fix this problem. But I think the best way to solve this is fix sip as that mail.

acxz commented 2 years ago

Here is the commit that removed sip4 support from the archlinux package: https://github.com/archlinux/svntogit-packages/commit/9f73b4aabafa235823c529e3a37799ce678b776d#diff-37538beb61ff63edebbf735dfcf39e5d732f49183d6beb097169d971875ca422

suniastar commented 2 years ago

Does a fix or workaround for this issue exist? I've read to this issue but I am not sure on what to do to compile this package successfully.

acxz commented 2 years ago

To clarify: ros-noetic-arch/ros-noetic-python-qt-binding#7

sudoedit /usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip

Edit line 23 to: %Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True)

acxz commented 2 years ago

The proper fix is to revert the commit to add sip4 support back. Another workaround is to add a pyqt5-sip4 package in the AUR that has support for sip4 which is what I'm currently working on.

vebjornjr commented 2 years ago

Same error on Manjaro, but the fix with editing line 23 seems to work for me.

acxz commented 2 years ago

patched with 6095d44

drapado commented 2 years ago

Closing as python-pyqt5-sip4 package is out. python-pyqt5-sip4 does not build for me, but that's an issue for other repository. Thanks a lot for all the work you @acxz and the rest of the guys do packaging ROS for arch ;)

acxz commented 2 years ago

Thanks for the kind words @drapado!

not build for me

Link to the other issue: https://github.com/acxz/pkgbuilds/issues/176 tldr build in a clean chroot (recommend to use paru's --chroot feature)

We'll keep this issue open since the solution is technically a patch until I can convince the Arch maintainers to add the sip4 support back in the official python-pyqt5 package.

felixf4xu commented 1 year ago

python-pyqt5-sip4

May I install it via pip like pip install pyqt5-sip4? (Currently I use pip install PyQt5-sip)

acxz commented 11 months ago

@felixf4xu I have not uploaded that package on pypi. I would suggest you use the AUR package as the entire ros-noetic-arch stack is on AUR and will make your life easier. If you do want to use it via pip you'll have to host it on pypi yourself.