Error running Qt5.9 qopenglwidget example on Raspberry Pi
-
I have a VM running Ubuntu 16.10 x64. I followed the cross compile instructions from RaspberryPi2EGLFS. I was a bit confused about the title because it says it's for Jessie but then it gets Wheezy and has an initial comment about issues with Jessie. I would hope that by now those issues have been resolved but perhaps not.
I followed these instructions except I compiled and installed qt-everywhere-opensource-src-5.9.0 in my Ubuntu VM.
When I run the qopenglwidget on the Rapberry PI 3 i get the following errors:
pi@raspberrypi:~ $ ./qopenglwidget ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by ./qopenglwidget) ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: no version information available (required by ./qopenglwidget) ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5: no version information available (required by ./qopenglwidget) ./qopenglwidget: relocation error: ./qopenglwidget: symbol _ZN14QSurfaceFormat16setDefaultFormatERKS_, version Qt_5 not defined in file libQt5Gui.so.5 with link time reference
If I serch for libraries on the Pi I find:
pi@raspberrypi:~ $ sudo find / -name libQt5Core.* /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3.2 /usr/local/qt5pi/lib/libQt5Core.so.5.9 /usr/local/qt5pi/lib/libQt5Core.prl /usr/local/qt5pi/lib/libQt5Core.so.5 /usr/local/qt5pi/lib/libQt5Core.so /usr/local/qt5pi/lib/libQt5Core.so.5.9.0 /usr/local/qt5pi/lib/libQt5Core.la pi@raspberrypi:~ $ ls -hal /usr/local/qt5pi/lib/libQt5Core* -rw-r--r-- 1 pi pi 642 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.la -rw-r--r-- 1 pi pi 1017 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.prl lrwxrwxrwx 1 pi pi 19 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so -> libQt5Core.so.5.9.0 lrwxrwxrwx 1 pi pi 19 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so.5 -> libQt5Core.so.5.9.0 lrwxrwxrwx 1 pi pi 19 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so.5.9 -> libQt5Core.so.5.9.0 -rwxr-xr-x 1 pi pi 5.2M Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so.5.9.0 pi@raspberrypi:~ $ ls -hal /usr/lib/arm-linux-gnueabihf/libQt5Core* lrwxrwxrwx 1 root root 19 Nov 28 2014 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 -> libQt5Core.so.5.3.2 lrwxrwxrwx 1 root root 19 Nov 28 2014 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3 -> libQt5Core.so.5.3.2 -rw-r--r-- 1 root root 4.5M Nov 28 2014 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3.2
I'm not sure what to do at this point to try and narrow down what the problem is so I'm asking for help.
-
I have a VM running Ubuntu 16.10 x64. I followed the cross compile instructions from RaspberryPi2EGLFS. I was a bit confused about the title because it says it's for Jessie but then it gets Wheezy and has an initial comment about issues with Jessie. I would hope that by now those issues have been resolved but perhaps not.
I followed these instructions except I compiled and installed qt-everywhere-opensource-src-5.9.0 in my Ubuntu VM.
When I run the qopenglwidget on the Rapberry PI 3 i get the following errors:
pi@raspberrypi:~ $ ./qopenglwidget ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by ./qopenglwidget) ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: no version information available (required by ./qopenglwidget) ./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5: no version information available (required by ./qopenglwidget) ./qopenglwidget: relocation error: ./qopenglwidget: symbol _ZN14QSurfaceFormat16setDefaultFormatERKS_, version Qt_5 not defined in file libQt5Gui.so.5 with link time reference
If I serch for libraries on the Pi I find:
pi@raspberrypi:~ $ sudo find / -name libQt5Core.* /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3.2 /usr/local/qt5pi/lib/libQt5Core.so.5.9 /usr/local/qt5pi/lib/libQt5Core.prl /usr/local/qt5pi/lib/libQt5Core.so.5 /usr/local/qt5pi/lib/libQt5Core.so /usr/local/qt5pi/lib/libQt5Core.so.5.9.0 /usr/local/qt5pi/lib/libQt5Core.la pi@raspberrypi:~ $ ls -hal /usr/local/qt5pi/lib/libQt5Core* -rw-r--r-- 1 pi pi 642 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.la -rw-r--r-- 1 pi pi 1017 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.prl lrwxrwxrwx 1 pi pi 19 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so -> libQt5Core.so.5.9.0 lrwxrwxrwx 1 pi pi 19 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so.5 -> libQt5Core.so.5.9.0 lrwxrwxrwx 1 pi pi 19 Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so.5.9 -> libQt5Core.so.5.9.0 -rwxr-xr-x 1 pi pi 5.2M Jun 10 17:25 /usr/local/qt5pi/lib/libQt5Core.so.5.9.0 pi@raspberrypi:~ $ ls -hal /usr/lib/arm-linux-gnueabihf/libQt5Core* lrwxrwxrwx 1 root root 19 Nov 28 2014 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 -> libQt5Core.so.5.3.2 lrwxrwxrwx 1 root root 19 Nov 28 2014 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3 -> libQt5Core.so.5.3.2 -rw-r--r-- 1 root root 4.5M Nov 28 2014 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3.2
I'm not sure what to do at this point to try and narrow down what the problem is so I'm asking for help.
@GeorgeIoak So, you installed your own Qt build in /usr/local/qt5pi on RPi?
It looks like you're mixing different Qt libraries.
What you should try first is: set LD_LIBRARY_PATH before starting your appLD_LIBRARY_PATH=/usr/local/qt5pi/lib && ./qopenglwidget
Did you use /usr/local/qt5pi/lib as prefix when calling configure?
-
@jsulm
I am facing same problempi@raspberrypi:~ $ LD_LIBRARY_PATH=/usr/local/qt5pi/lib && ./qopenglwidget
./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: no version information available (required by ./qopenglwidget)
./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5: no version information available (required by ./qopenglwidget)
./qopenglwidget: /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5: no version information available (required by ./qopenglwidget)
QXcbConnection: Could not connect to display
Aborted
pi@raspberrypi:~ $ sudo find / -name libQt5Core.*
pi@raspberrypi:~ $ sudo find / -name libQt5Core.*
/usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3
/usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
/usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.3.2
/usr/local/qt5pi/lib/libQt5Core.so.5.9
/usr/local/qt5pi/lib/libQt5Core.prl
/usr/local/qt5pi/lib/libQt5Core.so.5
/usr/local/qt5pi/lib/libQt5Core.so
/usr/local/qt5pi/lib/libQt5Core.so.5.9.1
/usr/local/qt5pi/lib/libQt5Core.la
pi@raspberrypi:~ $ -
-
@jsulm
is this right ?
its taking lib from qt4 even after setting $ LD_LIBRARY_PATH=/usr/local/qt5pi/lib
pi@raspberrypi:~ $ qtchooser --print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/arm-linux-gnueabihf/qt4/bin"
QTLIBDIR="/usr/lib/arm-linux-gnueabihf"@hardikh "QXcbConnection: Could not connect to display" - is X11 running on your RPi?
Also, qtchooser is pointing to Qt4 because this one is the default. And you set LD_LIBRARY_PATH only for your app (to set it for all apps started from that terminal you need to do it like: "export LD_LIBRARY_PATH=/usr/local/qt5pi/lib"). -
@jsulm from sudo raspi-config i have set console as boot option instead of desktop environment....that will disable x11 i guess...
now getting following message.... some one suggested "could not find drm device is becasue the device driver need its dtb device tree overlay
there are two overlays and you need to add one to config.txt" but i am unable to understand it.pi@raspberrypi:~ $ export LD_LIBRARY_PATH=/usr/local/qt5pi/lib
pi@raspberrypi:~ $ ./qopenglwidget
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_brcm"
Could not find DRM device!
Aborted
pi@raspberrypi:~ $ -
@jsulm from sudo raspi-config i have set console as boot option instead of desktop environment....that will disable x11 i guess...
now getting following message.... some one suggested "could not find drm device is becasue the device driver need its dtb device tree overlay
there are two overlays and you need to add one to config.txt" but i am unable to understand it.pi@raspberrypi:~ $ export LD_LIBRARY_PATH=/usr/local/qt5pi/lib
pi@raspberrypi:~ $ ./qopenglwidget
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_brcm"
Could not find DRM device!
Aborted
pi@raspberrypi:~ $ -
@jsulm
I am following https://wiki.qt.io/RaspberryPi2EGLFS ..
In step 3
Boot it up, run raspi-config, change it to boot to the console instead of X............so what i did was changed bootoption - desktop -console....instead of desktop environment .....
Are you suggesting that I boot to desktop environment ...Edit: I tried with desktop environment enabled ..I m getting same output ...
-
@jsulm
with logs
pi@raspberrypi:~ $ export LD_LIBRARY_PATH=/usr/local/qt5pi/lib
pi@raspberrypi:~ $ export QT_LOGGING_RULES=qt.qpa.*=true
pi@raspberrypi:~ $ ./qopenglwidget
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_emu", "eglfs_kms_egldevice", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms", "eglfs_emu", "eglfs_kms_egldevice", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
qt.qpa.eglfs.kms: New DRM/KMS via GBM integration created
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
qt.qpa.eglfs.kms: platformInit: Opening DRM device
qt.qpa.input: udev device discovery for type QFlagsQDeviceDiscovery::QDeviceType(Device_DRM|Device_VideoMask)
qt.qpa.input: Found matching devices ()
qt.qpa.eglfs.kms: Found the following video devices: ()
Could not find DRM device!
Aborted -
@jsulm
with logs
pi@raspberrypi:~ $ export LD_LIBRARY_PATH=/usr/local/qt5pi/lib
pi@raspberrypi:~ $ export QT_LOGGING_RULES=qt.qpa.*=true
pi@raspberrypi:~ $ ./qopenglwidget
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_emu", "eglfs_kms_egldevice", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms", "eglfs_emu", "eglfs_kms_egldevice", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
qt.qpa.eglfs.kms: New DRM/KMS via GBM integration created
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
qt.qpa.eglfs.kms: platformInit: Opening DRM device
qt.qpa.input: udev device discovery for type QFlagsQDeviceDiscovery::QDeviceType(Device_DRM|Device_VideoMask)
qt.qpa.input: Found matching devices ()
qt.qpa.eglfs.kms: Found the following video devices: ()
Could not find DRM device!
Aborted@hardikh said in Error running Qt5.9 qopenglwidget example on Raspberry Pi:
Failed to load EGL device integration "eglfs_brcm"
Maybe this can help: https://stackoverflow.com/questions/40490113/eglfs-on-raspberry2-failed-to-add-service-already-in-use
-
@jsulm
does not solved by configure.txt and cmdline.txt given in that link ....
In that link's case it was finding device (as seen in log) and it was used by other use ..but in my case it was not finding any device (eglfs_brcm or eglfs_kms ).... Found matching devices () should display some device$ ./qopenglwidget
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_emu", "eglfs_kms_egldevice", "eglfs_kms", "eglfs_x11")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm", "eglfs_kms", "eglfs_emu", "eglfs_kms_egldevice", "eglfs_x11")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
qt.qpa.eglfs.kms: New DRM/KMS via GBM integration created
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
qt.qpa.eglfs.kms: platformInit: Opening DRM device
qt.qpa.input: udev device discovery for type QFlagsQDeviceDiscovery::QDeviceType(Device_DRM|Device_VideoMask)
qt.qpa.input: Found matching devices ()
qt.qpa.eglfs.kms: Found the following video devices: ()
Could not find DRM device!
Abortededit : more info
pi@raspberrypi:~ $ sudo vcdbg log msg|& grep -v gpioman|grep -iv hdmi
001542.023: *** Restart logging
001546.976: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=24016803-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
001886.167: Loading 'kernel7.img' to 0x8000 size 0x45d610
001889.825: No kernel trailer (run mkknlimg to fix) - assuming DT-capable
001895.753: Loading 'bcm2710-rpi-3-b.dtb' to 0x465610 size 0x44c8
002013.317: dtparam: audio=on
003123.518: Device tree loaded to 0x2efeb700 (size 0x48fb)
004573.463: vchiq_core: vchiq_init_state: slot_zero = 0xee580000, is_master = 1
004584.381: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010" Loaded overlay 'vc4-kms-v3d'" not showing here
-
Able to run it now with fresh install but did not upgraded raspbian by sudo apt-get upgrade ...... and followed every steps from https://wiki.qt.io/RaspberryPi2EGLFS and some changes in step - 7 mentioned here http://www.bytran.org/qtrpicrosscompile.htm now able to run qopenwidget
-
@GeorgeIoak So, you installed your own Qt build in /usr/local/qt5pi on RPi?
It looks like you're mixing different Qt libraries.
What you should try first is: set LD_LIBRARY_PATH before starting your appLD_LIBRARY_PATH=/usr/local/qt5pi/lib && ./qopenglwidget
Did you use /usr/local/qt5pi/lib as prefix when calling configure?
@jsulm Sorry for the delayed response. I was working on my project and it was working so I just ignored this error for now. I tried your suggestion but it didn't solve the problem. This is the latest config I've used on my Ubuntu x64 host:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker
I need to open a new thread because I tried to install qwt and it had problems so I decided to wipe everything out and build from scratch which was a mistake since I'm getting errors now. I'll open a new thread for this issue and once that's fixed I'll see if the qopenglwidget still fails.