RoboticaUtnFrba / create_autonomy

ROS autonomy stack for iRobot Create 2.
BSD 3-Clause "New" or "Revised" License
28 stars 38 forks source link

Running catkin build causes issues on Raspberry Pi #234

Closed GaganBhat closed 3 years ago

GaganBhat commented 3 years ago

It appears that running the catkin build on a Raspberry Pi 4 running Ubuntu 18.04 causes a lot of issues with compilation when the command catkin_make -DCMAKE_BUILD_TYPE=Release is run.

c++: error: unrecognized command line option ‘-msse3’ viso2/libviso2/CMakeFiles/viso2.dir/build.make:62: recipe for target 'viso2/libviso2/CMakeFiles/viso2.dir/libviso2/src/filter.cpp.o' failed make[2]: *** [viso2/libviso2/CMakeFiles/viso2.dir/libviso2/src/filter.cpp.o] Error 1 CMakeFiles/Makefile2:581: recipe for target 'viso2/libviso2/CMakeFiles/viso2.dir/all' failed make[1]: *** [viso2/libviso2/CMakeFiles/viso2.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 0%] Built target _ca_msgs_generate_messages_check_deps_PlaySong [ 0%] Built target _ca_msgs_generate_messages_check_deps_Mode [ 0%] Built target _ca_msgs_generate_messages_check_deps_ChargingState Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

Removing visio2 completely, I see this error.

^~~~~~~~~~~~~~~ /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: note: declared here c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/build.make:62: recipe for target 'octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/src/OctomapServer.cpp.o' failed make[2]: *** [octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/src/OctomapServer.cpp.o] Error 4 CMakeFiles/Makefile2:9030: recipe for target 'octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/all' failed make[1]: *** [octomap_mapping/octomap_server/CMakeFiles/octomap_server.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 70%] Building CXX object octomap_mapping/octomap_server/CMakeFiles/octomap_server_color.dir/src/OctomapServerMultilayer.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-7/README.Bugs> for instructions. octomap_mapping/octomap_server/CMakeFiles/octomap_server_color.dir/build.make:62: recipe for target 'octomap_mapping/octomap_server/CMakeFiles/octomap_server_color.dir/src/OctomapServer.cpp.o' failed make[2]: *** [octomap_mapping/octomap_server/CMakeFiles/octomap_server_color.dir/src/OctomapServer.cpp.o] Error 4 make[2]: *** Waiting for unfinished jobs.... [ 70%] Linking CXX shared library /home/ubuntu/Programming/create_ws/devel/lib/libTrajectoryActorPlugin.so [ 70%] Built target TrajectoryActorPlugin [ 70%] Linking CXX shared library /home/ubuntu/Programming/create_ws/devel/lib/libcreate_bumper_plugin.so [ 70%] Built target create_bumper_plugin In file included from /home/ubuntu/Programming/create_ws/src/octomap_mapping/octomap_server/include/octomap_server/OctomapServer.h:49:0, from /home/ubuntu/Programming/create_ws/src/octomap_mapping/octomap_server/include/octomap_server/OctomapServerMultilayer.h:32, from /home/ubuntu/Programming/create_ws/src/octomap_mapping/octomap_server/src/OctomapServerMultilayer.cpp:30: /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h: In function ‘void __static_initialization_and_destruction_0(int, int)’: /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: warning: ‘pcl::SAC_SAMPLE_SIZE’ is deprecated: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class [-Wdeprecated-declarations] SAC_SAMPLE_SIZE (sample_size_pairs, sample_size_pairs + sizeof (sample_size_pairs) / sizeof (SampleSizeModel)); ^~~~~~~~~~~~~~~ /usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: note: declared here CMakeFiles/Makefile2:8993: recipe for target 'octomap_mapping/octomap_server/CMakeFiles/octomap_server_color.dir/all' failed make[1]: *** [octomap_mapping/octomap_server/CMakeFiles/octomap_server_color.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

Is there a general solution to make everything compatible with the arm64 architecture of the Raspberry Pi? I believe this is what is causing the issues.

eborghi10 commented 3 years ago

Sadly I didn't find an easy fix for this and since viso2 is not needed nor being used, you can just remove the requirement of this package from the repo.

eborghi10 commented 3 years ago

After removing viso2, remove build and devel directories and compile again.

GaganBhat commented 3 years ago

Thanks, will try that @eborghi10, as I posted above I also got an error with octomap, I do not plan on running any kind of slam or LIDAR things with this project, can I remove those as well?

eborghi10 commented 3 years ago

You can safely remove those too and you won't have any problem.

GaganBhat commented 3 years ago

Removing octomap_mapping results in

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "octomap_server"
  with any of the following names:

    octomap_serverConfig.cmake
    octomap_server-config.cmake

  Add the installation prefix of "octomap_server" to CMAKE_PREFIX_PATH or set
  "octomap_server_DIR" to a directory containing one of the above files.  If
  "octomap_server" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  create_autonomy/navigation/ca_move_base/CMakeLists.txt:6 (find_package)
eborghi10 commented 3 years ago

Have you tried to run this?

rosdep install --from-path src -yi
GaganBhat commented 3 years ago

I fixed it by leaving in the octomap_mapping package in, the issue was because the C++ compiler was running out of memory. Running catkin with the -j1 argument specifying only one thread fixed it. catkin_make -DCMAKE_BUILD_TYPE=Release -j1