Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drapado opened this issue Nov 1, 2021 · 12 comments
Open

Comments

@drapado
Copy link

drapado commented Nov 1, 2021

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
Copy link

prirai commented Dec 17, 2021

Same error on Arch, can confirm.

@bismarckkk
Copy link

bismarckkk commented Dec 23, 2021

Do as this mail https://www.mail-archive.com/[email protected]/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
Copy link
Member

acxz commented Feb 3, 2022

Here is the commit that removed sip4 support from the archlinux package: archlinux/svntogit-packages@9f73b4a#diff-37538beb61ff63edebbf735dfcf39e5d732f49183d6beb097169d971875ca422

@suniastar
Copy link

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
Copy link
Member

acxz commented Mar 9, 2022

To clarify: #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
Copy link
Member

acxz commented Mar 9, 2022

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
Copy link

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

@acxz
Copy link
Member

acxz commented Apr 2, 2022

patched with 6095d44

@acxz acxz added the patched label Apr 2, 2022
@acxz acxz transferred this issue from ros-noetic-arch/ros-noetic-rviz Apr 2, 2022
@drapado
Copy link
Author

drapado commented Apr 5, 2022

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 ;)

@drapado drapado closed this as completed Apr 5, 2022
@acxz
Copy link
Member

acxz commented Apr 5, 2022

Thanks for the kind words @drapado!

not build for me

Link to the other issue: acxz/pkgbuilds#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
Copy link

python-pyqt5-sip4

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

@acxz
Copy link
Member

acxz commented Dec 17, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants