PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.41k stars 13.47k forks source link

[gazebo] Error when running "make posix_sitl_default gazebo" #7230

Closed cnpcshangbo closed 7 years ago

cnpcshangbo commented 7 years ago

The "make posix_sitl_default gazebo" was working before 12:25 pm yesterday, however, it gets errors today.

When I try to run "make posix_sitl_default gazebo", I encountered the following error message:

CMakeFiles/Makefile2:15020: recipe for target 'src/firmware/posix/CMakeFiles/gazebo.dir/rule' failed
make[2]: * [src/firmware/posix/CMakeFiles/gazebo.dir/rule] Error 2
Makefile:5148: recipe for target 'gazebo' failed
make[1]: * [gazebo] Error 2
Makefile:155: recipe for target 'posix_sitl_default' failed
make: * [posix_sitl_default] Error 2

My colleage has recreated the same error. Therefore, probably it is because of recent changes. Thanks, Bo

cnpcshangbo commented 7 years ago

More info in the building part:

[  7%] Built target xml_gen
-- Generating done
-- Build files have been written to: /home/parallels/src/Firmware/build_posix_sitl_default/build_gazebo
[  7%] Performing build step for 'sitl_gazebo'
make[7]: *** No rule to make target '/home/parallels/src/Firmware/Tools/sitl_gazebo/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by 'Wind.pb.cc'.  Stop.
CMakeFiles/Makefile2:289: recipe for target 'CMakeFiles/mav_msgs.dir/all' failed
make[6]: *** [CMakeFiles/mav_msgs.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make[5]: *** [all] Error 2
src/firmware/posix/CMakeFiles/sitl_gazebo.dir/build.make:112: recipe for target 'external/Stamp/sitl_gazebo/sitl_gazebo-build' failed
make[4]: *** [external/Stamp/sitl_gazebo/sitl_gazebo-build] Error 2
CMakeFiles/Makefile2:10612: recipe for target 'src/firmware/posix/CMakeFiles/sitl_gazebo.dir/all' failed
make[3]: *** [src/firmware/posix/CMakeFiles/sitl_gazebo.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
Scanning dependencies of target msg_gen
cnpcshangbo commented 7 years ago

After reading https://github.com/PX4/Firmware/issues/5223 , I followed instructions in the first part of http://dev.px4.io/starting-installing-linux.html#installation . However, I still got error messages. Any ideas? Did I use a proper C++ compiler? Thanks! Full log:

parallels@ubuntu:~/src/Firmware$ make posix_sitl_default gazebo[  1%] Built target git_mavlink
[  1%] Generating ../../../logs
[  1%] Built target prebuild_targets
[  1%] Built target git_uavcan
[  1%] Built target logs_symlink
[  1%] Built target git_matrix
[  1%] Built target git_genmsg
[  2%] Built target git_gencpp
[  2%] Built target git_jmavsim
[  2%] Built target git_driverframework
[  2%] Built target git_gazebo
[  4%] Built target df_driver_framework
[  4%] Built target git_ecl
[  4%] Built target mixer_gen
[  5%] Built target xml_gen
[  5%] Built target ver_gen
[  6%] No forceconfigure step for 'sitl_gazebo'
[  6%] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr
[ 24%] Built target msg_gen
[ 24%] Built target generate_topic_listener
[ 24%] Built target platforms__common
[ 24%] Built target drivers__boards__sitl
[ 25%] Built target drivers__camera_trigger
[ 26%] Built target examples__ekf_att_pos_estimator
[ 28%] Built target drivers__device
[ 29%] Built target drivers__gps
[ 29%] Built target drivers__pwm_out_sim
[ 30%] Built target drivers__vmount
[ 31%] Built target modules__sensors
[ 32%] Built target platforms__posix__drivers__accelsim
-- The C compiler identification is GNU 5.4.0
[ 33%] Built target platforms__posix__drivers__airspeedsim
[ 33%] Built target platforms__posix__drivers__adcsim
[ 33%] Built target platforms__posix__drivers__barosim
[ 33%] Built target platforms__posix__drivers__gpssim
[ 34%] Built target platforms__posix__drivers__gyrosim
[ 34%] Built target platforms__posix__drivers__ledsim
[ 34%] Built target platforms__posix__drivers__tonealrmsim
[ 34%] Built target systemcmds__esc_calib
[ 34%] Built target systemcmds__led_control
[ 35%] Built target systemcmds__mixer
[ 35%] Built target systemcmds__param
[ 35%] Built target systemcmds__motor_ramp
[ 36%] Built target systemcmds__perf
[ 36%] Built target systemcmds__reboot
[ 36%] Built target systemcmds__pwm
[ 37%] Built target systemcmds__top
-- The CXX compiler identification is GNU 5.4.0
[ 38%] Built target systemcmds__sd_bench
-- Check for working C compiler: /usr/bin/cc
[ 40%] Built target systemcmds__ver
[ 40%] Built target systemcmds__topic_listener
[ 41%] Built target drivers__sf0x__sf0x_tests
[ 41%] Built target lib__rc__rc_tests
[ 42%] Built target modules__commander__commander_tests
[ 42%] Built target modules__controllib_test
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
[ 43%] Built target modules__mavlink__mavlink_tests
[ 43%] Built target modules__unit_test
[ 43%] Built target modules__mc_pos_control__mc_pos_control_tests
[ 43%] Built target modules__uORB__uORB_tests
[ 48%] Built target systemcmds__tests
[ 50%] Built target modules__commander
-- Detecting C compiler ABI info - done
[ 52%] Built target modules__uORB
-- Detecting C compile features
[ 53%] Built target modules__land_detector
[ 54%] Built target modules__load_mon
[ 57%] Built target modules__navigator
[ 60%] Built target modules__mavlink
[ 61%] Built target modules__replay
[ 62%] Built target modules__simulator
[ 62%] Built target modules__ekf2
[ 62%] Built target modules__attitude_estimator_q
[ 62%] Built target modules__ekf2_replay
[ 62%] Built target modules__position_estimator_inav
[ 64%] Built target modules__local_position_estimator
[ 64%] Built target lib__external_lgpl
[ 64%] Built target modules__mc_att_control
[ 68%] Built target lib__ecl
[ 69%] Built target modules__mc_pos_control
[ 71%] Built target modules__vtol_att_control
[ 71%] Built target modules__sdlog2
[ 72%] Built target modules__logger
[ 73%] Built target modules__dataman
[ 74%] Built target modules__param
[ 75%] Built target modules__systemlib__mixer
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
[ 76%] Built target lib__controllib
[ 77%] Built target lib__conversion
[ 77%] Built target lib__DriverFramework__framework
[ 77%] Built target lib__geo
[ 78%] Built target lib__geo_lookup
[ 78%] Built target lib__launchdetection
[ 78%] Built target lib__led
[ 78%] Built target lib__mathlib__math__filter
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
[ 82%] Built target lib__rc
[ 80%] Built target lib__mathlib
[ 82%] Built target lib__runway_takeoff
[ 83%] Built target lib__tailsitter_recovery
[ 83%] Built target lib__terrain_estimation
[ 83%] Built target lib__version
[ 85%] Built target platforms__posix__work_queue
[ 87%] Built target platforms__posix__px4_layer
[ 88%] Built target modules__bottle_drop
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
[ 89%] Built target examples__rover_steering_control
[ 90%] Built target examples__segway
[ 90%] Built target examples__px4_simple_app
[ 91%] Built target examples__px4_daemon_app
[ 91%] Built target examples__px4_mavlink_debug
[ 91%] Built target examples__fixedwing_control
[ 92%] Built target modules__events
[ 93%] Built target modules__fw_att_control
[ 93%] Built target modules__fw_pos_control_l1
[ 96%] Built target modules__systemlib
[ 97%] Built target px4_none
[ 98%] Built target px4
-- Detecting CXX compile features - done
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   signals
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Boost version: 1.58.0
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   timer
--   chrono
--   date_time
--   atomic
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- catkin DISABLED
Gazebo version: 7.0
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   timer
--   chrono
--   date_time
--   atomic
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/src/Firmware/build_posix_sitl_default/build_gazebo
[ 98%] Performing build step for 'sitl_gazebo'
[  2%] Built target sdf
[ 34%] Built target mav_msgs
[ 39%] Built target klt_feature_tracker
Scanning dependencies of target rotors_gazebo_controller_interface
[ 43%] Built target gazebo_geotagged_images_plugin
[ 45%] Building CXX object CMakeFiles/LiftDragPlugin.dir/src/liftdrag_plugin/liftdrag_plugin.cpp.o
[ 47%] Building CXX object CMakeFiles/rotors_gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o
Scanning dependencies of target rotors_gazebo_mavlink_interface
[ 50%] Building CXX object CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
[ 52%] Building CXX object CMakeFiles/rotors_gazebo_controller_interface.dir/src/gazebo_controller_interface.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.
CMakeFiles/LiftDragPlugin.dir/build.make:62: recipe for target 'CMakeFiles/LiftDragPlugin.dir/src/liftdrag_plugin/liftdrag_plugin.cpp.o' failed
make[7]: *** [CMakeFiles/LiftDragPlugin.dir/src/liftdrag_plugin/liftdrag_plugin.cpp.o] Error 4
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/LiftDragPlugin.dir/all' failed
make[6]: *** [CMakeFiles/LiftDragPlugin.dir/all] Error 2
make[6]: *** Waiting for unfinished jobs....
[ 54%] Building CXX object CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/geo_mag_declination.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.
CMakeFiles/rotors_gazebo_wind_plugin.dir/build.make:62: recipe for target 'CMakeFiles/rotors_gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o' failed
make[7]: *** [CMakeFiles/rotors_gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o] Error 4
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/rotors_gazebo_wind_plugin.dir/all' failed
make[6]: *** [CMakeFiles/rotors_gazebo_wind_plugin.dir/all] Error 2
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.
CMakeFiles/rotors_gazebo_mavlink_interface.dir/build.make:62: recipe for target 'CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o' failed
make[7]: *** [CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o] Error 4
CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/rotors_gazebo_mavlink_interface.dir/all' failed
make[6]: *** [CMakeFiles/rotors_gazebo_mavlink_interface.dir/all] Error 2
[ 56%] Linking CXX shared library librotors_gazebo_controller_interface.so
[ 56%] Built target rotors_gazebo_controller_interface
Makefile:149: recipe for target 'all' failed
make[5]: *** [all] Error 2
src/firmware/posix/CMakeFiles/sitl_gazebo.dir/build.make:112: recipe for target 'external/Stamp/sitl_gazebo/sitl_gazebo-build' failed
make[4]: *** [external/Stamp/sitl_gazebo/sitl_gazebo-build] Error 2
CMakeFiles/Makefile2:10612: recipe for target 'src/firmware/posix/CMakeFiles/sitl_gazebo.dir/all' failed
make[3]: *** [src/firmware/posix/CMakeFiles/sitl_gazebo.dir/all] Error 2
CMakeFiles/Makefile2:15020: recipe for target 'src/firmware/posix/CMakeFiles/gazebo.dir/rule' failed
make[2]: *** [src/firmware/posix/CMakeFiles/gazebo.dir/rule] Error 2
Makefile:5148: recipe for target 'gazebo' failed
make[1]: *** [gazebo] Error 2
Makefile:155: recipe for target 'posix_sitl_default' failed
make: *** [posix_sitl_default] Error 2
cnpcshangbo commented 7 years ago

Inspired by https://github.com/Valloric/ycmd/issues/224, I increased my virtual machine memory to 4G. The compiler internal error is solved.