Crosscompiling qt5 on TX2

Hello,

I would like to crosscompile qt5 on TX2 but I can’t figure out how to do it. This is my first time working on a jetson and so I would appreciate it if you could provide me with as much detail as possible.
I have done the following:
I first tried the usual

sudo apt-get install qt5-default

and got the following:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
qt5-default : Depends: qtbase5-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

then I did :

sudo apt-get install qtbase5-dev

I got :

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
qtbase5-dev : Depends: libgles2-mesa-dev but it is not going to be installed or
libgles2-dev but it is not installable
Depends: libqt5core5a (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5dbus5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5gui5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5network5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5printsupport5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5sql5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5test5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5widgets5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5xml5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Recommends: libqt5opengl5-dev (= 5.5.1+dfsg-16ubuntu7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I kept going down the rabbit hole and I kept seeing something similar to this:
Reading package lists… Done
Building dependency tree
Reading state information… Done
libqt5opengl5 is already the newest version (5.5.1+dfsg-16ubuntu7.1).
libqt5opengl5 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

for most of the ones I tried

then I saw the post :

https://devtalk.nvidia.com/default/topic/1031227/jetson-tx2/qt5-on-r28-2/post/5246271/#5246271

I followed it and the output of

sudo apt-get install qtbase5-dev qtbase5-dev-tools

is :
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
qtbase5-dev : Depends: libgles2-mesa-dev but it is not going to be installed or
libgles2-dev but it is not installable
Depends: libqt5core5a (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5dbus5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5gui5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5network5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5printsupport5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5sql5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5test5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5widgets5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Depends: libqt5xml5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
Recommends: libqt5opengl5-dev (= 5.5.1+dfsg-16ubuntu7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

then I entered:

sha1sum -c /etc/nv_tegra_release

got :
/usr/lib/aarch64-linux-gnu/tegra/libnvosd.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_image.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmedia.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libglx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libscf.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvexif.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_gpu.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtx_helper.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstorehdfx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_parser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_contentpipe.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvos.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtnr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvimp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnet.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvavp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_video.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstoredefog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvodm_imager.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtvmr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-egl-wayland.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdc.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libtegrav4l2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvapputil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcameratools.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcam_imageencoder.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstream_camconsumer.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomxilclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvwinsys.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus_socketclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstreamproducer.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvll.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus_socketserver.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_graphics.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcolorutil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_2d_v2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtestresults.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamerautils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamlog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvparser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_vic.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvidconv.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvideocodec.so: OK
/usr/lib/xorg/modules/drivers/nvidia_drv.so: OK
/usr/lib/xorg/modules/extensions/libglx.so: OK

I modified the

/etc/apt/sources.list
as well

I also tried compiling qt5 from source, I got no errors but when I opened the application let’s just say it was a page of empty buttons on a white page :D

I googled alot but no lock.

can anyone help me get this working?

Thank you in advance

Hi,
qt is 3rdparty SW frameworks and we don’t have much experience about it. Other users may share their expertise.

For L4T R32.1 (via SDK Manager 4.2) on a TX2 which has previously been through “sudo apt-update” and “sudo apt-get upgrade” this works (any “autoremove” of “no longer required” packages was also performed prior to this install):

# <i><b>apt-get install qt5-default</b></i>
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libegl1-mesa-dev libgles2-mesa-dev libqt5concurrent5 libqt5opengl5 libqt5opengl5-dev libqt5printsupport5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libwayland-bin libwayland-dev
  qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools
Suggested packages:
  libwayland-doc default-libmysqlclient-dev firebird-dev libpq-dev libsqlite3-dev unixodbc-dev
The following NEW packages will be installed:
  libegl1-mesa-dev libgles2-mesa-dev libqt5concurrent5 libqt5opengl5 libqt5opengl5-dev libqt5printsupport5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libwayland-bin libwayland-dev
  qt5-default qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools
0 upgraded, 16 newly installed, 0 to remove and 3 not upgraded.
Need to get 2,796 kB/3,259 kB of archives.
After this operation, 24.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libwayland-bin arm64 1.16.0-1ubuntu1.1~18.04.1 [18.1 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libwayland-dev arm64 1.16.0-1ubuntu1.1~18.04.1 [62.8 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libegl1-mesa-dev arm64 18.2.8-0ubuntu0~18.04.2 [17.8 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libgles2-mesa-dev arm64 18.2.8-0ubuntu0~18.04.2 [41.8 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libqt5concurrent5 arm64 5.9.5+dfsg-0ubuntu2 [29.5 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 qt5-qmake-bin arm64 5.9.5+dfsg-0ubuntu2 [848 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 qt5-qmake arm64 5.9.5+dfsg-0ubuntu2 [180 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 qtbase5-dev-tools arm64 5.9.5+dfsg-0ubuntu2 [610 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 qtbase5-dev arm64 5.9.5+dfsg-0ubuntu2 [894 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libqt5opengl5-dev arm64 5.9.5+dfsg-0ubuntu2 [36.0 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libqt5sql5-sqlite arm64 5.9.5+dfsg-0ubuntu2 [37.9 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe arm64 qt5-default arm64 5.9.5+dfsg-0ubuntu2 [20.9 kB]
Fetched 2,796 kB in 2s (1,729 kB/s)
Selecting previously unselected package libwayland-bin.
(Reading database ... 120615 files and directories currently installed.)
Preparing to unpack .../00-libwayland-bin_1.16.0-1ubuntu1.1~18.04.1_arm64.deb ...
Unpacking libwayland-bin (1.16.0-1ubuntu1.1~18.04.1) ...
Selecting previously unselected package libwayland-dev:arm64.
Preparing to unpack .../01-libwayland-dev_1.16.0-1ubuntu1.1~18.04.1_arm64.deb ...
Unpacking libwayland-dev:arm64 (1.16.0-1ubuntu1.1~18.04.1) ...
Selecting previously unselected package libegl1-mesa-dev:arm64.
Preparing to unpack .../02-libegl1-mesa-dev_18.2.8-0ubuntu0~18.04.2_arm64.deb ...
Unpacking libegl1-mesa-dev:arm64 (18.2.8-0ubuntu0~18.04.2) ...
Selecting previously unselected package libgles2-mesa-dev:arm64.
Preparing to unpack .../03-libgles2-mesa-dev_18.2.8-0ubuntu0~18.04.2_arm64.deb ...
Unpacking libgles2-mesa-dev:arm64 (18.2.8-0ubuntu0~18.04.2) ...
Selecting previously unselected package libqt5concurrent5:arm64.
Preparing to unpack .../04-libqt5concurrent5_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5concurrent5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package libqt5opengl5:arm64.
Preparing to unpack .../05-libqt5opengl5_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5opengl5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package libqt5printsupport5:arm64.
Preparing to unpack .../06-libqt5printsupport5_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5printsupport5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package libqt5sql5:arm64.
Preparing to unpack .../07-libqt5sql5_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5sql5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package libqt5test5:arm64.
Preparing to unpack .../08-libqt5test5_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5test5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package qt5-qmake-bin.
Preparing to unpack .../09-qt5-qmake-bin_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking qt5-qmake-bin (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package qt5-qmake:arm64.
Preparing to unpack .../10-qt5-qmake_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking qt5-qmake:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package qtbase5-dev-tools.
Preparing to unpack .../11-qtbase5-dev-tools_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking qtbase5-dev-tools (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package qtbase5-dev:arm64.
Preparing to unpack .../12-qtbase5-dev_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking qtbase5-dev:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package libqt5opengl5-dev:arm64.
Preparing to unpack .../13-libqt5opengl5-dev_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5opengl5-dev:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package libqt5sql5-sqlite:arm64.
Preparing to unpack .../14-libqt5sql5-sqlite_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking libqt5sql5-sqlite:arm64 (5.9.5+dfsg-0ubuntu2) ...
Selecting previously unselected package qt5-default:arm64.
Preparing to unpack .../15-qt5-default_5.9.5+dfsg-0ubuntu2_arm64.deb ...
Unpacking qt5-default:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up libwayland-bin (1.16.0-1ubuntu1.1~18.04.1) ...
Setting up qtbase5-dev-tools (5.9.5+dfsg-0ubuntu2) ...
Setting up qt5-qmake-bin (5.9.5+dfsg-0ubuntu2) ...
Setting up libqt5test5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up libqt5printsupport5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up libqt5opengl5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up qt5-qmake:arm64 (5.9.5+dfsg-0ubuntu2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libqt5sql5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libwayland-dev:arm64 (1.16.0-1ubuntu1.1~18.04.1) ...
Setting up libqt5concurrent5:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up libqt5sql5-sqlite:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up libegl1-mesa-dev:arm64 (18.2.8-0ubuntu0~18.04.2) ...
Setting up libgles2-mesa-dev:arm64 (18.2.8-0ubuntu0~18.04.2) ...
Setting up qtbase5-dev:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up libqt5opengl5-dev:arm64 (5.9.5+dfsg-0ubuntu2) ...
Setting up qt5-default:arm64 (5.9.5+dfsg-0ubuntu2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...