QT移植到全志T芯片,生成应用程序运行报错:
/analogclock qt.qpa.egldeviceintegration: Failed to load EGL device
integration “eglfs_mali” EGL library doesn’t support Emulator
extensions Aborted
1.按照网络搜索,设置:
export QT_QPA_EGLFS_INTEGRATION=none
无效
export QT_QPA_EGLFS_INTEGRATION=eglfs_mali
无效
3.查看配置发现egl有错误:
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... no
EGLFS GBM ............................ no
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ no
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
这里EGLFS Mali … no是不正常的。
追溯配置发现编译报错:
Checking for Mali EGL…
…
qt-everywhere-src-5.12.5-2/config.tests/egl-mali:
qtbase/mkspecs/linux-aarch64-gnu-g++ -o main.o main.cpp
main.cpp:2:10: fatal error: EGL/fbdev_window.h:没有那个文件或目录
#include <EGL/fbdev_window.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [main.o] 错误 1
这里需要fbdev_window.h,没找到。添加一个空文件fbdev_window.h,再config。这下正常了:
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... no
EGLFS GBM ............................ no
EGLFS VSP2 ........................... no
EGLFS Mali ........................... yes
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ no
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
重新编译之后,会多生成plugins\egldeviceintegrations\libqeglfs-mali-integration.so这个文件。
将该文件推送到目标板,就正常了。