ardupilot 编译出错 我的解决方法

本文记录了在更新ArduPilot后遇到的编译失败问题,详细描述了错误信息,包括缺失依赖文件和任务声明错误。通过清理并重新构建项目,成功解决了编译问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SIM_VEHICLE: "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waf-light" "build" "--target" "bin/ardusub"
Waf: Entering directory `/home/zhangym/Desktop/qgroudControl/ardupilot/build/sitl'
Embedding file sandbox.lua:libraries/AP_Scripting/scripts/sandbox.lua
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/AP_HAL/utility/Stream.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/AP_HAL/utility/Print.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/AP_Math/edc.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/DataFlash/DataFlash.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/DataFlash/LogStructure.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/DataFlash/DFMessageWriter.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Dependency /home/zhangym/Desktop/qgroudControl/ardupilot/libraries/DataFlash/DataFlash_Backend.h for 
	{task 140688167951968: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o} is missing: check the task declaration and the build order!
Waf: Leaving directory `/home/zhangym/Desktop/qgroudControl/ardupilot/build/sitl'
Build failed
Traceback (most recent call last):
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Runner.py", line 395, in task_status
    return tsk.runnable_status()
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/extras/clang_compilation_database.py", line 76, in runnable_status
    run_status = self.old_runnable_status()
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Task.py", line 669, in runnable_status
    new_sig = self.signature()
  File "Tools/ardupilotwaf/ap_persistent.py", line 32, in _signature
    s = _original_signature(self)
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Task.py", line 641, in signature
    self.sig_implicit_deps()
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/extras/gccdeps.py", line 167, in sig_implicit_deps
    return Task.Task.sig_implicit_deps(self)
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Task.py", line 843, in sig_implicit_deps
    bld.imp_sigs[key] = self.compute_sig_implicit_deps()
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Task.py", line 865, in compute_sig_implicit_deps
    upd(k.get_bld_sig())
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Node.py", line 964, in get_bld_sig
    ret = cache[self] = self.h_file()
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Node.py", line 944, in h_file
    return Utils.h_file(self.abspath())
  File "/home/zhangym/Desktop/qgroudControl/ardupilot/modules/waf/waflib/Utils.py", line 278, in h_file
    with open(fname, 'rb') as f:
IOError: [Errno 2] No such file or directory: '/home/zhangym/Desktop/qgroudControl/ardupilot/libraries/AP_HAL/utility/Stream.h'

SIM_VEHICLE: Build failed
SIM_VEHICLE: Killing tasks

今天,git pull之后, ardupilot 就怎么都编译不通过. 回滚到历史版本,还是各种报错.

后来执行命令后,好了.

rm -rf build/

ardupilot$ rm -rf build/
图片

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值