Robotics StackExchange | Archived questions

how to fix ROS build failure RPi Raspbian

I would really appreciate advice on how to get past the folowing build failure, and/or suggestions on alternate approaches. Thanks!

Building ROS according to the directions at http://wiki.ros.org/kinetic/Installation/Source, the following command failed

$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

After I got the error, I tried to provide the missing config.cmake files by installing shiboken2 and pyside2 at the suggestion of the build output, with these commands:

$ sudo apt-get install shiboken2
$ sudo apt-get install libpyside2-5.11
$ sudo apt-get install libpyside2-py3-5.11

After this I still couldn't find the missing config.cmake files using

$ sudo find / -name Shiboken2Config.cmake

etc., so I couldn't add their paths to CMAKEPREFIXPATH which in any case doesn't exist yet.

BUILD ENVIRONMENT:

pi@raspberrypi:~ $ cat /proc/cpuinfo
processors  : 0..3
model name  : ARMv7 Processor rev 3 (v7l)
BogoMIPS    : 108.00
Features    : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 3

Hardware    : BCM2835
Revision    : c03111
Serial      : 10000000b4c6389c
Model       : Raspberry Pi 4 Model B Rev 1.1
Ram     : 4GB

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

pi@raspberrypi:~/ros_catkin_ws $ gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0

pi@raspberrypi:~ $ cat /proc/version
Linux version 4.19.75-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1270 SMP Tue Sep 24 18:51:41 BST 2019

STDOUT FROM THE LAST SUCCESSFUL PACKAGE BUILD

<== Finished processing package [64 of 186]: 'pluginlib'

==> Processing catkin package: 'qt_gui_cpp'
==> Creating build directory: 'build_isolated/qt_gui_cpp'
==> Building with env: '/home/pi/ros_catkin_ws/install_isolated/env.sh'
==> cmake /home/pi/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/qt_gui_cpp -DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/pi/ros_catkin_ws/build_isolated/qt_gui_cpp'
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/pi/ros_catkin_ws/devel_isolated/qt_gui_cpp
-- Using CMAKE_PREFIX_PATH: /home/pi/ros_catkin_ws/install_isolated
-- This workspace overlays: /home/pi/ros_catkin_ws/install_isolated
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.16", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/pi/ros_catkin_ws/build_isolated/qt_gui_cpp/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.16") 
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.20
-- BUILD_SHARED_LIBS is on
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found TinyXML: /usr/lib/arm-linux-gnueabihf/libtinyxml.so  
-- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found suitable version "2.7.16", minimum required is "2.7") 
CMake Warning at /home/pi/ros_catkin_ws/install_isolated/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 /home/pi/ros_catkin_ws/install_isolated/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 /home/pi/ros_catkin_ws/install_isolated/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/python2 (found suitable version "2.7.16", minimum required is "2.7") 
-- SIP binding generator available at: /usr/bin/sip
-- Python binding generators: sip
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/ros_catkin_ws/build_isolated/qt_gui_cpp
==> make -j4 -l4 in '/home/pi/ros_catkin_ws/build_isolated/qt_gui_cpp'
[ 15%] Generating __/__/include/qt_gui_cpp/moc_plugin_bridge.cpp
[ 15%] Generating __/__/include/qt_gui_cpp/moc_plugin.cpp
[ 15%] Generating __/__/include/qt_gui_cpp/moc_plugin_context.cpp
Scanning dependencies of target qt_gui_cpp
[ 26%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/composite_plugin_provider.cpp.o
[ 26%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/generic_proxy.cpp.o
[ 36%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_context.cpp.o
[ 36%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_bridge.cpp.o
[ 42%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_descriptor.cpp.o
[ 47%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_provider.cpp.o
[ 52%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/recursive_plugin_provider.cpp.o
[ 57%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/ros_pluginlib_plugin_provider.cpp.o
[ 63%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/settings.cpp.o
[ 68%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/__/__/include/qt_gui_cpp/moc_plugin.cpp.o
[ 73%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/__/__/include/qt_gui_cpp/moc_plugin_bridge.cpp.o
[ 78%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/__/__/include/qt_gui_cpp/moc_plugin_context.cpp.o
[ 84%] Linking CXX shared library /home/pi/ros_catkin_ws/devel_isolated/qt_gui_cpp/lib/libqt_gui_cpp.so
[ 84%] Built target qt_gui_cpp
Scanning dependencies of target libqt_gui_cpp_sip
[ 89%] Running SIP generator for qt_gui_cpp_sip Python bindings...
Traceback (most recent call last):
  File "/home/pi/ros_catkin_ws/install_isolated/share/python_qt_binding/cmake/sip_configure.py", line 85, in <module>
    sip_dir, sip_flags = get_sip_dir_flags(config)
  File "/home/pi/ros_catkin_ws/install_isolated/share/python_qt_binding/cmake/sip_configure.py", line 65, in get_sip_dir_flags
    raise FileNotFoundError('The sip directory for PyQt5 could not be located. Please ensure' +
NameError: global name 'FileNotFoundError' is not defined
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:566: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
<== Failed to process package 'qt_gui_cpp': 
  Command '['/home/pi/ros_catkin_ws/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/qt_gui_cpp && /home/pi/ros_catkin_ws/install_isolated/env.sh make -j4 -l4

Command failed, exiting.
pi@raspberrypi:~/ros_catkin_ws $

Asked by sidtupper on 2019-12-14 21:50:04 UTC

Comments

Did you successfully install the dependencies as described in step 2.1.2? Or what error did you get?

rosdep install --from-paths src --ignore-src --rosdistro kinetic -y

Asked by jschleicher@Pilz on 2019-12-16 07:00:18 UTC

Thanks for responding. Yes, I did that step, without error. I notice in your comment the parameter kinetic in the rosdep install command. In my failed build attempt I had changed that to melodic. So just now I reran the catkin_make_isolated aimed at kinetic instead, but it failed building the qt_gui_cpp package as before, with a different dependency:

[ 84%] Built target qt_gui_cpp [ 89%] Running SIP generator for qt_gui_cpp_sip Python bindings... Traceback (most recent call last): File "/home/pi/ros_catkin_ws/install_isolated/share/python_qt_binding/cmake/sip_configure.py", line 85, in sip_dir, sip_flags = get_sip_dir_flags(config) File "/home/pi/ros_catkin_ws/install_isolated/share/python_qt_binding/cmake/sip_configure.py", line 65, in get_sip_dir_flags raise FileNotFoundError('The sip directory for PyQt5 could not be located. Please ensure' +

Asked by sidtupper on 2019-12-16 14:46:11 UTC

Just now I changed the rosdep install parameter back to melodic and reran the build command, getting the same error result as with kinetic. The difference of this result with respect to the original failure 2 days ago might be due to my attempting in the meantime to resolve those dependencies by installing shiboken2, libpyside2-5.11 and libpyside2-py3-5.11 as hinted in the stdout.

Asked by sidtupper on 2019-12-16 15:01:09 UTC

Answers