Cross Compile QT 5.11 for Raspberry pi 3
-
My cross compiled QT version is old and I deiced to compile new one
I want to use this link
And this link says: The tested Configurations is Qt 5.10.1 with Raspbian stretch in the Raspberry 3 B model
Can I compile a newer QT like 5.11 without error?
And in one part of it,said:Missing EGLFS Fix On recent versions of Qt (e.g. 5.10.1), the qmake.conf file for linux-rasp-pi3-g++ doesn't work, however, linux-rasp-pi-g++ does. Create a new qmake.conf based on linux-rasp-pi-g++ with the build flags from the Pi 3 spec copied over.
I don't understand what is it mean and what should I do?
-
@zhmh said in Cross Compile QT for Raspberry pi 3:
linux-rasp-pi3-g++
They talk about mkspecs, you can see the definitions for them in
<qtdir>/qtbase/mkspecs
.However, you don't have to use
linux-rasp-pi-g++
. You can pick the EGLFS native mkspecs instead:linux-rasp-pi3-vc4-g++
. -
Pass these flags to configure:
-opengl es2 -device linux-rasp-pi3-vc4-g++
-
@sierdzio I Run
./configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=/root/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /root/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /root/raspi/qt5pi -hostprefix /root/raspi/qt5 -no-use-gold-linker -v
for QT 5.11 and the output is :
EGLFS ................ yes ... EGLFS Raspberry Pi ......... no
EGLFS is Missing?or it's fine?
-
Yes that's fine.
-
also I Run:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/root/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /root/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /root/raspi/qt5pi -hostprefix /root/raspi/qt5 -no-use-gold-linker -v
for QT 5.11 and the output is :
EGLFS ................ yes
...
EGLFS Raspberry Pi ......... yesand when make it, I get :
vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux -isystem /usr/include/libdrm -I/media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o .obj/qeglfskmsgbmwindow.o /media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp /media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp: In member function ‘virtual void QEglFSKmsGbmWindow::resetSurface()’: /media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp:58:5: error: ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’ was not declared in this scope PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createPlatformWindowSurface = nullptr; ^ /media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp:61:9: error: ‘createPlatformWindowSurface’ was not declared in this scope createPlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>( ^ /media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp:61:56: error: ‘PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC’ does not name a type createPlatformWindowSurface = reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>( ^ /media/pi/BC1/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp:65:9: error: ‘createPlatformWindowSurface’ was not declared in this scope if (createPlatformWindowSurface) { ^ Makefile:2794: recipe for target '.obj/qeglfskmsgbmwindow.o' failed make[7]: *** [.obj/qeglfskmsgbmwindow.o] Error 1 make[7]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms' Makefile:72: recipe for target 'sub-eglfs_kms-make_first' failed make[6]: *** [sub-eglfs_kms-make_first] Error 2 make[6]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase/src/plugins/platforms/eglfs/deviceintegration' Makefile:104: recipe for target 'sub-deviceintegration-make_first-ordered' failed make[5]: *** [sub-deviceintegration-make_first-ordered] Error 2 make[5]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase/src/plugins/platforms/eglfs' Makefile:125: recipe for target 'sub-eglfs-make_first' failed make[4]: *** [sub-eglfs-make_first] Error 2 make[4]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase/src/plugins/platforms' Makefile:102: recipe for target 'sub-platforms-make_first' failed make[3]: *** [sub-platforms-make_first] Error 2 make[3]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase/src/plugins' Makefile:776: recipe for target 'sub-plugins-make_first' failed make[2]: *** [sub-plugins-make_first] Error 2 make[2]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase/src' Makefile:48: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/media/pi/BC1/qt-everywhere-src-5.11.0/build/qtbase' Makefile:81: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
So I clear everything with:
git clean -dfx and
add -no-gbm to configure../configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/root/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /root/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /root/raspi/qt5pi -hostprefix /root/raspi/qt5 -no-use-gold-linker -v -no-gbm
and make again ,it's work