<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[复制功能包后换个路径构建报错]]></title><description><![CDATA[<p dir="auto">第七章中将chapt6_ws中的src复制到chapt7_ws的src中运行colcon build报错，报错内容如下：<br />
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):<br />
The C compiler</p>
<pre><code>"/usr/bin/cc"
</code></pre>
<p dir="auto">is not able to compile a simple test program.</p>
<p dir="auto">It fails with the following output:</p>
<pre><code>Change Dir: /home/yh/chapt7/chapt7_ws/build/fishbot_description/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_0708e/fast &amp;&amp; /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] 错误 2
</code></pre>
<p dir="auto">CMake will not be able to correctly generate this project.<br />
Call Stack (most recent call first):<br />
CMakeLists.txt:2 (project)</p>
]]></description><link>https://fishros.org.cn/forum/topic/4591/复制功能包后换个路径构建报错</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 21:12:54 GMT</lastBuildDate><atom:link href="https://fishros.org.cn/forum/topic/4591.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Oct 2025 14:13:44 GMT</pubDate><ttl>60</ttl></channel></rss>