Qt 5.7 (or later) on TX1 (local or cross)???

Hi everyone,

I’m trying to get Qt 5.7 “work” for TX1.
V5.7 is needed for Controls2.
I don’t care compiling directly on the TX1 or on a dedicated Ubuntu host.

Of course I tried directly qt.io but there is not aarch64 version for the installer.

On Jetsonhacks there is a very simple apt-get way inherited from the TK1 … but it will only install Qt 5.5 and limit QtCreator to 3.5.1 version (which is not that bad). Plus there is no compatible GCC compiler.

I then tried to follow Qt on the NVIDIA Jetson TX1 - Device Creation Style
but there seems to be some part I don’t get since I cannot complete the ./configure with errors

I also tried to install Qt 5.7 on the hots, add the GCC compiler for the TX1 (on the DL pages here), and then there is no qmake compatible.

Any hint? Any success on your side?

Hi,

I’m also very interested by your concern.

Have you considered building Qt with Yocto ?

What error did you get with ./configure ?

Karim

From my experience Yocto + JetPack (for further updates) is a painful setup.
The ./configure (when following the Qt.io blog) cannot create some folders requested by the gg+ compiler.
So make is aborted later on, but will have create a mess of folders, which will then make Qt 5.7 (on the host) totally lost.
Same error if trying to ./configure on the TX1 itself … but here in all cases Qt 5.7 cannot run.

The user Chenghaibohave cross compiled the 5.7.1 successfully, please refer to below thread:
[url]https://devtalk.nvidia.com/default/topic/980928/jetson-tx1/has-anyone-ever-gotten-cross-compiling-with-qt5-x-to-actually-work-/post/5046391/#5046391[/url]

Thanks

Instructions left by Chenghaibo are, so far, as foggy as the ones from Laszlo.
People are referring to “building Qt from source code”, but without precise instructions, this is also a dead-end.
Many of us are coding guys, not Linux gurus …

Hi everyone!

Thanks to some good links provided by Ritesh I finally got something working on the TX1.
Qt 5.8.1 with some Qt Creator (not the latest version of Creator).

I went the “build Qt from source code” way … but this was certainly no easy way.
Took me something like 10 tries … and I did not write down everything I made … so dumb!

In order to help, I need to go back to the beginning (fresh install) and ensure a reproductible and clean process.
Please be patient, fresh install + Qt compilation takes some hours!

Also trying to set-up Cross Compilation on Ubuntu. No luck so far, but not far from luck.
I would say I’m closer than when following Cheng or Laszlo posts.
Absolutely not to criticize their posts (full respect), rather to assess my Linux talents are really on the low side.

Will try to keep you posted.

Hi there!

Just to keep you posted:

  • I was not happy with the Qt 5.8.1 + older QtCreator set-up: some things were not working the way they should, apparently because of the older version of QtCreator I used
  • I’m just going back to square 1 (fresh install of the TX1)

For those who’d like to know what I did:

  • to get Qt 5.8.1 I carefully followed the Qt wiki guide (Building Qt 5 from Git - Qt Wiki)
    thanks to user RiteshPanchal for this link
  • I can’t tell you why, but in many cases the make did not work, but at the end of the day it did (I’ve been sudo apt-get installing many things in parallel, this could be the reason)
  • the similar process for Qt Creator (Building Qt Creator from Git - Qt Wiki) did not work (no success with make, missing things and so forth)
  • I installed Qt Creator simply by sudo apt-get install but ended up with an older version

For those who would like to get Qt / Qt Creator v5.5, then you can simply sudo apt-get install but be aware these are older versions and you’ll still have to install additional modules. “Looky here” (full respect): Install Qt Creator on NVIDIA Jetson TX1 - JetsonHacks
For beginners in Qt, the post by kangalow is a must-read to understand how to set-up compilation on Qt + TX1.

As soon as I’ll get something better, I’ll let you know.

I’m posting this to help, as others helped me to get my problems solved.
If you’d like to re-use and help yourself, please do not forget to give credits to the links below.
These are the original solutions and people who have brought them who should be thanked.

Ok, so now I have Qt5.8.1 and QtCreator4.2 running on my TX1.
This is what I had to do to get this done. The process is quite heavy and not for beginners.

If you don’t need the latest version of Qt / QtCreator, simply follow the very simple instructions here: Install Qt Creator on NVIDIA Jetson TX1 - JetsonHacks
You will then get Qt5.5 and QtCreator3.5 in just a bunch of minutes, and these versions are already great!

So now for the latest versions.
First, follow these instructions to install Qt: Building Qt 5 from Git - Qt Wiki
Be very careful on the needed libs to be installed first.
Lots of sudo apt-get
Before building Qt, select the last version through checkout
I encourage to keep the ./configure options exactly as presented, and not add the QtWeb libs into the mix.
As stated on the wiki, these libs are sources of compilation crashes.

Just before the make you should also replace libGL.so in /usr/lib by a link to /usr/lib/aarch64-linux-gnu/tegra/libGL.so
The non-tegra lib will create a problem during one of the forthcoming make

So now you should have Qt5.8.1 compiled.
You could install an older version of QtCreator by a simple sudo apt-get
Look at Install Qt Creator on NVIDIA Jetson TX1 - JetsonHacks to get the precise instructions.
However, you would then have the latest version of Qt, but not QtCreator. Which is not great.

So let’s move to QtCreator: Building Qt Creator from Git - Qt Wiki
Here are the real problems.
QtCreator has been developed under Qt. So you need to qmake QtCreator and then make it.
But you can’t use any version of qmake so be certain you are using your newly installed Qt5.8.1
Use qtchooser to do this.
It’s not finished, and here is the hardest part.
You need to go into QtCreator source files, to Botan
The botan.cpp and botan.h cannot work under an ARM64 architecture.
You have to mod these files following https://codereview.qt-project.org/79828
In addition, there is a link to cpuid.h in botan.cpp … but cpuid.h does not exist under ARM64. So you should mod the code to restrict link to X86 architectures.
Now you can qmake then make and make install
If you’re there, then you know how to set-up QtCreator to use the relevant qmake

Keep me posted about your success.
I have no time right now to post more user-friendly or step-by-step instructions.
Qt5.9 should simplify the whole thing with direct cross-compilation for the TX1.

Happy coding everyone!

Hi,

We have interest of integrating Qt to latest Tegra BSP, but not sure if this request is still needed now.

Can anyone share some comment and suggestion? Thanks!

I am very interested in NVIDIA including QT in next BSP release. I am using a TX1 with touch display running 16.04 and I want to use this as a Ground Control UAV station and build qgroundcontrol with QT 5.11 sources but I am having some build issues and including QT in BSP would help immensely :)

Dear WayneWWW,
we would highly appreciate if you integrate Qt to last Tegra BSP.
By the way do you have any intent to update Argus API?

I have now finally successfully built QT 5.11.0-1 and Qt creator on both TX1 and TK1 and built qgroundcontrol for a test and all OpenGL functions work when video streaming from a drone (jetson redtail px4) to my tx1 connected to hdmi/usb (iiyama 22 inch) touchscreen display running qgroundcontrol. I am loving this setup. I will post a full how-to on building qt 5.11 and qgroundcontrol from source with OpenGL and video streaming support :)

By chance, did you ever post how to build qt for tx/tk?

Did you read what I posted above?