Ask Your Question
0

buildfarm: Melodic build with qt_gui_cpp dependency doesn't install qtbase5-dev

asked 2018-05-22 08:58:56 -0500

matlabbe gravatar image

updated 2018-05-22 09:01:04 -0500

Hi,

I'm trying to release a package in Melodic (find_object_2d) that depends on qt_gui_cpp (in its package.xml ). Normally, in previous distributions (Lunar, Kinetic, Indigo...), qt_gui_cpp will install qtbase5-dev indirectly (qtbase5-dev is in package.xml of qt_gui_cpp). Then find_object_2d build will be able to find Qt5. But in Melodic, the builds fail: http://build.ros.org/job/Mbin_uB64__f... http://build.ros.org/job/Mbin_uA64__f... http://build.ros.org/job/Mbin_ubv8_uB... http://build.ros.org/job/Mbin_ubhf_uB...

with this error:

12:21:57 CMake Error at /usr/share/cmake-3.10/Modules/FindQt4.cmake:1320 (message):
12:21:57   Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
12:21:57 Call Stack (most recent call first):
12:21:57   CMakeLists.txt:47 (FIND_PACKAGE)

The error is about Qt4 because in find_object_2d's CMakeLists.txt, it searches for Qt5 first (optional), then if not found i searches for Qt4 (required):

# look for Qt5 before Qt4
FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui Network QUIET)
IF(NOT Qt5_FOUND)
   FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED)
ENDIF(NOT Qt5_FOUND)

I can reproduce the error with melodic docker desktop (not full):

$ docker run -it osrf/ros:melodic-desktop-bionic
$ cd
$ mkdir catkin_ws
$ cd catkin_ws
$ mkdir src
$ cd src
$ catkin_init_workspace
$ git clone https://github.com/introlab/find-object.git
$ cd ..
$ catkin_make

The error above appears. To solve the problem, I should explicitly install qt5:

$ apt-get install qtbase5-dev
$ catkin_make

or

$ rosdep install qt_gui_cpp
$ catkin_make

The question is why qt_gui_cpp doesn't install qtbase5-dev?https://github.com/ros-visualization/...

Original issue link: https://github.com/introlab/find-obje...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-05-22 09:51:21 -0500

Dirk Thomas gravatar image

qt_gui_cpp only declares a build dependency on qtbase5-dev. That means the dependency is only being installed when that package is being built.

When you are using it to build your package only its run dependencies are installed (otherwise users of rqt would need all development packages on their system). As far as I can see nothing in that package has changed in the past - actually Kinetic is even using the exact same branch.

So I assume that you were lucky before that some other dependency brought in qtbase5-dev transitively and your package was relying on that behavior. If your package needs qtbase5-dev I recommend that you state that explicitly as a build dependency in the manifest. The "downside" will be that you can't easily switch between Qt 5 and Qt 4. That is the reason why qt_gui_cpp uses different branches for Indigo (targeting Qt 4) and Kinetic (targeting Qt 5).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-05-22 08:58:56 -0500

Seen: 583 times

Last updated: May 22 '18