qt 5.10.1 cross compile for raspberry pi 3 in debian stretch
-
hi @sierdzio once again,
I have tried the file from the link you have given but this time I got the error as below.
g++: error trying to exec 'cc1plus': execvp: No such file or directory Makefile:242: recipe for target 'main.o' failed make: *** [main.o] Error 1
This time I have tried for both 5.10.0 and 5.10.1 still on debian stretch installed on virtual machine.
Thanks, -
This one I've not met before.
-
Hi,
Might be a silly question but do you have g++ installed ?
-
Hi @SGaist,
which g++ are you talking about? You mean this
apt-get install g++
Then yes. Interestingly something happened, I was trying for 5.9.4 and it didint even configure with ./config
Now it keeps giving me the errorg++: error trying to exec 'cc1plus': execvp: No such file or directory Makefile:242: recipe for target 'main.o' failed make: *** [main.o] Error 1
Right before that I was getting pcre_compile.o failed kind of error.
This is really getting messy. Not sure what to do at this point though.
-
I’d start by verifying that you can use g++ for a simple hello world application.
I’d also double check the installation of the development tools.
-
Hi again,
After I am able to compile, I was trying to make an example code which is a simple push button changes the text and I have gotten the error below.
By the way instead of using linaro gcc and g++, I used the one that I have installed with the commandapt-get install gcc-arm-linux-gnueabihf apt-get install g++-arm-linux-gnueabihf
I am not sure what the problem is though. Do you think that at some point my compilers and debuggers got mixed up.? Thats my best guess though. I am open for any ideas.
/usr/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/root/raspi/sysroot -Wl,-rpath,/usr/local/qt5pi/lib -Wl,-rpath-link,/root/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/root/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/root/raspi/sysroot/lib/arm-linux-gnueabihf -o testRPI3 main.o mainwindow.o moc_mainwindow.o -L=/opt/vc/lib -L/root/raspi/qt5pi/lib -lQt5Widgets -lQt5Gui -lQt5Core -L/root/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lGLESv2 -lpthread main.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:245: recipe for target 'testRPI3' failed make: *** [testRPI3] Error 1 05:40:53: The process "/usr/bin/make" exited with code 2. Error while building/deploying project testRPI3 (kit: Raspberry Pi 3 ) When executing step "Make" 05:40:53: Elapsed time: 00:00.
Kind regards,
-
Hi again,
After I am able to compile, I was trying to make an example code which is a simple push button changes the text and I have gotten the error below.
By the way instead of using linaro gcc and g++, I used the one that I have installed with the commandapt-get install gcc-arm-linux-gnueabihf apt-get install g++-arm-linux-gnueabihf
I am not sure what the problem is though. Do you think that at some point my compilers and debuggers got mixed up.? Thats my best guess though. I am open for any ideas.
/usr/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/root/raspi/sysroot -Wl,-rpath,/usr/local/qt5pi/lib -Wl,-rpath-link,/root/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/root/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/root/raspi/sysroot/lib/arm-linux-gnueabihf -o testRPI3 main.o mainwindow.o moc_mainwindow.o -L=/opt/vc/lib -L/root/raspi/qt5pi/lib -lQt5Widgets -lQt5Gui -lQt5Core -L/root/raspi/sysroot/usr/lib/arm-linux-gnueabihf -lGLESv2 -lpthread main.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:245: recipe for target 'testRPI3' failed make: *** [testRPI3] Error 1 05:40:53: The process "/usr/bin/make" exited with code 2. Error while building/deploying project testRPI3 (kit: Raspberry Pi 3 ) When executing step "Make" 05:40:53: Elapsed time: 00:00.
Kind regards,
-
@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 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,
@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