mmeminb
December 21, 2020, 5:04am
1
I am trying to cross compile Qt for Jetson Nano. I configured the build with these parameters:
../qt-everywhere-src-5.15.1/configure -opengl es2 -device linux-jetson-nano -device-option CROSS_COMPILE=/opt/qt5jetson/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -sysroot /opt/qt5jetson/sysroot -prefix /usr/local/qt5jetson -opensource -confirm-license -skip qtscript -skip wayland -skip qtwebengine -force-debug-info -skip qtdatavis3d -nomake examples -make libs -pkg-config -v
when I tried to run make command I got error like below. I can’t find solution for this problem.
final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:1227: recipe for target '../../lib/libQt5Core.so.5.15.1' failed
make[3]: *** [../../lib/libQt5Core.so.5.15.1] Error 1
make[3]: Leaving directory '/opt/qt5jetson/qt5build/qtbase/src/corelib'
Makefile:224: recipe for target 'sub-corelib-make_first' failed
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: Leaving directory '/opt/qt5jetson/qt5build/qtbase/src'
Makefile:50: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/opt/qt5jetson/qt5build/qtbase'
Makefile:83: recipe for target 'module-qtbase-make_first' failed
make: *** [module-qtbase-make_first] Error 2"
How can I solve for this problem?
I am not a QT guy, and have not tried this compile. However, you should know that if ld
failed, then your build was trying to link against a library somewhere, and the library was not found. Perhaps there is some system requirement library which needs to be added first. Or perhaps the library exists, but it isn’t in your linker path. Perhaps something else needed to be built first to create the library. I don’t know which library is missing, the message only says it was building libQt5Core.so.5.15.1
without saying what link was being attempted. Perhaps there is some log content prior to this naming the file/library which is missing?
DaneLLL
December 28, 2020, 5:30am
4
Hi,
You may refer to the posts:
Hi sqwer6545,
Yes, that is the linux arch issue because jetson Nano is using arm64.
I tried to build qt5 last year on my TX2. The steps should be similar. Please note that this is not cross compile case.
For cross compile, I think you could refer to qt official website.
https://doc.qt.io/QtForDeviceCreation/qtee-preparing-hardware-jetsontx1.html
Download the backend from public source
wget http://master.qt.io/archive/qt/5.9/5.9.2/single/qt-everywhere-opensource-src-5.9.2.tar.xz
#Some user…
ok, so I tried:
sudo apt-get build-dep qt5-default
sudo apt install libcanberra-gtk-module
sudo apt install qt5-style-plugins
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile
Then the problem solved… maybe this post can help: