Error deploying Qt5 e.g. - EGLFS: failed to open /dev/fb0
-
Dear fellow coders, I built Qt5 with the following configuration parameters, executed an example in Qt5 and met with an error:
(1) Executing Qt5 configuration parameters:
./configure -commercial -confirm-license -release -static -eglfs -linuxfb -opengl es2 -platform linux- g++-64 -device linux-arm-hi3536-g++ -prefix /home/aa/Hi3536_SDK_V2.0.4/v1_qt5.7_arm -device-option CROSS_COMPILE=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/arm-hisiv400-linux-gnueabi- -skip doc -v -qreal float
(2) Executed an example in Qt 5
/mnt/v1_qt5.7_arm/examples/widgets/widgets/tetrix # ./tetrix
(3) Error executing ./tetrix
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed EGLFS: Failed to open /dev/fb0 EGLFS: Can't continue without a display Aborted
Could anyone advise if there's any solution to this error?
Thank you!
-
Hi,
Do you have a device named
/dev/fb0
? If yes, do you have the rights to access it ? -
Do you have anything else accessing that device ?
-
@SGaist I did a reboot of my embedded device (via Putty device) and re-run the example tetrix (examples/widgets/widgets/tetrix) again and it seems that some fonts are missing. Basically I did the following actions:
-
Installed
fontconfig
and coped the folder[fonts]
from/usr/shared/fonts
into my [compiled Qt 5.7 fonts directory] i.e./v1_qt5.7_arm/lib/fonts
-
Re-run the tetrix example again but still met with the following issues:
/mnt/v1_qt5.7_arm/examples/widgets/widgets/tetrix # ls main.cpp tetrixboard.cpp tetrixpiece.h tetrix tetrixboard.h tetrixwindow.cpp tetrix.pro tetrixpiece.cpp tetrixwindow.h /mnt/v1_qt5.7_arm/examples/widgets/widgets/tetrix # ./tetrix QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed Unable to query physical screen size, defaulting to 100 dpi. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters). QFontDatabase: Cannot find font directory /home/aa/Hi3536_SDK_V2.0.4.0/v1_qt5.7_arm/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
- Do you've any advice for the issues:
(I) fonts issues - it seems that I need to re-configure and build my qmake again but do you've any idea how may I do that? i.e. copy the fontconfig sources into a newly unzipped Qt5 sources before configure-build?
(ii) Unable to query physical screen size, defaulting to 100 dpi?
Thank you!
-
-
Temporarily put the fonts where QFontDatabase expects them.
Also you should compare the version of fontconfig you have installed with the one you used to build Qt.
-
@SGaist ok got it resolved. problem is that I do development on Ubuntu host before executing onto target. So during configuration and building Qt 5 sources, I need to add -prefix and -extprefix so that when I execute the Qt 5 app on my target, it's able to locate the fonts.