QGroundControl@Jetson Orin Nano - Build from Source
- 1. 源由
- 2. 步骤
- 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板子上编译不成功!
按照以下文档中的步骤和方法进行编译,最后卡在:
/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 编译
$