catkin_make报错——c++: internal compiler error: 已杀死 (program cc1plus)的解决方法

本文探讨了编译过程中因内存不足导致的失败问题,分析了开启过多线程对内存消耗的影响。为确保稳定解决,建议采用单线程编译,通过运行'catkin_make -j1'指令降低资源需求,尽管这将延长编译时间。

1.问题描述

在这里插入图片描述

2.原因分析

出现这种情况的原因是内存不够用(编译时打开的线程太多),导致出现上述编译失败的情况。

3.问题解决

为了保险起见,一次性解决所有问题,我们使用单线程来运行(运行时间会比较长)

运行指令:

catkin_make -j1

4.运行结果

在这里插入图片描述

bt@bt-Dell-G15-5520:~/catkin_ws$ catkin_make -j4 Base path: /home/bt/catkin_ws Source space: /home/bt/catkin_ws/src Build space: /home/bt/catkin_ws/build Devel space: /home/bt/catkin_ws/devel Install space: /home/bt/catkin_ws/install #### #### Running command: "cmake /home/bt/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/bt/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/bt/catkin_ws/install -G Unix Makefiles" in "/home/bt/catkin_ws/build" #### CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: /home/bt/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/bt/lio_sam_ws/devel;/opt/ros/melodic -- This workspace overlays: /home/bt/lio_sam_ws/devel;/opt/ros/melodic CMake Warning (dev) at /opt/ros/melodic/share/catkin/cmake/python.cmake:4 (find_package): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed. Run "cmake --help-policy CMP0148" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /opt/ros/melodic/share/catkin/cmake/all.cmake:164 (include) /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:58 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", 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/bt/catkin_ws/build/test_results -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. CMake Warning (dev) at /usr/src/googletest/googletest/cmake/internal_utils.cmake:209 (find_package): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed. Run "cmake --help-policy CMP0148" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /usr/src/googletest/googletest/CMakeLists.txt:60 (include) This warning is for project developers. Use -Wno-dev to suppress it. -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.29 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- Configuring done (1.0s) -- Generating done (0.0s) -- Build files have been written to: /home/bt/catkin_ws/build #### #### Running command: "make -j4" in "/home/bt/catkin_ws/build" #### 为什么编译到一半就突然没有了
09-19
Starting >>> ndt_gpu [140.579s] WARNING:colcon.colcon_cmake.task.cmake.build:Could not run installation step for package 'ndt_gpu' because it has no 'install' target --- stderr: ndt_gpu ** WARNING ** io features related to ensenso will be disabled ** WARNING ** io features related to davidSDK will be disabled ** WARNING ** io features related to dssdk will be disabled ** WARNING ** io features related to pcap will be disabled ** WARNING ** io features related to png will be disabled ** WARNING ** io features related to libusb-1.0 will be disabled ** WARNING ** visualization features related to ensenso will be disabled ** WARNING ** visualization features related to davidSDK will be disabled ** WARNING ** visualization features related to dssdk will be disabled ** WARNING ** visualization features related to rssdk will be disabled CUDA_TOOLKIT_ROOT_DIR not found or specified CMake Warning at /home/rosai/autoware.ai/install/autoware_build_flags/share/autoware_build_flags/cmake/autoware_build_flags-extras.cmake:36 (message): CUDA support is disabled. Set the AUTOWARE_COMPILE_WITH_CUDA environment variable and recompile to enable it Call Stack (most recent call first): CMakeLists.txt:22 (AW_CHECK_CUDA) ndt_gpu will not be built, CUDA was not found. --- Finished <<< ndt_gpu [8.58s] Starting >>> rosinterface [Processing: kitti_player, lanelet2_extension, lanelet2_python, rosinterface] Finished <<< lanelet2_extension [2min 14s] Starting >>> state_machine_lib Finished <<< rosinterface [44.8s] Starting >>> vehicle_sim_model --- stderr: kitti_player ** WARNING ** io features related to ensenso will be disabled ** WARNING ** io features related to davidSDK will be disabled ** WARNING ** io features related to dssdk will be disabled ** WARNING ** io features related to pcap will be disabled ** WARNING ** io features related to png will be disabled ** WARNING ** io features related to libusb-1.0 will be disabled ** WARNING ** visualization features related to ensenso will be disabled ** WARNING ** visualization features related to davidSDK will be disabled ** WARNING ** visualization features related to dssdk will be disabled ** WARNING ** visualization features related to rssdk will be disabled --- Finished <<< kitti_player [1min 7s] Starting >>> libvectormap Finished <<< state_machine_lib [25.5s] Starting >>> sick_ldmrs_tools Finished <<< libvectormap [23.3s] Starting >>> imm_ukf_pda_track Finished <<< vehicle_sim_model [34.7s] Starting >>> lane_planner [Processing: imm_ukf_pda_track, lane_planner, lanelet2_python, sick_ldmrs_tools] [Processing: imm_ukf_pda_track, lane_planner, lanelet2_python, sick_ldmrs_tools] [Processing: imm_ukf_pda_track, lane_planner, lanelet2_python, sick_ldmrs_tools] [Processing: imm_ukf_pda_track, lane_planner, lanelet2_python, sick_ldmrs_tools] [Processing: imm_ukf_pda_track, lane_planner, lanelet2_python, sick_ldmrs_tools] [Processing: imm_ukf_pda_track, lane_planner, lanelet2_python, sick_ldmrs_tools] --- stderr: lanelet2_python c++: internal compiler error:杀死 (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. make[2]: *** [CMakeFiles/lanelet2_python-lanelet2-geometry-pyapi.dir/python_api/geometry.cpp.o] Error 4 make[1]: *** [CMakeFiles/lanelet2_python-lanelet2-geometry-pyapi.dir/all] Error 2 make: *** [all] Error 2 --- Failed <<< lanelet2_python [5min 10s, exited with code 2] Aborted <<< lane_planner [3min 45s] Aborted <<< sick_ldmrs_tools [4min 43s] Aborted <<< imm_ukf_pda_track [4min 52s] Summary: 48 packages finished [8min 24s] 1 package failed: lanelet2_python 3 packages aborted: imm_ukf_pda_track lane_planner sick_ldmrs_tools 4 packages had stderr output: kitti_player lanelet2_python ndt_gpu sick_ldmrs_tools 113 packages not processed
最新发布
11-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

JaydenQ

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值