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 on Arch Linux with Python bindings #785

Open
bchretien opened this issue Jun 21, 2014 · 9 comments
Open

Build error on Arch Linux with Python bindings #785

bchretien opened this issue Jun 21, 2014 · 9 comments

Comments

@bchretien
Copy link
Contributor

cc @costashatz

Build currently fails in python_bindings/sip/configure.py:

$ make VERBOSE=1 librviz_sip
[ 98%] Running SIP generator for rviz_sip Python bindings...
cd .../rviz/src/rviz/src/python_bindings/sip && /usr/bin/python2 /opt/ros/hydro/share/python_qt_binding/cmake/sip_configure.py .../rviz/src/build/devel/bin/sip/rviz_sip rviz.sip .../rviz/src/build/devel/lib/python2.7/site-packages/rviz ".../rviz/src/rviz/src /opt/ros/hydro/include /opt/ros/hydro/include/opencv /usr/include /usr/include/eigen3 /opt/ros/hydro/include /opt/ros/hydro/include /opt/ros/hydro/include" "rviz" ".../rviz/src/build/devel/lib" "-Wl,-rpath,.../rviz/src/build/devel/lib"
Traceback (most recent call last):
File "/opt/ros/hydro/share/python_qt_binding/cmake/sip_configure.py", line 4, in <module>
from PyQt4 import pyqtconfig
ImportError: cannot import name pyqtconfig
src/python_bindings/sip/CMakeFiles/librviz_sip.dir/build.make:88: recipe for target 'devel/bin/sip/rviz_sip/Makefile' failed

The problem lies here:

from PyQt4 import pyqtconfig

Apparently, this is the old (deprecated since 4.10) build system that seems to have been removed. The current python2-pyqt4 version is 4.11 on Arch Linux.

@bchretien
Copy link
Contributor Author

Related error reported to Arch Linux upstream bugs: https://bugs.archlinux.org/task/40842

As explained in the comments, there is a ML about the issue and even a patch for Debian packagers:

http://www.riverbankcomputing.com/pipermail/pyqt/2014-June/034370.html
http://sources.debian.net/src/python-qt4/4.11+dfsg-1/debian/patches/add_pro_files.diff

So even if this is not a rviz bug, the fact that the build system is deprecated means that it should still be solved at some point.

@wjwwood
Copy link
Member

wjwwood commented Jun 23, 2014

@bchretien what's the recommended action here? I really don't have time to track down this issue at the moment, so if you are interested in getting it fixed soon please open a pull request.

Thanks!

@bchretien
Copy link
Contributor Author

@wjwwood: apparently the short-term fix should come from the Arch Linux/Debian packagers, but the build system used in rviz will need to be adapted later on since the old build system may be removed in some future python-qt4 release. According to this, python-qt4 >= 4.10 is used by Ubuntu 13.04 and the following releases, and since hydro is distributed on 12.04, I guess the fix should be done on the indigo branch.

@wjwwood
Copy link
Member

wjwwood commented Jun 23, 2014

rviz builds fine on trusty, do I understand this correctly that it should be a build failure for rviz?

@bchretien
Copy link
Contributor Author

Trusty provides python-qt4 4.10 (which has the new build system), but Arch/Debian Sid use version 4.11 (with the bug that led me here).

@wjwwood
Copy link
Member

wjwwood commented Jun 24, 2014

Ok, well, if you come up with a solution that works with 4.11+ as well as 4.10 please let us know.

@bchretien
Copy link
Contributor Author

Well, here's the answer of the Arch maintainer:

* Comment by Andrea Scarpino (BaSh) - Thursday, 03 July 2014, 13:38 GMT

In the upstream thread, Phil said:
"configure-ng.py is the new build system, pyqtconfig.py is a product of the old (deprecated)
build system."

So I guess we should stay with configure-ng.py and the projects using pyqtconfig should
be updated.

In the meantime, I created a 4.10 version of python2-pyqt4, but this is clearly not ideal and may break for Arch users at some point. If adapting the rviz code to the new build system is not too complex, this would clearly be a much appreciated change.

@wjwwood
Copy link
Member

wjwwood commented Jul 7, 2014

Well like I said, since this will not affect our target platforms for Indigo, I don't think we will try to fix this now. If you come up with a backwards compatible solution then I'd be happy to help you get it merged and released.

@bchretien
Copy link
Contributor Author

I don't have much time right now, but some other projects dealt with this, so this shoud give us some hints on how to do this.

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

2 participants