Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

no python binding generators found #6

Closed
jwhendy opened this issue Jun 30, 2019 · 10 comments · Fixed by #7
Closed

no python binding generators found #6

jwhendy opened this issue Jun 30, 2019 · 10 comments · Fixed by #7

Comments

@jwhendy
Copy link
Contributor

jwhendy commented Jun 30, 2019

I'm continuing on rebuilding ros-melodic on arch now that this effort is going on. I had some lingering previous packages like pyside2, python-pyside2, shiboken2, and python-shiboken2 that came up during my previous adventure. I was getting this error (mentioned on AUR as well) when trying to build this package:

/bin/sh: --generatorSet=shiboken: command not found

In looking for that:

$ grep -r "\-\-generatorSet" *
src/build/src/qt_gui_cpp_shiboken/CMakeFiles/qt_gui_cpp_shiboken.dir/build.make:	cd /home/jwhendy/installed/build/ros-melodic-aur/ros-melodic-qt-gui-cpp/src/qt_gui_core-0.3.11/qt_gui_cpp/src/qt_gui_cpp_shiboken && --generatorSet=shiboken --include-paths=/home/jwhendy/installed/build/ros-melodic-aur/ros-melodic-qt-gui-cpp/src/qt_gui_core-0.3.11/qt_gui_cpp/src/qt_gui_cpp_shiboken/../../include:/usr/include/qt/:/usr/include/qt/QtWidgets:/usr/include/qt/QtGui:/usr/include/qt/QtCore:/usr/lib/qt//mkspecs/linux-g++:/usr/include --typesystem-paths=/usr/share/PySide2/typesystems --output-directory=/home/jwhendy/installed/build/ros-melodic-aur/ros-melodic-qt-gui-cpp/src/build/src/qt_gui_cpp_shiboken global.h typesystem.xml

I think that command is likely supposed to be:

... && /path/to/bin/shiboken --generatorSet=shiboken ...

This older post suggested removing shiboken, so I did that.

Now I'm getting this:

CMake Warning at /opt/ros/melodic/share/python_qt_binding/cmake/shiboken_helper.cmake:18 (find_package):
  By not providing "FindShiboken2.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Shiboken2", but CMake did not find one.

  Could not find a package configuration file provided by "Shiboken2" with
  any of the following names:

    Shiboken2Config.cmake
    shiboken2-config.cmake

  Add the installation prefix of "Shiboken2" to CMAKE_PREFIX_PATH or set
  "Shiboken2_DIR" to a directory containing one of the above files.  If
  "Shiboken2" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)


CMake Warning at /opt/ros/melodic/share/python_qt_binding/cmake/shiboken_helper.cmake:23 (find_package):
  By not providing "FindPySide2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PySide2", but
  CMake did not find one.

  Could not find a package configuration file provided by "PySide2" with any
  of the following names:

    PySide2Config.cmake
    pyside2-config.cmake

  Add the installation prefix of "PySide2" to CMAKE_PREFIX_PATH or set
  "PySide2_DIR" to a directory containing one of the above files.  If
  "PySide2" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)

CMake Warning at /opt/ros/melodic/share/python_qt_binding/cmake/shiboken_helper.cmake:34 (message):
  Shiboken binding generator NOT available.
Call Stack (most recent call first):
  src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "3.7") 
CMake Warning at /opt/ros/melodic/share/python_qt_binding/cmake/sip_helper.cmake:18 (message):
  SIP binding generator NOT available.
Call Stack (most recent call first):
  src/qt_gui_cpp_sip/CMakeLists.txt:36 (include)

-- Python binding generators: 
CMake Error at src/CMakeLists.txt:10 (message):
  No Python binding generator found.

Then I installed sip, and now I get:

Traceback (most recent call last):
  File "/opt/ros/melodic/share/python_qt_binding/cmake/sip_configure.py", line 8, in <module>
    import sipconfig
