ros-visualization / python_qt_binding

http://wiki.ros.org/python_qt_binding
BSD 3-Clause "New" or "Revised" License
34 stars 54 forks source link

qregularexpression.h not found on Fedora #42

Closed Evidlo closed 6 years ago

Evidlo commented 6 years ago

Compilation fails with the message

/usr/share/sip/PyQt5/QtCore/qregularexpression.sip:26:32: fatal error: qregularexpression.h: No such file or directory
compilation terminated.

src/python_qt_binding/cmake/sip_configure.py is hardcoded to use the qmake binary without doing any version checking. On Fedora, it's actually called qmake-qt5 and qmake doesn't exist.

Another user using Slackware ran into the same issue.

Maybe the script should look for qmake-qt5 first, then try qmake (with version checking).

dirk-thomas commented 6 years ago

src/python_qt_binding/cmake/sip_configure.py is hardcoded to use the qmake binary without doing any version checking. On Fedora, it's actually called qmake-qt5 and qmake doesn't exist.

Shouldn't it actually fail with something like "qmake not found" rather than a header not being found?

Maybe the script should look for qmake-qt5 first, then try qmake (with version checking).

Please consider to provide a pull request for this.

dhood commented 6 years ago

qmake is typically just a symlink to qtchooser on ubuntu (apparently this is different with fedora). Do you have qtchooser installed? You might just need to configure it to pass through to the qmake-qt5 executable, instead of modifying the code

Evidlo commented 6 years ago

@dirk-thomas You're right. The error is different because I had (incorrectly) manually symlinked qmake to qtmake-qt4 earlier in the build process.

@dhood Installing the qtchooser package fixed the issue. Is this an issue with rosdep?

riebl commented 6 years ago

I have stumbled across the same issue, however, there is no qtchooser on openSUSE Leap 42.3 (at least I am not aware of it). #43 fixes this build issue on my system by calling qmake-qt5 if available and falling back to qmake. In my opinion this should not break builds on Ubuntu.

dirk-thomas commented 6 years ago

Addressed by #43.