AutonomyLab / bebop_autonomy

ROS driver for Parrot Bebop Drones 1.0 & 2.0
http://wiki.ros.org/bebop_autonomy
BSD 3-Clause "New" or "Revised" License
152 stars 121 forks source link

Catkin build fails on Rpi 3 #93

Open siddyyagno3 opened 7 years ago

siddyyagno3 commented 7 years ago

Ubuntu MATE 16.04.1 and ROS kinetic on a Rpi 3 is my setup. Ros installation is barebones. The output of catkin_make is [ 97%] Generating C++ code from bebop_msgs/Ardrone3MediaStreamingStateVideoEnableChanged.msg [ 97%] Generating C++ code from bebop_msgs/CommonRunStateRunIdChanged.msg [ 97%] Generating C++ code from bebop_msgs/CommonCommonStateCurrentDateChanged.msg [ 98%] Generating C++ code from bebop_msgs/CommonCommonStateSensorsStatesListChanged.msg [ 98%] Generating C++ code from bebop_msgs/CommonOverHeatStateOverHeatChanged.msg [ 98%] Built target bebop_msgs_generate_messages_cpp Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

[ 78%] Built target bebop_msgs_generate_messages_cpp [ 98%] Built target bebop_msgs_generate_messages_lisp Scanning dependencies of target bebop_msgs_generate_messages [ 98%] Built target bebop_msgs_generate_messages c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions. bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/build.make:62: recipe for target 'bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/src/bebop.cpp.o' failed make[2]: *** [bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/src/bebop.cpp.o] Error 4 CMakeFiles/Makefile2:4529: recipe for target 'bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/all' failed make[1]: *** [bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

Also errors looks like Generating Lisp code from bebop_msgs/Ardrone3AntiflickeringStateelectricFrequencyChanged.msg [ 77%] Generating Lisp code from bebop_msgs/CommonAnimationsStateList.msg [ 78%] Generating Lisp code from bebop_msgs/CommonARLibsVersionsStateSkyControllerLibARCommandsVersion.msg In file included from /home/rbccps/bebop_ws/src/bebop_autonomy/bebop_driver/src/bebop.cpp:47:0: /home/rbccps/bebop_ws/src/bebop_autonomy/bebop_driver/include/bebop_driver/autogenerated/ardrone3_state_callbacks.h:43:66: fatal error: bebop_msgs/Ardrone3MediaRecordStateVideoStateChanged.h: No such file or directory compilation terminated. [ 78%] Generating Lisp code from bebop_msgs/Ardrone3NetworkStateAllWifiScanChanged.msg bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/build.make:62: recipe for target 'bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/src/bebop.cpp.o' failed make[2]: *** [bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/src/bebop.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 78%] Generating Lisp code from bebop_msgs/CommonCommonStateDeprecatedMassStorageContentChanged.msg [ 78%] Generating C++ code from bebop_msgs/Ardrone3GPSStateHomeTypeChosenChanged.msg CMakeFiles/Makefile2:4529: recipe for target 'bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/all' failed make[1]: *** [bebop_autonomy/bebop_driver/CMakeFiles/bebop.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 79%] Generating C++ code from bebop_msgs/CommonChargerStateMaxChargeRateChanged.msg [ 79%] Generating Lisp code from bebop_msgs/Ardrone3PilotingStateNavigateHomeStateChanged.msg

And warning looks like

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'libavcodec'
--   Found libavcodec, version 56.60.100
-- Checking for module 'libavformat'
--   Found libavformat, version 56.40.101
-- Checking for module 'libswscale'
--   Found libswscale, version 3.1.101
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'system_lib' but neither
  'system_lib_INCLUDE_DIRS' nor 'system_lib_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  bebop_autonomy/bebop_driver/CMakeLists.txt:40 (catkin_package)

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'libavcodec' but neither
  'libavcodec_INCLUDE_DIRS' nor 'libavcodec_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  bebop_autonomy/bebop_driver/CMakeLists.txt:40 (catkin_package)

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'libavformat' but neither
  'libavformat_INCLUDE_DIRS' nor 'libavformat_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  bebop_autonomy/bebop_driver/CMakeLists.txt:40 (catkin_package)

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'libswscale' but neither
  'libswscale_INCLUDE_DIRS' nor 'libswscale_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  bebop_autonomy/bebop_driver/CMakeLists.txt:40 (catkin_package)

-- Configuring done
-- Generating done
-- Build files have been written to: /home/rbccps/bebop_ws/build
####
#### Running command: "make -j4 -l4" in "/home/rbccps/bebop_ws/build"
####
Scanning dependencies of target _bebop_msgs_generate_messages_check_deps_CommonAnimationsStateList

While running "catkin build -DCMAKE_BUILD_TYPE=RelWithDebInfo" after deleting devel and build The output is:

`
rbccps@rbccps-desktop:~/bebop_ws$ catkin build -DCMAKE_BUILD_TYPE=RelWithDebInfo--------------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/kinetic
Workspace:                   /home/rbccps/bebop_ws
--------------------------------------------------------------
Source Space:       [exists] /home/rbccps/bebop_ws/src
Log Space:          [exists] /home/rbccps/bebop_ws/logs
Build Space:        [exists] /home/rbccps/bebop_ws/build
Devel Space:        [exists] /home/rbccps/bebop_ws/devel
Install Space:      [unused] /home/rbccps/bebop_ws/install
DESTDIR:            [unused] None
--------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
--------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=RelWithDebInfo
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
--------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
--------------------------------------------------------------
Workspace configuration appears valid.
--------------------------------------------------------------
[build] Found '5' packages in 0.0 seconds.                                     
[build] Updating package table.                                                
Warning: generated devel space setup files have been deleted.
Starting  >>> catkin_tools_prebuild                                            
Finished  <<< catkin_tools_prebuild                [ 10.3 seconds ]            
Starting  >>> bebop_description                                                
Starting  >>> bebop_msgs                                                       
Finished  <<< bebop_description                    [ 11.5 seconds ]            
Finished  <<< bebop_msgs                           [ 1 minute and 8.8 seconds ]
Starting  >>> bebop_driver                                                     
_______________________________________________________________________________
Warnings   << bebop_driver:cmake /home/rbccps/bebop_ws/logs/bebop_driver/build.cmake.002.log
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'system_lib' but neither
  'system_lib_INCLUDE_DIRS' nor 'system_lib_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:40 (catkin_package)

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'libavcodec' but neither
  'libavcodec_INCLUDE_DIRS' nor 'libavcodec_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:40 (catkin_package)

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'libavformat' but neither
  'libavformat_INCLUDE_DIRS' nor 'libavformat_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:40 (catkin_package)

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'libswscale' but neither
  'libswscale_INCLUDE_DIRS' nor 'libswscale_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:40 (catkin_package)

cd /home/rbccps/bebop_ws/build/bebop_driver; catkin build --get-env bebop_driver | catkin env -si  /usr/bin/cmake /home/rbccps/bebop_ws/src/bebop_autonomy/bebop_driver --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/rbccps/bebop_ws/devel/.private/bebop_driver -DCMAKE_INSTALL_PREFIX=/home/rbccps/bebop_ws/install -DCMAKE_BUILD_TYPE=RelWithDebInfo; cd -
...............................................................................
_______________________________________________________________________________
Errors     << bebop_driver:make /home/rbccps/bebop_ws/logs/bebop_driver/build.make.002.log
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make[2]: *** [CMakeFiles/bebop.dir/src/bebop.cpp.o] Error 4
make[1]: *** [CMakeFiles/bebop.dir/all] Error 2
make: *** [all] Error 2
cd /home/rbccps/bebop_ws/build/bebop_driver; catkin build --get-env bebop_driver | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed     << bebop_driver:make                    [ Exited with code 2 ]      
Failed    <<< bebop_driver                         [ 36 minutes and 57.1 seconds ]
Abandoned <<< bebop_tools                          [ Unrelated job failed ]    
[build] Summary: 3 of 5 packages succeeded.                                    
[build]   Ignored:   1 packages were skipped or are blacklisted.               
[build]   Warnings:  1 packages succeeded with warnings.                       
[build]   Abandoned: 1 packages were abandoned.                                
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 38 minutes and 18.9 seconds total.
`

And log file output is

Scanning dependencies of target bebop_driver_gencfg
[ 12%] Generating dynamic reconfigure files from cfg/autogenerated/BebopArdrone3.cfg: /home/rbccps/bebop_ws/devel/.private/bebop_driver/include/bebop_driver/BebopArdrone3Config.h /home/rbccps/bebop_ws/devel/.private/bebop_driver/lib/python2.7/dist-packages/bebop_driver/cfg/BebopArdrone3Config.py
Generating reconfiguration files for BebopArdrone3 in bebop_driver
Wrote header file in /home/rbccps/bebop_ws/devel/.private/bebop_driver/include/bebop_driver/BebopArdrone3Config.h
[ 12%] Built target bebop_driver_gencfg
Scanning dependencies of target bebop
[ 25%] Building CXX object CMakeFiles/bebop.dir/src/bebop.cpp.o
[ 37%] Building CXX object CMakeFiles/bebop.dir/src/bebop_video_decoder.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-5/README.Bugs> for instructions.
make[2]: *** [CMakeFiles/bebop.dir/src/bebop.cpp.o] Error 4
CMakeFiles/bebop.dir/build.make:62: recipe for target 'CMakeFiles/bebop.dir/src/bebop.cpp.o' failed
CMakeFiles/Makefile2:1096: recipe for target 'CMakeFiles/bebop.dir/all' failed
make[1]: *** [CMakeFiles/bebop.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Any help would be appreciated.

thomas-bamford commented 7 years ago

Hello, Sorry for the late reply. Please see issue #118, this may help with the problem you are having. I will repeat the solution here, instead of running catkin build -DCMAKE_BUILD_TYPE=RelWithDebInfo please try running catkin build Please let us know if this helps. This works on Ubuntu but I do not have access to a Rpi 3. Thanks.

mani-monaj commented 7 years ago

Thanks @thomas-bamford for the solution.

The CI does not catch this error. Do you think if it is related to newer Ubuntu/Debian versions being used that the CI?

pmordel commented 6 years ago

bebop_driver/autogenerated/ardrone3_state_callbacks.h:43:66: fatal error: bebop_msgs/Ardrone3MediaRecordStateVideoStateChanged.h: No such file or directory

This is typically an error due to the fact that the messages were not generated before the build was made.

To make sur that all your messages are well generated in the first place, you need to edit the "bebop_autonomy/bebop_driverCMakeLists.txt" file

Replace the line add_dependencies(bebop ${PROJECT_NAME}_gencfg) by add_dependencies(bebop ${PROJECT_NAME}_gencfg ${catkin_EXPORTED_TARGETS})

Works for me. I tried both version in a new workspace with only this modification, the first one send me this error, the second one compile successfully.