0

My project require Raspi Camera unit and I install dependencies required following guide here

Running the script below:

sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic -j1

Error as shown with catkin_make, regardless using -j1, -j2 arguments.

[ 98%] Built target gen_opencv_python_source 
[ 98%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o
c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report,with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions. modules/python2/CMakeFiles/opencv_python2.dir/build.make:62: recipe for target 'modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o' failed
make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o] Error 4
CMakeFiles/Makefile2:8233: recipe for target 'modules/python2/CMakeFiles/opencv_python2.dir/all' failed
make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'opencv3': Command '['/opt/ros/kinetic/env.sh', 'make', '-j1']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/opencv3 && /opt/ros/kinetic/env.sh make -j1
Command failed, exiting.

The error above is resolved by adding SWAP memory for the build progress. However another Error arises as followed:

<== Finished processing package [38 of 64]: 'rosconsole'
==> Processing catkin package: 'pluginlib'
==> Building with env: '/opt/ros/kinetic/env.sh'
==> cmake /home/pi/ros_catkin_ws/src/pluginlib -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/pluginlib -DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/pi/ros_catkin_ws/build_isolated/pluginlib'
-- Using CATKIN_DEVEL_PREFIX: /home/pi/ros_catkin_ws/devel_isolated/pluginlib
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- 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/pluginlib/test_results
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   filesystem
--   system
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:183 (message):  catkin_package() CATKIN_DEPENDS on 'class_loader', which has been found in '/opt/ros/kinetic/share/class_loader/cmake/class_loaderConfig.cmake', but it is not a catkin package
Call Stack (most recent call first): /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package) CMakeLists.txt:10 (catkin_package)
-- Configuring incomplete, errors occurred!
See also "/home/pi/ros_catkin_ws/build_isolated/pluginlib/CMakeFiles/CMakeOutput.log".
See also "/home/pi/ros_catkin_ws/build_isolated/pluginlib/CMakeFiles/CMakeError.log".
<== Failed to process package 'pluginlib': Command '['/opt/ros/kinetic/env.sh', 'cmake', '/home/pi/ros_catkin_ws/src/pluginlib', '-DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/pluginlib', '-DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1
Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/pluginlib && /opt/ros/kinetic/env.sh cmake /home/pi/ros_catkin_ws/src/pluginlib -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel_isolated/pluginlib -DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'
Command failed, exiting.

Would like to seek help with what dependencies is required for this application. Thank you.

  • That guide is based on the older version of ROS (kinetic). Have you tried looking at ROS melodic instead? From their wiki ROS kinetic is not compatible with Debian stretch, but melodic is. – T. M. Apr 24 at 7:35
  • Thanks for the suggestion. However due to the other packages I am using, I'll have to stick with Kinetic for now. As I edit, another error arises now. – Lance Apr 24 at 9:43
  • Then there must be something else I'm misunderstanding since you've added the raspbian-stretch tag. – T. M. Apr 24 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.