I am developing some (simple) GUI applications for the RPi2 in Qt5. The setup: The code development is performed on a Windows laptop using Netbeans + Qt Designer and remotely built on the RPi running Raspbian Jessie with tools that come with it (g++ 4.9.2, Qt 5.3.2, package qt5-default), as described here. This setup generaly works just fine.

However, even a minimal example doesn't work, although builds ok. It fails to start, and libEGL warning: DRI2: failed to authenticate appears if the application has been started from the terminal.

Can't Qt run on the RPi? Otherwise please help me resolve this problem.

EDIT1: Here what I have after do performing findcommand like Alexey Vesnin suggested:



EDIT2: The list with additional information:

-rw-r--r-- 1 pi pi 171312 Nov 11 14:20 /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
-rwxr-xr-x 1 root root 107880 Nov  2 22:27 /usr/lib/chromium-browser/libs/libEGL.so
-rw-r--r-- 1 root root 14189 Nov  2 22:27 /usr/lib/chromium-browser/libs/libEGL.so.TOC
-rw-r--r-- 1 root root 202072 Dec 19 21:01 /opt/vc/lib/libEGL.so
-rw-r--r-- 1 root root 245356 Dec 19 21:19 /opt/vc/lib/libEGL_static.a

-rw-r--r-- 1 pi pi 29996 Jan 12  2016 /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
-rwxr-xr-x 1 root root 2632816 Nov  2 22:27 /usr/lib/chromium-browser/libs/libGLESv2.so
-rw-r--r-- 1 root root 29617 Nov  2 22:27 /usr/lib/chromium-browser/libs/libGLESv2.so.TOC
-rw-r--r-- 1 root root 100008 Dec 19 21:19 /opt/vc/lib/libGLESv2_static.a
-rw-r--r-- 1 root root 105768 Nov 25 17:35 /opt/vc/lib/libGLESv2.so


linux-vdso.so.1 (0x7ecef000)
    /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f53000)
    libQt5Widgets.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5 (0x76a25000)
    libQt5Gui.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 (0x76655000)
    libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0x761d0000)
    libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x761ab000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76183000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x760a6000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x7602b000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x75ffe000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x75ebd000)
    libgobject-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0 (0x75e63000)
    libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x75d5f000)
    libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0x75c49000)
    libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0x75c31000)
    /lib/ld-linux-armhf.so.3 (0x54b67000)
    libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0x75c01000)
    libharfbuzz.so.0 => /usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0 (0x75ba5000)
    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x75b7d000)
    libicui18n.so.52 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.52 (0x759bd000)
    libicuuc.so.52 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.52 (0x75874000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x75861000)
    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x7584a000)
    libEGL.so => /opt/vc/lib/libEGL.so (0x75810000)
    libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x757ea000)
    libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x757d4000)
    libvcos.so => /opt/vc/lib/libvcos.so (0x757ba000)
    libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0x757aa000)
    libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x75736000)
    libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x75717000)
    libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0x756fa000)
    libglapi.so.0 => /usr/lib/arm-linux-gnueabihf/libglapi.so.0 (0x756c1000)
    libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0x75629000)
    libgraphite2.so.3 => /usr/lib/arm-linux-gnueabihf/libgraphite2.so.3 (0x755fb000)
    libicudata.so.52 => /usr/lib/arm-linux-gnueabihf/libicudata.so.52 (0x73f7e000)
    libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x73f73000)
    libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x73f67000)
  • Are you trying to run the application remotely? – goldilocks Jan 27 '17 at 14:40
  • no, I run it from the RPi – Andrey Pro Jan 27 '17 at 14:43
  • @goldilocks in case of remote running an error messages would be different – Alexey Vesnin Jan 27 '17 at 17:40

It's a usual linux and Unix problem, nothing Pi-related. Here is the problem: your libs need to be symlinked. Do sudo -s and become a root for such an operation. And let's troubleshoot it!

First, find them, like this:

# find / -name libEGL* -type f
# find / -name libGLESv2* -type f

and do this linking to the full paths to files like this:

# ln -fs /path/to/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so
# ln -fs /path/to/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1
# ln -fs /path/to/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
# ln -fs /path/to/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2

and let the OS know what you have done and take it into account like this:

# ldconfig

The /path/to/lib part you should replace with full path that find commands will show you. And if running from unprivileged user - make sure that it's in video group - sometimes this old part of permission settings does float up. How to check:

# getent group video | cut -d: -f3

if it gives nothing - then it's not that case, but if it gives a number, then type your username in groups command - an example for user pi:

# groups pi

if it does not shows video group - add it as a supplementary group, not as the main one, like this:

# usermod -a -G video pi

this will add user pi to group video without breaking things up

UPDATE: additional check command to find out what are the files found:

# find / -name libEGL* -type f -exec ls -la {} \;
# find / -name libGLESv2* -type f -exec ls -la {} \;

UPDATE#2: Try to do this from root:

# ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so
# ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
# ldconfig

UPDATE#3: building Qt5 with bugfixes from source.

  • go here, install dependencies via apt-get (the -dev packages)
  • as root do apt-get build-dep qt5-default
  • as root do apt-get install libxcb-xinerama0-dev flex bison gperf libicu-dev libxslt-dev ruby libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libdbus-1-dev libfontconfig1-dev libcap-dev libxtst-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libxss-dev libegl1-mesa-dev gperf bison libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev, after that apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev

after that do this:

 # git clone https://code.qt.io/qt/qt5.git
 # cd qt5
 # git submodule update --init

after that link ./configure --help output for your case and we will continue

FINAL UPDATE: source build did the trick, the problem was with an outdated Qt in packages. The configuration string :

 # mkdir qt-build
 # cd qt-build
 # ../configure -opensource -static -confirm-license -release -nomake examples -openssl-runtime -prefix /usr

Raspberry Pi build took around 40 hours and 6+Gb of storage space. Problem fixed

  • Comments are not for extended discussion; this conversation has been moved to chat. – Steve Robillard Jan 27 '17 at 19:46
  • 1
    around 46 hours to be more precise – Andrey Pro Feb 3 '17 at 13:32
  • but the victory is ours, finally! – Alexey Vesnin Feb 3 '17 at 13:33

In my case this fixed the issue

sudo ln -s /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 /usr/lib/arm-linux-gnueabihf/libGLESv2.so

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.