Cannot find DRM device - Qt5.9.0 with EGLFS
I've successfully built QT 5.9.0 on my Raspberri Pi running Raspbian Lite. I specified EGLFS in the ./configure, as I plan on using the RPi for an embedded Qt application (no X server). I'm able to run a small PyQt5 app (Test.py) using the linuxfb platform flag (i.e. python3.6 Test.py --platform linux). However, the eglfs platform flag (i.e. python3.6 Test.py --platform eglfs) causes the following error:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-pi' Could not find the DRM device! Aborted
Is the XDG_RUNTIME_DIR an environment variable that I'm missing? Outside of the ./configure eglfs flag, I haven't touched any environment variables pertaining to DRM or eglfs.
I've run an 'ldd' on libqeglfs.so which didn't show any missing packages. Can anyone point me in the right direction to resolving this issue?
It looks like resolving the XDG_RUNTIME_DIR warning is as simple as pointing the variable to a directory, as follows:
When running the python3.6 Test.py --platform eglfs command now, I only receive the DRM device error:
Could not find DRM device! Aborted
When I ran the ./configure command for my Qt build, I didn't use the '-device' flag; is this needed for the Raspberry Pi build? Perhaps eglfs requires device specification at the Qt build level?
Is rebuilding Qt with the -device flag the easiest way to test this theory, or are there components of the current build I can test first?
My config.summary file was showing that EGLFS for Raspberry Pi hadn't been configured, so I'm rebuilding Qt with the -device and -device-option flags to hopefully correctly configure Qt for Raspberry Pi EGLFS.
I rebuilt Qt, Python, SIP and PyQt5 overnight, using the -device and -device-option flags in the Qt ./configure process and eglfs is working now :)
The only issue I've now got is a warning regarding a missing font directory, as apparently Qt no longer ships with fonts. This should be a pretty simple fix however.