复制功能包后换个路径构建报错
-
第七章中将chapt6_ws中的src复制到chapt7_ws的src中运行colcon build报错,报错内容如下:
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler"/usr/bin/cc"is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_0708e/fast && /usr/bin/gmake -f CMakeFiles/cmTC_0708e.dir/build.make CMakeFiles/cmTC_0708e.dir/build gmake[1]: 进入目录“/home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_0708e.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_0708e.dir/testCCompiler.c.o -c /home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_0708e /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0708e.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_0708e.dir/testCCompiler.c.o -o cmTC_0708e /usr/bin/ld: 找不到 -lgcc: 没有那个文件或目录 /usr/bin/ld: 找不到 -lgcc: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_0708e.dir/build.make:99:cmTC_0708e] 错误 1 gmake[1]: 离开目录“/home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_0708e/fast] 错误 2CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)