Unsolved 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,
-
@sdttn Looks like you compiled all the *.o files with a different compiler. You should clean up and rebuild.
-
@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.
-
@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