运行时出现错误提示:
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
原因是缺少 iconv 库,解决方案如下:./configure
后添加编译-no-iconv
运行时出现错误提示:
Unable to figure out framebuffer device. Specify it manually.
linuxfb: Failed to initialize screen
no screens available, assuming 24-bit color
原因发现是 RK3588 没有 fb,所以不支持 LinuxFB 平台插件。
ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.
ERROR: Feature 'egl' was enabled, but the pre-condition '(features.opengl || features.openvg) && (features.angle || libs.egl)' failed.
ERROR: Feature 'eglfs' was enabled, but the pre-condition '!config.android && !config.darwin && !config.win32 && features.egl' failed.
需要先配置 EGL 和 OPENGL ES2 的 include 和 lib 路径才能正常编译。需要修改 qmake.conf:
# tell configure where to find opengl_es2
QMAKE_INCDIR_OPENGL_ES2 = /home/***/work/target/usr/include
QMAKE_LIBDIR_OPENGL_ES2 = /usr/aarch64-linux-gnu
QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lmali
# tell configure where to find egl
QMAKE_INCDIR_EGL = /home/***/work/target/usr/include
QMAKE_LIBDIR_EGL = /usr/aarch64-linux-gnu
QMAKE_LIBS_EGL = -lEGL -lGLESv2 -lmali
gcc 编译程序错误: as: unrecognized option ‘--64‘
解决方案:gcc 编译程序错误: as: unrecognized option ‘--64‘
使用kms_mali插件,运行会报错,打开 export QT_DEBUG_PLUGINS=1
,报错如下:
QFactoryLoader::QFactoryLoader() checking directory path "/opt/demo/egldeviceintegrations" ...
loaded library "/opt/qt5122_rk3588_eglfs_mali/plugins/egldeviceintegrations/libqeglfs-mali-integration.so"
Failed to open fb to detect screen resolution!
Could not get variable screen info
Unable to set double buffer mode! (Bad file descriptor)
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
提示 eglfs_mali 依赖 fb。
undefined symbol: gbm create device
拷贝了一个正常的libmali.so libmali.so.1到/usr/lib才解决:undefined symbol: gbm create device
> /usr/bin/ld.gold: fatal error: verifyspec.o: unsupported ELF machine number 183
> collect2: error: ld returned 1 exit status
> Makefile:68: recipe for target 'verifyspec' failed
> make: *** [verifyspec] Error 1
Note: Also available for Linux: linux-clang linux-icc
ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
只能换个 Ubuntu 虚拟机来交叉编译,可能是原主机的环境有问题,暂时没能彻底解决。
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_kms"
解决:将 eglfs_kvm 改为 eglfs_none
标签:Qt,failed,QMAKE,编译,报错,usr,&&,eglfs From: https://www.cnblogs.com/linuxAndMcu/p/17346633.html