Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QXcbIntegration: neither GLX nor EGL are enabled on Yocto Linux
Forum Updated to NodeBB v4.3 + New Features

QXcbIntegration: neither GLX nor EGL are enabled on Yocto Linux

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soham
    wrote on last edited by
    #1

    I have an application running on Yocto Zeus 3.0.1 with Qt5 and relies on OpenGL EGL. I want to use the XCB platform backend of Qt. I am building the application on target board. The application builds fine, but fails with the following message at runtime:

    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
    QOpenGLWidget: Failed to create context
    

    I have added all the needed OpenGL drivers in image .bb file:

    IMAGE_INSTALL += "libegl-mesa libgl-mesa mesa libegl-mesa-dev libgl-mesa-dev libgles3-mesa-dev mesa-megadriver xserver-xorg xserver-xorg-extension-glx libx11 gsl-dev"
    

    In local.conf, added:

    DISTRO_FEATURES_append = " opengl x11 systemd"
    

    The following is my qt5/qtbase_%.bbappend file.

    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
    
    PACKAGECONFIG_append = "gles2 mtdev sql-sqlite glib fontconfig gif accessibility"
    
    PACKAGECONFIG_append = " widgets"
    
    do_configure_prepend () {
        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
        # the below indentation is important - Soham
    
    QMAKE_LIBS_EGL += -lEGL -ldl -lglib-2.0 -lpthread
    QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lgsl -lEGL -ldl -lglib-2.0 -lpthread
    
    QMAKE_CFLAGS += -DLINUX=1 -DWL_EGL_PLATFORM -DEGL_API_FB=1
    QMAKE_CXXFLAGS += -DLINUX=1 -DWL_EGL_PLATFORM -DEGL_API_FB=1
    
    QT_QPA_DEFAULT_PLATFORM = xcb
    load(qt_config)
    EOF
    }
    
    

    As I am building the application on the target itself, Therefore, I added the -dev files. I have turned on the QT_DEBUG_PLUGINS=1, but still did not get any meaningful output. I have checked the file at /usr/lib/plugins/platforms/libqxcb.so, and all the dependent libraries exist there.

    What am I missing here? Any help?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved