Qt5 - Application failure: Could not initialize GLX



  • Hello,
    I have built Qt5 on my Raspberry PI 2. I have also been successful with building an application that requires Qt5. However the application will only successfully launch when using a directly attached monitor (keyboard, mouse). It fails to launch when attempting to run the application when using a X server running on my PC. The error is : Could not initialize GLX. Let me say I'm really new to all of this and there is probably something very simple I have over looked such as a library I have failed to install. Please take a look at the output of configure.
    Please let me know what I need to do so that Qt5 based applications will work on remote X11 server implementations.

    Thanks,
    Ron
    Below is the output of the Qt configure.

    Configure summary

    Build type: linux-g++ (arm, CPU features: none detected)
    Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
    

    Build options:
    Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent dbus evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib harfbuzz iconv inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis opengl openssl pcre png posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xkbcommon-qt xlib xrender
    Build parts ............ libs tools
    Mode ................... release
    Using C++11 ............ yes
    Using gold linker....... yes
    Using PCH .............. yes
    Target compiler supports:
    Neon ................. no

    Qt modules and options:
    Qt D-Bus ............... yes (loading dbus-1 at runtime)
    Qt Concurrent .......... yes
    Qt GUI ................. yes
    Qt Widgets ............. yes
    Large File ............. yes
    QML debugging .......... yes
    Use system proxies ..... no

    Support enabled for:
    Accessibility .......... yes
    ALSA ................... yes
    CUPS ................... no
    Evdev .................. yes
    FontConfig ............. yes
    FreeType ............... yes (system library)
    Glib ................... yes
    GTK theme .............. no
    HarfBuzz ............... yes (bundled copy)
    Iconv .................. yes
    ICU .................... no
    Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using system library)
    PNG .................. yes (in QtGui, using system library)
    journald ............... no
    mtdev .................. no
    Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
    NIS .................... yes
    OpenGL / OpenVG:
    EGL .................. no
    OpenGL ............... desktop
    OpenVG ............... no
    PCRE ................... yes (bundled copy)
    pkg-config ............. yes
    PulseAudio ............. yes
    QPA backends:
    DirectFB ............. no
    EGLFS ................ no
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. yes (system library)
    EGL on X ........... no
    GLX ................ yes
    MIT-SHM ............ yes
    Xcb-Xlib ........... yes
    Xcursor ............ yes (loaded at runtime)
    Xfixes ............. yes (loaded at runtime)
    Xi ................. yes (loaded at runtime)
    Xi2 ................ no
    Xinerama ........... yes (loaded at runtime)
    Xrandr ............. yes (loaded at runtime)
    Xrender ............ yes
    XKB ................ no
    XShape ............. yes
    XSync .............. yes
    XVideo ............. yes
    Session management ..... yes
    SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
    udev ................... yes
    xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
    zlib ................... yes (system library)

    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into /home/ron/usb1/src/Qt5/qtbase

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.

    ron@squireoaksfarm-radio ~/usb1/src/Qt5 $


  • Lifetime Qt Champion

    Hi,

    Just to be sure I understand you correctly: you are trying to connect your application running on the Pi2 to the X server of your desktop to computer ?



  • Hello,
    Yes, correct. The application is running on the RPi 2. The X server is running on my PC.
    When on the RPI 2 and I issue the command: startx which obviously brings me into the local X11 environment on the RPI 2, the application runs fine. However if and when I am on the PC and start the X11 server on the PC and use that environment to communicate with the RPI 2 the application fails. It does not matter what I use on the PC. TightVNC view, Windows RDP, or MobaXterm.

    Thanks for your time,
    Ron


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.