EGLFS problem on Raspberry Pi 2 Qt 5.8 Static
-
Hello.
I get a strange error with my static application running on Raspberry Pi 2.
I am using Buildroot on my RPI2 with qt 5.8 support (i am choose it in buildroot configuration).
I just build static qt 5.8 on my Ubuntu 16.04 with cross-toolchain for buildroot, build and compile a static application for my Raspberry Pi 2 with buildroot cross-compiler, and when i'm running it on RPI2, i get this error:This application failed to start because it could not find or load the Qt platform plugin "eglfs" in "". Reinstalling the application may fix this problem. Aborted.So, i am configure static qt with this command:
./configure -prefix /home/kopylov/Develope/qt-5.8.0-static-raspberrypi2 -debug -static -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/kopylov/Develope/br2017/output/host/usr/bin/arm-buildroot-linux-gnueabihf- -skip qtwebengine -opengl es2 -nomake examples -nomake tests -sysroot /home/kopylov/Develope/br2017/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -opensource -confirm-license -vwhere CROSS_COMPILE - path to my buildroot toolchain, sysroot - path to sysroot,
which was created, when i build a buildroot.Qt was build without errors (but with some warnings) , to this dir:
/home/kopylov/Develope/br2017/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/home/kopylov/Develope/qt-5.8.0-static-raspberrypi2And on RPI qt 5.8 now in a dir:
/home/kopylov/Develope/qt-5.8.0-static-raspberrypi2/One thing i cant make:
echo /home/kopylov/Develope/qt-5.8.0-static-raspberrypi2/lib | sudo tee /etc/ld.so.conf.d/qt5pi.conf sudo ldconfigBecause i have not ldconfig in my buildroot...
I am build and compile my static application, using this commands:
cd /to/my/qt/project make clean /home/kopylov/Develope/br2017/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/home/kopylov/Develope/qt-5.8.0-static-raspberrypi2/bin/qmake /home/kopylov/Develope/Projects/Witronic-develop-static-rpi2/Witronic.pro -spec /home/kopylov/Develope/br2017/output/host/usr/mkspecs/devices/linux-buildroot-g++ CONFIG+=debug CONFIG+=qml_debug && /usr/bin/make makeThere was some errors, because there wasn't directory and libs in:
/home/kopylov/Develope/br2017/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/opt/vc/libI am create this dir and copy all nedeed libs (like libqeglfs.a) from
home/kopylov/Develope/br2017/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/home/kopylov/Develope/qt-5.8.0-static-raspberrypi2/plugins/platforms/libqeglfs.ato
/home/kopylov/Develope/br2017/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/opt/vc/libThen, my static application was build success, without errors.
Then, I am copy it to my Raspberry Pi 2, and when i start it, i get this err:
This application failed to start because it could not find or load the Qt platform plugin "eglfs" in "". Reinstalling the application may fix this problem. Aborted.I tried to fill var
QT_QPA_PLATFORM_PLUGIN_PATHwith path to plugins on my RPI2 (libqeglfs.a is in/home/kopylov/Develope/qt-5.8.0-static-raspberrypi2/plugins/platforms/)
And it's not working, i get errors like this:This application failed to start because it could not find or load the Qt platform plugin "eglfs" in "/home/kopylov/Develope/qt-5.8.0-static-raspberrypi2/plugins/platforms".Also, i tried to add this code to .pro:
CONFIG += plugin QTPLUGIN += qeglfs LIBS += libqeglfs.aand remake+recompile app
And it is not working too.Also, i try to copy
/usr/lib/qt/plugins/platforms/libqeglfs.ato the dir with my static application, and inmy_app_dir/platformsdirAnd it is not working too.
Also, i have non-static application, i am build and compile it with QtCreator and cross-compiler for buildroot, i just copy compiled binary file to my RPI2 and it is working well.
Where i goes wrong?
Thank you for anwsers.