Building QGroundControl Failed on JetsonNX.
-
wrote on 9 Nov 2022, 16:43 last edited by Muhammad Salem 11 Sept 2022, 16:52
Greetings,
I am using Jetson NX board and i want to build QGroundControl on it.
I used the following command to build Qt-5.15.2.wget http://master.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz tar -xpf qt-everywhere-src-5.15.2.tar.xz cd qt-everywhere-src-5.15.2/ ./configure -xcb -skip qtwebengine make -j4 sudo make install
After building Qt.5.15.2 i used qmake to configure the build as stated in QGroundControl docs.
After a while i get the error shown below while compiling.
cp: canot stat '/usr/local/Qt-5.15.2/lib/libicui18n.so*': No such file or directory Makefile:2868 recipe for target 'staging/QGroundControl' failed make: *** [staging/QGroundControl] Error 1
How can i solve this problem ?
-
wrote on 14 Dec 2022, 08:13 last edited by
@SGaist
I installed Qt using the following commandswget http://master.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz tar -xpf qt-everywhere-src-5.15.2.tar.xz cd qt-everywhere-src-5.15.2/ ./configure -xcb -skip qtwebengine make -j4 sudo make install
the problem is no more, apparently you need to build Qt with ssl support . i just installed libssl and built Qt again. Everything works fine now.
Thank you.
-
Hi and welcome to devnet,
Before diving deeper into this, which distribution are you using ?
Does it provide Qt ? If so, why not build QGroundControl with it ? -
wrote on 11 Nov 2022, 12:30 last edited by Muhammad Salem 11 Nov 2022, 14:44
Hello @SGaist
in the source and builds section related to QGroundControl, it is recommended to install Qt-5.15.2. I tried the online installer on Jetson NX it didn't work, maybe there is a problem with ARM-arch. So, I tried to build Qt-5.15.2. using the commands in the post.
-
Hence my question about the distribution.
It may already provide Qt 5.15.The online installer is built for the x86_64 platform thus you cannot run it on ARM.
-
wrote on 11 Nov 2022, 22:25 last edited by Muhammad Salem 11 Nov 2022, 22:25
@SGaist
I think that neither Qt nor an ARM build of QGroundControl are provided (i didn't find any). -
That was not my question.
Which distribution are you using on your Jetson ?
-
wrote on 12 Nov 2022, 23:13 last edited by Muhammad Salem 11 Dec 2022, 23:18
@SGaist
My jetson has jetpack 6.1 on it. the Qt's version provided by the jetpack is a version earlier than 5.15.2 (i don't recall the exact version) and I didn't find qmake on my jetson.So, I tried to build Qt 5.15.2.
-
You have to install qmake using the package manager if you want to use the Qt version from your distribution. You will also need to install the dev packages of the Qt modules you will use.
That said, to build Qt, you should install the build dependencies of the modules you want to build. This can be done using apt.
-
wrote on 16 Nov 2022, 13:41 last edited by Muhammad Salem
@SGaist
I tried to build QGroundControl using Qt-5.9.1 which comes with the Jetpack. QGroundControl doesn't allow any Qt version less than 5.10 to build it.I installed the required packages form the package manager and successfully built QGroundControl.
your help is appreciated.
-
Isn't there a more recent version of JetPack ?
One thing to do is to install the builddep of the modules you want to build and then start from scratch.
-
wrote on 13 Dec 2022, 16:06 last edited by Muhammad Salem
@SGaist
the latest version of Jetpack is 5.0.2/ubuntu20. I currently use Jetpack 4.6.3/Ubuntu18 because remote desktop connection didn't work well for me when i tried the latest version.I tried to build QGroundControl form source again on a fresh jetpack 4.6.3 installation with Qt-5.15.2 and i stumbled upon a new errors, i think there is some problem with the private headers.
I got this error when i tried to use make in the build folder in QGroundControl
compiling /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp: In member function ‘void QGCCacheWorker::_lookupReady(QHostInfo)’: /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1185:27: error: expected type-specifier before ‘QTcpSocket’ auto socket = new QTcpSocket(); ^~~~~~~~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1190:26: error: ‘QTcpSocket’ has not been declared connect(socket, &QTcpSocket::connected, this, [this, socket] { ^~~~~~~~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp: In lambda function: /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1193:13: error: ‘socket’ is not captured socket->deleteLater(); ^~~~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1190:68: note: the lambda has no capture-default connect(socket, &QTcpSocket::connected, this, [this, socket] { ^ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1185:14: note: ‘<typeprefixerror>socket’ declared here auto socket = new QTcpSocket(); ^~~~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp: In lambda function: /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1198:13: error: ‘socket’ is not captured socket->deleteLater(); ^~~~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1195:77: note: the lambda has no capture-default connect(socket, &QAbstractSocket::errorOccurred, this, [this, socket](QAbstractSocket::SocketError error) { ^ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/QGCTileCacheWorker.cpp:1185:14: note: ‘<typeprefixerror>socket’ declared here auto socket = new QTcpSocket();
i added #include <QTcpSocket> to QGCTileCacheWorker.cpp then i got this new error
compiling /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/MapProvider.cpp /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/MapProvider.cpp: In constructor ‘MapProvider::MapProvider(const QString&, const QString&, quint32, QGeoMapType::MapStyle, QObject*)’: /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/MapProvider.cpp:23:40: error: incomplete type ‘QLocale’ used in nested name specifier const QStringList langs = QLocale::system().uiLanguages();
i added #include <QLocale> to MapProvider.cpp then i got this new error
compiling /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/GoogleMapProvider.cpp /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/GoogleMapProvider.cpp: In member function ‘void GoogleMapProvider::_tryCorrectGoogleVersions(QNetworkAccessManager*)’: /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/GoogleMapProvider.cpp:108:27: error: variable ‘QSslConfiguration conf’ has initializer but incomplete type QSslConfiguration conf = qheader.sslConfiguration(); ^~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/GoogleMapProvider.cpp:108:42: error: ‘class QNetworkRequest’ has no member named ‘sslConfiguration’; did you mean ‘http2Configuration’? QSslConfiguration conf = qheader.sslConfiguration(); ^~~~~~~~~~~~~~~~ http2Configuration /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/GoogleMapProvider.cpp:109:32: error: ‘QSslSocket’ has not been declared conf.setPeerVerifyMode(QSslSocket::VerifyNone); ^~~~~~~~~~ /home/vortex/Documents/qgroundcontrol/src/QtLocationPlugin/GoogleMapProvider.cpp:110:17: error: ‘class QNetworkRequest’ has no member named ‘setSslConfiguration’; did you mean ‘http2Configuration’? qheader.setSslConfiguration(conf); ^~~~~~~~~~~~~~~~~~~ http2Configuration
i have no idea what to do here, i tried adding #include <QSslConfiguration> , #include <QSslSocket> and #include <QNetworkRequest> to GoogleMapProvider.cpp but adding those includes didn't do anything.
-
How did you install Qt ?
Which packages exactly ?I tested the build on macOS with 5.15.2 as well and it went fine.
-
wrote on 14 Dec 2022, 08:13 last edited by
@SGaist
I installed Qt using the following commandswget http://master.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz tar -xpf qt-everywhere-src-5.15.2.tar.xz cd qt-everywhere-src-5.15.2/ ./configure -xcb -skip qtwebengine make -j4 sudo make install
the problem is no more, apparently you need to build Qt with ssl support . i just installed libssl and built Qt again. Everything works fine now.
Thank you.