catkin_make与gtest出现冲突的问题与解决

         更新Ubuntu系统后,不明原因导致出现以下问题:


刚开始慌慌张张无从下手,没有仔细阅读终端输出的有效提示信息,重装ROS也无济于事。后来,经师傅指出,gtest是测试时调用的,把测试禁止掉试试。上图中有Using CATKIN_ENABLE_TESTING: ON,通过设置CATKIN_ENABLE_TESTING=OFF,问题解决。感谢师傅。

y536@zy536-virtual-machine:~/catkin_ws$ catkin_make Base path: /home/zy536/catkin_ws Source space: /home/zy536/catkin_ws/src Build space: /home/zy536/catkin_ws/build Devel space: /home/zy536/catkin_ws/devel Install space: /home/zy536/catkin_ws/install #### #### Running command: "cmake /home/zy536/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/zy536/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/zy536/catkin_ws/install -G Unix Makefiles" in "/home/zy536/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/zy536/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/zy536/catkin_ws/devel;/opt/ros/noetic -- This workspace overlays: /home/zy536/catkin_ws/devel;/opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/zy536/catkin_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.10 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- Using CATKIN_WHITELIST_PACKAGES: your_package -- Configuring done -- Generating done -- Build files have been written to: /home/zy536/catkin_ws/build #### #### Running command: "make -j4 -l4" in "/home/zy536/catkin_ws/build" ####
03-08
ncut@ubuntu:~/catkin_ws$ catkin_make Base path: /home/ncut/catkin_ws Source space: /home/ncut/catkin_ws/src Build space: /home/ncut/catkin_ws/build Devel space: /home/ncut/catkin_ws/devel Install space: /home/ncut/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/ncut/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/ncut/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/ncut/catkin_ws/devel;/home/ncut/robot_ws/devel;/opt/ros/melodic -- This workspace overlays: /home/ncut/catkin_ws/devel;/home/ncut/robot_ws/devel;/opt/ros/melodic -- 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/ncut/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 -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.29 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on WARNING: package "usb_cam" should not depend on metapackage "image_transport_plugins" but on its packages instead -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 4 packages in topological order: -- ~~ - learning_communication -- ~~ - learning_tf -- ~~ - usb_cam (plain cmake) -- ~~ - mbot_description -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:100 (message): This workspace contains non-catkin packages in it, and catkin cannot build a non-homogeneous workspace without isolation. Try the 'catkin_make_isolated' command instead. Call Stack (most recent call first): CMakeLists.txt:69 (catkin_workspace) -- Configuring i
最新发布
03-30
(carla) dwh@PC:~/carla-ros-bridge/catkin_ws$ python3 -c "import em; print(em.__version__)" 4.2 (carla) dwh@PC:~/carla-ros-bridge/catkin_ws$ cd ~/carla-ros-bridge/catkin_ws (carla) dwh@PC:~/carla-ros-bridge/catkin_ws$ catkin_make clean # 清理之前的编 译残留 Base path: /home/dwh/carla-ros-bridge/catkin_ws Source space: /home/dwh/carla-ros-bridge/catkin_ws/src Build space: /home/dwh/carla-ros-bridge/catkin_ws/build Devel space: /home/dwh/carla-ros-bridge/catkin_ws/devel Install space: /home/dwh/carla-ros-bridge/catkin_ws/install #### #### Running command: "cmake /home/dwh/carla-ros-bridge/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/dwh/carla-ros-bridge/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/dwh/carla-ros-bridge/catkin_ws/install -G Unix Makefiles" in "/home/dwh/carla-ros-bridge/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/dwh/carla-ros-bridge/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/noetic -- This workspace overlays: /opt/ros/noetic -- Using PYTHON_EXECUTABLE: /home/dwh/ProgramFiles/anaconda3/envs/carla/bin/python3 -- Using Debian Python package layout -- Found PY_em: /home/dwh/ProgramFiles/anaconda3/envs/carla/lib/python3.7/site-packages/em.py -- Using empy: /home/dwh/ProgramFiles/anaconda3/envs/carla/lib/python3.7/site-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/dwh/carla-ros-bridge/catkin_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /home/dwh/ProgramFiles/anaconda3/envs/carla/bin/python3 (found version "3.7.12") -- Found Threads: TRUE -- Using Python nosetests: /usr/bin/nosetests3 ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg' Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH. CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(/home/dwh/ProgramFiles/anaconda3/envs/carla/bin/python3 "/opt/ros/noetic/share/catkin/cmake/parse_package_xml.py" "/opt/ros/noetic/share/catkin/cmake/../package.xml" "/home/dwh/carla-ros-bridge/catkin_ws/build/catkin/catkin_generated/version/package.cmake") returned error code 1 Call Stack (most recent call first): /opt/ros/noetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process) /opt/ros/noetic/share/catkin/cmake/all.cmake:168 (_catkin_package_xml) /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:58 (find_package) -- Configuring incomplete, errors occurred! See also "/home/dwh/carla-ros-bridge/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/dwh/carla-ros-bridge/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
03-16
catkin_make Base path: /home/hhb/catkin_ws Source space: /home/hhb/catkin_ws/src Build space: /home/hhb/catkin_ws/build Devel space: /home/hhb/catkin_ws/devel Install space: /home/hhb/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/hhb/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/hhb/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/hhb/catkin_ws/devel;/opt/ros/noetic -- This workspace overlays: /home/hhb/catkin_ws/devel;/opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/hhb/catkin_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.10 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on WARNING: package "turtlebot3_gazebo" should not depend on metapackage "gazebo_ros_pkgs" but on its packages instead -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 22 packages in topological order: -- ~~ - turtlebot3_simulations (plain cmake) -- ~~ - wpb_home_bringup -- ~~ - wpb_home_remote -- ~~ - abc_swarm -- ~~ - map_pkg -- ~~ - slam_pkg -- ~~ - tianbot_mini -- ~~ - nav_pkg -- ~~ - lidar_pkg -- ~~ - multi_robot_slam -- ~~ - multirobot_map_merge -- ~~ - turtlebot3_fake_node (plain cmake) -- ~~ - tianbot_mini_description -- ~~ - turtlebot3_gazebo (plain cmake) -- ~~ - explore_lite -- ~~ - rrt_star_global_planner -- ~~ - wpb_home_behaviors -- ~~ - wpb_home_python -- ~~ - wpb_home_python3
03-08
abot@abot-robot:~/catkin_ws$ catkin_make Base path: /home/abot/catkin_ws Source space: /home/abot/catkin_ws/src Build space: /home/abot/catkin_ws/build Devel space: /home/abot/catkin_ws/devel Install space: /home/abot/catkin_ws/install #### #### Running command: "cmake /home/abot/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/abot/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/abot/catkin_ws/install -G Unix Makefiles" in "/home/abot/catkin_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/abot/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/abot/catkin_ws/devel;/opt/ros/melodic -- This workspace overlays: /home/abot/catkin_ws/devel;/opt/ros/melodic -- 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/abot/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 -- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.29 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 1 packages in topological order: -- ~~ - mbot_gazebo -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin package: 'mbot_gazebo' -- ==> add_subdirectory(mbot_gazebo) -- Could NOT find gazebo_plugins (missing: gazebo_plugins_DIR) -- Could not find the required component 'gazebo_plugins'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration fil
03-25
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值