0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

发表于 2021-6-8 01:50:01 9977 浏览 13 回复

关于PX4编译环境问题

本人在官网下载Ubuntu18后,通过clash 翻墙,按照PX4的用户手册,git了源码  跑完了Ubuntu.sh之后,在make px4_fmu-v2_default失败了,报的错误是

  1. CMake Error at CMakeLists.txt:204 (project):
  2.   The CMAKE_CXX_COMPILER:

  3.     arm-none-eabi-g++

  4.   is not a full path and was not found in the PATH.

  5.   Tell CMake where to find the compiler by setting either the environment
  6.   variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  7.   to the compiler, or to the compiler name if it is in the PATH.


  8. CMake Error at CMakeLists.txt:204 (project):
  9.   The CMAKE_C_COMPILER:

  10.     arm-none-eabi-gcc

  11.   is not a full path and was not found in the PATH.

  12.   Tell CMake where to find the compiler by setting either the environment
  13.   variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  14.   the compiler, or to the compiler name if it is in the PATH.


  15. CMake Error at CMakeLists.txt:204 (project):
  16.   The CMAKE_ASM_COMPILER:

  17.     arm-none-eabi-gcc

  18.   is not a full path and was not found in the PATH.

  19.   Tell CMake where to find the compiler by setting either the environment
  20.   variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  21.   to the compiler, or to the compiler name if it is in the PATH.

复制代码

在CMakelist.txt 中加入了 set(CMAKE_CXX_COMPILER "/usr/bin/gcc-7")
set(CMAKE_C_COMPILER "/usr/bin/gcc-7")
set(CMAKE_ASM_COMPILER "/usr/bin/gcc-7")

还是报错,有大佬遇到过同样的情况吗

shanghuo已获得悬赏 5 阿木币

最佳答案

早期编译的问题 大多都是环境的问题 环境又是以网络问题为主 如果是虚拟机干净的Ubuntu18.04装的 那就重来一次试试吧 PX4分支可以在稳定的stable分支 编译一般没啥问题的 搞ROS开发 也可以用他们提供的prometheus ...
2021-06-08 01-04-34 的屏幕截图.png

扫一扫浏览分享
回复

使用道具 举报

144

阿木币

0

精华

31 小时

在线时间

老司机

Rank: 2

发表于 2021-6-8 10:04:52
你这个是gcc编译器没装好吧  Ubuntu下的C++编译器  arm-none-eabi-gcc
回复 点赞

使用道具 举报

0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2021-6-8 10:09:33
shanghuo 发表于 2021-6-8 10:04
你这个是gcc编译器没装好吧  Ubuntu下的C++编译器  arm-none-eabi-gcc

file:///home/xhuanc/%E5%9B%BE%E7%89%87/2021-06-08%2010-07-59%20%E7%9A%84%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png
gcc在跑脚本的时候应该是安装了的
回复 点赞

使用道具 举报

0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2021-6-8 10:10:12
shanghuo 发表于 2021-6-8 10:04
你这个是gcc编译器没装好吧  Ubuntu下的C++编译器  arm-none-eabi-gcc

gcc 版本能够查到

2021-06-08 10-07-59 的屏幕截图.png
回复 点赞

使用道具 举报

0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2021-6-8 10:11:08
2021-06-08 10-10-56 的屏幕截图.png
回复 点赞

使用道具 举报

144

阿木币

0

精华

31 小时

在线时间

老司机

Rank: 2

发表于 2021-6-8 10:21:45
早期编译的问题  大多都是环境的问题 环境又是以网络问题为主 如果是虚拟机干净的Ubuntu18.04装的 那就重来一次试试吧  PX4分支可以在稳定的stable分支 编译一般没啥问题的 搞ROS开发 也可以用他们提供的prometheus开发镜像
回复 点赞

使用道具 举报

0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2021-6-8 10:30:14 来自手机
shanghuo 发表于 2021-6-8 10:21
早期编译的问题  大多都是环境的问题 环境又是以网络问题为主 如果是虚拟机干净的Ubuntu18.04装的 那就重来 ...

我git的应该是最新版本,需要重新装系统然后git 旧版本吗
回复 点赞

使用道具 举报

0

阿木币

0

精华

182 小时

在线时间

技术大V

Rank: 4

发表于 2021-6-8 10:55:22
编译仿真环境的话,不需要arm-gcc(交叉编译器), 可以采用gcc. 指令需要改成 make px4_sitl 。如果要编译固件下载到飞控单片机中,由于是arm架构的单片机,所以需要交叉编译器。
回复 点赞

使用道具 举报

0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2021-6-8 18:13:22 来自手机
chasing 发表于 2021-6-8 10:55
编译仿真环境的话,不需要arm-gcc(交叉编译器), 可以采用gcc. 指令需要改成 make px4_sitl 。如果要编译 ...

我是想要下载飞控板,做二次开发的,但是一直没办法编译
回复 点赞

使用道具 举报

0

阿木币

0

精华

10 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2021-6-8 23:57:23
有没有大佬知道是啥问题,被困了一天了
回复 点赞

使用道具 举报

下一页 »
12下一页
返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表