qt 5.10.1 cross compile for raspberry pi 3 in debian stretch
-
@sdttn said in qt 5.10.1 cross compile for raspberry pi 3 in debian stretch:
apt-get install gcc-arm-linux-gnueabihf
apt-get install g++-arm-linux-gnueabihfCan I use these three including gdb as well. Are these correct tools? or Should I use the linaro one...
apt-get install gcc-arm-linux-gnueabihf apt-get install g++-arm-linux-gnueabihf apt-get install gdb-multiarch
@sdttn You should not mix binaries built with different compilers. Either you build everything with gcc-arm-linux-gnueabihf or you build everything with the Linaro toolchain. That's why I suggested to cleanup and rebuild: to get rid of all *.o files and build everything with same compiler.
-
Hi everyone,
I have been trying to qt cross compile (qt 5.10.1) for raspberry pi 3 in debian stretch. I am strictly following the links here and here. During (after make command) compilation I am getting the error below.
In file included from ../../include/QtCore/qglobal.h:1:0, from ../corelib/global/qt_pch.h:56: ../../include/QtCore/../../src/corelib/global/qglobal.h:762:47: error: static assertion failed: Required feature library for file ../../include/QtCore/../../src/corelib/plugin/qlibrary.h not available. #define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message) ^ ../../include/QtCore/../../src/corelib/global/qglobal.h:86:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’ #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.") ^ ../../include/QtCore/../../src/corelib/plugin/qlibrary.h:45:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’ QT_REQUIRE_CONFIG(library); ^ Makefile:27975: recipe for target '.obj/qsslsocket_opensslpre11.o' failed make[2]: *** [.obj/qsslsocket_opensslpre11.o] Error 1 make[2]: Leaving directory '/root/raspi/qtbase/src/network' Makefile:273: recipe for target 'sub-network-make_first' failed make[1]: *** [sub-network-make_first] Error 2 make[1]: Leaving directory '/root/raspi/qtbase/src' Makefile:48: recipe for target 'sub-src-make_first' failed make: *** [sub-src-make_first] Error 2
My best guess was that there is something wrong about the libraries of Qt, but I am not sure of course.
I am looking forward to hearing your solution ideas to this problem.Thanks in advance.
sdttn,
wrote on 10 Jan 2020, 13:23 last edited by lirik90 1 Oct 2020, 14:35@sdttn Hi! I had the same issue. And the problem was that Qt couldn't find libdl.so To fix this I put libdl.so in /sysroot/usr/lib.
To find it i add -feature-library flag to ./configure. That command what i use:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=armv8-rpi3-linux-gnueabihf- -sysroot /mnt/second/proj/dai/env/work/sysroot -opensource -confirm-license -make libs -nomake examples -nomake tests -prefix /usr/local/qt5pi -extprefix /mnt/second/proj/dai/env/work/qt5pi -hostprefix /mnt/second/proj/dai/env/work/qt5 -v -no-use-gold-linker -sql-mysql -mysql_config /mnt/second/proj/dai/env/work/../mysql_config -ssl -openssl-runtime -feature-library