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 incomplete, errors occurred! See also "/home/q/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/q/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:1496: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed
时间: 2023-09-13 12:10:56 浏览: 76
这个错误是由于你的工作空间包含了非catkin包,而catkin无法在非同构的工作空间中进行构建。解决这个问题的方法是尝试使用'catkin_make_isolated'命令代替'catkin_make'命令来构建工作空间。你可以在CMakeLists.txt文件中的第69行找到catkin_workspace命令并进行相应修改。另外,你还可以查看"/home/q/catkin_ws/build/CMakeFiles/CMakeOutput.log"和"/home/q/catkin_ws/build/CMakeFiles/CMakeError.log"文件来获取更多的错误信息。最后,"make cmake_check_build_system"命令执行失败导致了"cmake_check_build_system"目标的构建失败。
相关问题
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:121
抱歉,我无法解答关于CMake错误的具体问题。但我可以提供一般的帮助。CMake是一个跨平台的构建工具,用于自动化构建过程。在ROS(机器人操作系统)中,它用于构建和管理ROS工作空间。CMake错误通常是由于配置文件或依赖项的问题引起的。您可以尝试检查CMakeLists.txt文件中的语法错误或确保依赖项正确安装。如果您能提供更详细的错误信息,我可能能够提供更具体的帮助。
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:121 (add_subdirectory): The source directory
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:121 (add_subdirectory): The source directory "/home/steve/catkin_ws/src" is not a subdirectory of "/home/steve/catkin_ws/src".这个错误是由于你把功能包的文件内容写到了src文件夹下导致的。在ROS中,功能包的文件应该按照特定的结构组织。你需要将功能包的文件正确放置在功能包的目录中,而不是src目录。
解决这个问题的方法是将你误放到src文件夹下的文件移动到正确的功能包目录中。确保你的包含CMakeLists.txt的文件夹是功能包的根目录,并且不是src目录。
在你的情况下,需要将文件从/home/steve/catkin_ws/src目录中移动到正确的功能包目录中。你可以根据你的包名创建一个新的文件夹,并将文件移动到该文件夹中。然后,更新CMakeLists.txt文件以正确引用功能包的路径。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)