ModuleNotFoundError: No module named 'sipconfig'
make[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/build.make:90: sip/qt_gui_cpp_sip/Makefile] Error 1
make[1]: *** [CMakeFiles/Makefile2:380: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I'm pretty confused by what to make of this. If pyside and/or shiboken and/or sip are required, they should be [make]depends, right? On top of that, something else doesn't seem to be acting right.

@jwhendy
Copy link
Contributor Author

jwhendy commented Jun 30, 2019

Interesting. Looks like my pip installed version might have just been too old? I found I needed both sip and python-sip for this to build. Should those be depends?

@acxz
Copy link
Member

acxz commented Jul 1, 2019

So I did some dependency tracing:
ros-melodic-qt-gui-cpp -> ros-melodic-python-qt-binding -> python-pyqt5 -> python-sip-pyqt5
It seems as tho if you want to install ros-melodic-qt-gui-cpp you will end up installing python-sip-pyqt5. However python-sip-pyqt5 does not require sip or python-sip. Maybe it does what sip/python-sip are supposed to do?

To check whether this is good enough, I made sure to remove any/all *sip packages (i.e. sip, python-sip, python-sip-pyqt4, etc.) and tried clean building & installing ros-melodic-qt-gui-cpp. To my dismay I was able to recreate the issue.

@acxz
Copy link
Member

acxz commented Jul 1, 2019

Maybe sip and python-sip should be depends on ros-melodic-python-qt-binding?
Nvm see below comment.

@acxz
Copy link
Member

acxz commented Jul 1, 2019

Ah so interesting enough ros-melodic-rviz which also uses sip for python bindings does have sip and python-sip as dependencies here. (Which installs successfully after removing all sip related packages on my system.) When I have been installing ros-melodic-desktop-full, ros-melodic-rviz must have been installed first which hides the sip and python-sip requirement for ros-melodic-qt-gui-cpp. So yes it does seem appropriate to add sip and python-sip to the dependencies list. It would be appropriate to have them in the make dependencies list as well, but since ros-melodic-rviz does not I am not sure.

@jwhendy
Copy link
Contributor Author

jwhendy commented Jul 1, 2019

Thanks for confirming/diagnosing!

ros-melodic-rviz ... (Which installs successfully after removing all sip related packages on my system.)

Do you mean that despite ros-melodic-rviz wanting sip and pthon-sip, you can install it without them?

I used to use yaourt and quasi-recently switched to aurutils (recent enough I still don't feel comfortable with it). I have run into this as well where the deps build/install, but sometimes upon failure things may or may not get cleaned up properly (e.g. if I ctrl-c instead of uninstalling deps).

If it's just needed to configure/install, I'd call that a makedepend.

@acxz
Copy link
Member

acxz commented Jul 1, 2019

Do you mean that despite ros-melodic-rviz wanting sip and pthon-sip, you can install it without them?

Ah sorry I meant that using yay it installs sip and python-sip before installing ros-melodic-rviz. So starting on a system that has nothing related to sip, I run yay -Syu ros-melodic-rviz and it installs sip and python-sip during that command.

I don't know much about the package to know if they should also be runtime dependencies along side the makedependencies.

@tomcattiger1230
Copy link

I have also met a similar problem. It is
/bin/sh: --generatorSet=shiboken
I have installed shiboken2.
For ROS/ROS2 I cannot install this package. Any suggestion is welcomed.
Thanks

@ZHOUYue67
Copy link

upstream issue: ros-visualization/qt_gui_core#180

@ZHOUYue67
Copy link

ZHOUYue67 commented Aug 7, 2019

Workaround: change ${SHIBOKEN_BINARY} to Shiboken2::shiboken2 in shiboken_helper.cmake (from python-qt-binding package).

Upstream issue: ros-visualization/python_qt_binding#69

@jwhendy
Copy link
Contributor Author

jwhendy commented Sep 30, 2019

@acxz dug into this a bit myself. The dependency tree seems right, but I don't think python-sip-pyqt5 implies sip or python-sip, as you noticed (they are not dependencies). That said, they are all from the same repo...

pkgname=('sip' 'python-sip' 'python2-sip' 'python-sip-pyqt5' 'python2-sip-pyqt5')

So, all of those packages get built at the same time when you do makepkg for any of them. Thus, I think sip and python-sip may be available at build time for python-sip-pyqt5, despite them not being true deps.

Anyway, I think you're correct that this needs it at build time. Re. sip vs. shiboken... I can't comment and at one point got into the rabbit hole of pyside, sip, shiboken and just didn't follow at all.

I confirm that your PR #7 fixes for me.

@jwhendy jwhendy mentioned this issue Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants