QGroundControl@Jetson Orin Nano - 从代码编译安装

QGroundControl@Jetson Orin Nano - Build from Source

  • 1. 源由
  • 2. 步骤
    • 2.1 QT 编译
      • 2.1.1 下载
      • 2.1.2 版本
      • 2.1.3 初始化
      • 2.1.4 配置
      • 2.1.5 编译
      • 2.1.6 安装
    • 2.2 QGC 编译
      • 2.2.1 下载
      • 2.2.2 版本
      • 2.2.3 初始化
      • 2.2.4 配置
      • 2.2.5 编译
      • 2.2.6 安装
      • 2.2.7 QT5命令备注
  • 3. 可行方案
  • 4. 总结
  • 5. 补充 - 问题清单
    • 5.1 cmake配置命令错误
    • 5.2 qtconnectivity5-dev库问题
    • 5.3 libqt5charts5-dev库问题
    • 5.4 qtlocation5-dev库问题
    • 5.5 qtpositioning5-dev库问题
    • 5.6 qtmultimedia5-dev库问题
    • 5.7 qtquickcontrols2-5-dev库问题
    • 5.8 libqt5svg5-dev库问题
    • 5.9 libqt5texttospeech5-dev库问题
    • 5.10 libqt5serialport5-dev库问题
    • 5.11 libqt5x11extras5-dev库问题
    • 5.12 cmake版本问题
    • 5.13 修改CMakeList.txt

1. 源由

先说结论:直接从QGroundControl代码在Jetson Orin Nano板子上编译不成功!

按照以下文档中的步骤和方法进行编译,最后卡在:

  1. Getting Started with Source and Builds
  2. Building Qt 6 from Git
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc: In function ‘GstGLDisplay* gst_qml6_get_gl_display(gboolean)’:
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:94:62: error: ‘QX11Application’ is not a member of ‘QNativeInterface’; did you mean ‘QWaylandApplication’?
   94 |     auto x11_native = app->nativeInterface<QNativeInterface::QX11Application>();
      |                                                              ^~~~~~~~~~~~~~~
      |                                                              QWaylandApplication
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:94:79: error: no matching function for call to ‘QGuiApplication::nativeInterface<<expression error> >()94 |     auto x11_native = app->nativeInterface<QNativeInterface::QX11Application>();
      |                                                                               ^
In file included from /home/daniel/QGC/qt6/qt6-install/include/QtCore/qcoreapplication.h:16,
                 from /home/daniel/QGC/qt6/qt6-install/include/QtGui/qguiapplication.h:8,
                 from /home/daniel/QGC/qt6/qt6-install/include/QtGui/QGuiApplication:1,
                 from /home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:26:
/home/daniel/QGC/qt6/qt6-install/include/QtGui/qguiapplication.h:142:5: note: candidate: ‘template<class NativeInterface, class TypeInfo, class BaseType, typename std::enable_if<TypeInfo::isCompatibleWith<QGuiApplication>, bool>::type <anonymous> > NativeInterface* QGuiApplication::nativeInterface() const’
  142 |     QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QGuiApplication)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/daniel/QGC/qt6/qt6-install/include/QtGui/qguiapplication.h:142:5: note:   template argument deduction/substitution failed:
/home/daniel/QGC/qgroundcontrol/libs/qmlglsink/qt6/gstqt6glutility.cc:94:79: error: template argument 1 is invalid
   94 |     auto x11_native = app->nativeInterface<QNativeInterface::QX11Application>();
      |                                                                               ^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
ninja: build stopped: subcommand failed.

2. 步骤

注:/path/to/install是安装路径,请根据实际需要进行安装目录调整。

2.1 QT 编译

注:推荐使用6.6.3版本,但是笔者也试过5.15.2

  • QGC最新master(5a348d3) + QT6.6.3 ==》失败
  • QGC-Stable4.4 + QT6.6.3 ==》失败
  • QGC-Stable4.4 + QT5.15.2 ==》失败

2.1.1 下载

$ git clone git://code.qt.io/qt/qt5.git qt6

2.1.2 版本

$ cd qt6
$ git checkout 6.6.3

2.1.3 初始化

$ perl init-repository

2.1.4 配置

$ mkdir qt6-build
$ ./configure -prefix /path/to/install

2.1.5 编译

$ cmake --build . --parallel 4

2.1.6 安装

$ cmake --install .

2.2 QGC 编译

2.2.1 下载

$ git clone --recursive -j8 https://github.com/mavlink/qgroundcontrol.git

2.2.2 版本

$ cd qgroundcontrol
$ git checkout Stable_V4.4

2.2.3 初始化

$ git submodule update --recursive

2.2.4 配置

$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/path/to/install

2.2.5 编译

$ cmake --build build --config Debug

注:改步骤由于X11(QNativeInterface::QX11Application)的问题,始终无法通过,换衣X11依赖等方面在Jetson Orin Nano上存在一些问题。

2.2.6 安装

$ ./build/QGroundControl

2.2.7 QT5命令备注

$ git clone git://code.qt.io/qt/qt5.git qt5
$ git checkout 5.15.2
$ perl init-repository
$ mkdir qt5-build
$ ./configure -prefix /path/to/install
$ make
$ make install

3. 可行方案

采用Installing-QGroundControl-on-Ubuntu-ARM64-using-Flatpak) 方案安装可行。

在这里插入图片描述

4. 总结

如果有朋友知道如何解决上述问题,也请告知,谢谢!

相关内容的进一步讨论: How did Flatpak build QGC for Jetson? #1

5. 补充 - 问题清单

5.1 cmake配置命令错误

$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/path/to/install
$ cmake -B build -G Ninja CMAKE_BUILD_TYPE=Debug
CMake Error: The source directory "/home/daniel/QGC/qgroundcontrol/CMAKE_BUILD_TYPE=Debug" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.


$ cmake -B build -G Ninja
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.22.1 or higher is required.  You are running version 3.16.3


-- Configuring incomplete, errors occurred!

5.2 qtconnectivity5-dev库问题

$ sudo apt-get install qtconnectivity5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Bluetooth" with
  any of the following names:

    Qt5BluetoothConfig.cmake
    qt5bluetooth-config.cmake

  Add the installation prefix of "Qt5Bluetooth" to CMAKE_PREFIX_PATH or set
  "Qt5Bluetooth_DIR" to a directory containing one of the above files.  If
  "Qt5Bluetooth" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/daniel/QGC/qgroundcontrol/build/CMakeFiles/CMakeOutput.log".

5.3 libqt5charts5-dev库问题

$ sudo apt-get install libqt5charts5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Charts" with
  any of the following names:

    Qt5ChartsConfig.cmake
    qt5charts-config.cmake

  Add the installation prefix of "Qt5Charts" to CMAKE_PREFIX_PATH or set
  "Qt5Charts_DIR" to a directory containing one of the above files.  If
  "Qt5Charts" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/daniel/QGC/qgroundcontrol/build/CMakeFiles/CMakeOutput.log".

5.4 qtlocation5-dev库问题

$ sudo apt-get install qtlocation5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Location" with
  any of the following names:

    Qt5LocationConfig.cmake
    qt5location-config.cmake

  Add the installation prefix of "Qt5Location" to CMAKE_PREFIX_PATH or set
  "Qt5Location_DIR" to a directory containing one of the above files.  If
  "Qt5Location" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.5 qtpositioning5-dev库问题

$ sudo apt-get install qtpositioning5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5Location/Qt5LocationConfig.cmake:101 (find_package):
  Could not find a package configuration file provided by
  "Qt5PositioningQuick" (requested version 5.12.8) with any of the following
  names:

    Qt5PositioningQuickConfig.cmake
    qt5positioningquick-config.cmake

  Add the installation prefix of "Qt5PositioningQuick" to CMAKE_PREFIX_PATH
  or set "Qt5PositioningQuick_DIR" to a directory containing one of the above
  files.  If "Qt5PositioningQuick" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.6 qtmultimedia5-dev库问题

$ sudo apt-get install qtmultimedia5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Multimedia"
  with any of the following names:

    Qt5MultimediaConfig.cmake
    qt5multimedia-config.cmake

  Add the installation prefix of "Qt5Multimedia" to CMAKE_PREFIX_PATH or set
  "Qt5Multimedia_DIR" to a directory containing one of the above files.  If
  "Qt5Multimedia" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.7 qtquickcontrols2-5-dev库问题

$ sudo apt-get install qtquickcontrols2-5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5QuickControls2"
  with any of the following names:

    Qt5QuickControls2Config.cmake
    qt5quickcontrols2-config.cmake

  Add the installation prefix of "Qt5QuickControls2" to CMAKE_PREFIX_PATH or
  set "Qt5QuickControls2_DIR" to a directory containing one of the above
  files.  If "Qt5QuickControls2" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.8 libqt5svg5-dev库问题

$ sudo apt-get install libqt5svg5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.9 libqt5texttospeech5-dev库问题

$ sudo apt-get install libqt5texttospeech5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5TextToSpeech"
  with any of the following names:

    Qt5TextToSpeechConfig.cmake
    qt5texttospeech-config.cmake

  Add the installation prefix of "Qt5TextToSpeech" to CMAKE_PREFIX_PATH or
  set "Qt5TextToSpeech_DIR" to a directory containing one of the above files.
  If "Qt5TextToSpeech" provides a separate development package or SDK, be
  sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)


-- Configuring incomplete, errors occurred!

5.10 libqt5serialport5-dev库问题

$ sudo apt-get install libqt5serialport5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5SerialPort"
  with any of the following names:

    Qt5SerialPortConfig.cmake
    qt5serialport-config.cmake

  Add the installation prefix of "Qt5SerialPort" to CMAKE_PREFIX_PATH or set
  "Qt5SerialPort_DIR" to a directory containing one of the above files.  If
  "Qt5SerialPort" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:149 (find_package)


-- Configuring incomplete, errors occurred!

5.11 libqt5x11extras5-dev库问题

$ sudo apt-get install libqt5x11extras5-dev
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5X11Extras" with
  any of the following names:

    Qt5X11ExtrasConfig.cmake
    qt5x11extras-config.cmake

  Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
  "Qt5X11Extras_DIR" to a directory containing one of the above files.  If
  "Qt5X11Extras" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  libs/qmlglsink/CMakeLists.txt:26 (find_package)


-- Configuring incomplete, errors occurred!

5.12 cmake版本问题

cmake必须是3.22版本以上才能进行配置、编译。

$ sudo apt-get remove --purge cmake
$ tar -zxvf cmake-3.22.1.tar.gz
$ cd cmake-3.22.1
$ ./bootstrap
$ make
$ sudo make install
$ cmake --version

5.13 修改CMakeList.txt

$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 765e4f450..89a3625d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ include(CMakePrintHelpers)

 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(OpenGL_GL_PREFERENCE "GLVND")
+set(CMAKE_PREFIX_PATH "/path/to/install")
+
+
 if(LINUX)
     set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/AppDir/usr)
 else()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/756570.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

CICD之Git版本管理及基本应用

CICD:持续集成,持续交付--让对应的资料,对应的项目流程更加规范--提高效率 CICD 有很多的工具 GIT就是其中之一 1.版本控制概念与环境搭建 GIT的概念: Git是一款分布式源代码管理工具(版本控制工具) ,一个协同的工具。 Git得其数据更像是一系列微型文件系统的快照。使用Git&am…

D : 合适的顺序

Description 给定 8 个数&#xff0c;如果将它们排成一列&#xff0c;每个数的权值是它与相邻的数之积&#xff0c;求一个排列方式&#xff0c;所有数的权值之和最大&#xff0c;输出该权值和. 例如 13242315 的权值和为 1∗33∗1∗22∗3∗44∗2∗22∗4∗33∗2∗11∗3∗55∗1…

libctk shared library的设计及编码实践记录

一、引言 1.1 <libctk>的由来 1.2 <libctk>的设计理论依据 1.3 <libctk>的设计理念 二、<libctk>的依赖库 三、<libctk>的目录说明 四、<libctk>的功能模块及使用实例说明 4.1 日志模块 4.2 mysql client模块 4.3 ftp client模块 4…

AVL树模拟

1.概念 虽然二叉搜索树可以缩短查找的效率&#xff0c;但如果数据有序或者接近有序时二叉搜索树树将退化为单支树&#xff0c;查找元素相当于在顺序表中搜索元素&#xff0c;效率低下。AVL 树是具有一下性质的二叉搜索树&#xff1a; 1.它的左右子树都是AVL树 2.左右子…

C++特殊类设计单例模式...

文章目录 请设计一个类&#xff0c;不能被拷贝请设计一个类&#xff0c;只能在堆上创建对象请设计一个类&#xff0c;只能在栈上创建对象请设计一个类&#xff0c;不能被继承请设计一个类&#xff0c;只能创建一个对象(单例模式)单例模式&#xff1a;饿汉模式&#xff1a;懒汉模…

steam社区载入失败、加载不出来、打不开?

随着steam夏季大促的到来&#xff0c;最近steam在线用户越来越多了&#xff0c;很多玩家在自己喜欢的游戏社区里看最新的玩法、攻略和玩家的游戏心得。不过有不少玩家表示有时候会打不开游戏社区或是社区加载失败等问题。根据大家遇到的问题&#xff0c;这里总结了几种解决方法…

Mongodb安装与配置

Mongodb的下载 这里下载的是MongoDB 7.0.11版本的 首先进入官网&#xff1a;https://www.mongodb.com/ 点击完上面两步后&#xff0c;加载来到该页面&#xff0c;选择自己的版本、系统&#xff0c;是压缩包(zip)还是安装包(msi)。 下载好之后能&#xff0c;来到安装包哪里&a…

程序员福利-一种高效的治疗颈椎病的方法

我从18年开始出现颈椎病&#xff0c;只要在电脑前低头工作两个小时&#xff0c;颈部就会不舒服&#xff0c;脖子的肌肉酸痛无力、僵硬麻木&#xff0c;影响血液循环系统&#xff0c;大脑供血不足&#xff0c;导致心烦意乱&#xff0c;注意力无法集中&#xff0c;还会影响消化系…

在HBuilder X中ElementUI框架的搭建

前言 本文将详解基于Vue-cli脚手架搭建的项目如何使用ElementUI &#xff1f;所以在学习本篇文章内容之前建议先学习vue-cli脚手架项目的搭建和学习 使用HbuilderX快速搭建vue-cil项目https://mp.csdn.net/mp_blog/creation/editor/140043776 ElementUI框架: Element&#xff…

【C++】类、静态、枚举、重载、多态、继承、重写、虚函数

五、类 面向对象编程是一个巨大的编程范式。C中的类class就是基于对象的程序设计。 我们可以用类来定义一个新的类型&#xff0c;这些新类型就可以像内置类型一样使用。 内置类型颗粒度太太小&#xff0c;现实需求又非常复杂&#xff0c;这就需要我们把内置类型适度的进行拼搭…

微软推出集成GPT-4o的文本转语音虚拟数字人服务

微软近日宣布&#xff0c;其全新的文本转语音虚拟数字人服务正式上线&#xff0c;并集成了GPT-4o技术。这一服务为用户提供了创建实时互动数字人的可能。通过先进的自然语言处理技术&#xff0c;数字人能够将文本转化为自然流畅的语音&#xff0c;并配以生动的虚拟形象&#xf…

C++【函数重载】【附有C语言为何不能实现函数重载的讲解】

P. S.&#xff1a;以下代码均在VS2019环境下测试&#xff0c;不代表所有编译器均可通过。 P. S.&#xff1a;测试代码均未展示头文件stdio.h的声明&#xff0c;使用时请自行添加。 博主主页&#xff1a;LiUEEEEE                        …

【硬件视界2】什么是CPU和GPU?有什么区别?

名人说&#xff1a;莫听穿林打叶声&#xff0c;何妨吟啸且徐行。—— 苏轼《定风波莫听穿林打叶声》 本篇笔记整理&#xff1a;Code_流苏(CSDN)&#xff08;一个喜欢古诗词和编程的Coder&#x1f60a;&#xff09; 目录 1、CPU (中央处理器)①主要作用②特点 2、 GPU (图形处理…

支持纳管达梦数据库,命令存储支持对接Elasticsearch 8,JumpServer堡垒机v3.10.11 LTS版本发布

2024年6月24日&#xff0c;JumpServer开源堡垒机正式发布v3.10.11 LTS版本。JumpServer开源项目组将对v3.10 LTS版本提供长期的支持和优化&#xff0c;并定期迭代发布小版本。欢迎广大社区用户升级至v3.10 LTS最新版本&#xff0c;以获得更佳的使用体验。 在JumpServer v3.10.…

50-2 内网信息收集 - 内网工作环境(域相关知识)

一、工作组 工作组(Work Group)是局域网中最基本的资源管理模式,适用于小规模网络环境。 工作组的定义: 工作组是将不同功能或部门的计算机分组管理的方式。它提供了层次化的网络资源管理,使得组织内的计算机可以按照功能或部门分类。每个工作组有一个自定义的主机名称,…

短视频矩阵系统搭建APP源码开发

前言 短视频矩阵系统不仅有助于提升品牌影响力和营销效率&#xff0c;还能帮助企业更精准地触达目标受众&#xff0c;增强用户互动&#xff0c;并利用数据分析来持续优化营销策略。 一、短视频矩阵系统是什么&#xff1f; 短视频矩阵系统是一种通过多个短视频平台进行内容创作…

使用supportFragmentManager管理多个fragment切换

android studio创建的项目就没有一个简单点的框架&#xff0c;生成的代码都是繁琐而复杂&#xff0c;并且不实用。 国内的页面一般都是TAB页面的比较多&#xff0c;老外更喜欢侧边菜单。 如果我们使用一个activity来创建程序&#xff0c;来用占位符管理多个fragment切换&…

广东省钟表行业协会第十二届会员大会暨2024年钟表行业发展交流会

6月25日广东省钟表行业协会第十二届会员大会暨2024年钟表行业发展交流会在广州万富希尔顿酒店隆重召开。大会选举沙胜昔为广东省钟表行业协会第十二届理事会会长。 领导发言 新任会长 沙胜昔 首席荣誉会长 吴伟阳 新老会长交接仪式 本次大会&#xff0c;全国钟表大伽齐参与…

特斯拉下一代自动驾驶芯片的深度预测

引言 特斯拉一直以来都在自动驾驶技术上不断突破&#xff0c;随着AI大模型技术的爆发&#xff0c;其下一代自动驾驶芯片&#xff08;HW5.0&#xff09;也备受瞩目。本文将深入分析和预测特斯拉下一代自动驾驶芯片AI5的技术特点及其对行业的影响。 深入技术分析 现有自动驾驶…

Java实现ATM系统

效果: 目录结构 Account 账户类 package com.mytest;public class Account {private String cardId;private String userName;private char sex;private String password;private double balance;private double limit; //限额public String getCardId() {return cardId;}publ…