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. [SOLVED] Qt6 crosscompiled for pi4 raspi os 64 FAILED TO CREATE EGL CONTEXT
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt6 crosscompiled for pi4 raspi os 64 FAILED TO CREATE EGL CONTEXT

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 1 Posters 1.8k 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.
  • H Offline
    H Offline
    Harlock21
    wrote on last edited by Harlock21
    #1

    Hi all,
    I am just entertaining my new blood bath with the qt framework.
    I am facing what I can call "THE BEAST ERROR"
    I can not in any way to have a native window to be correctly instantiated on my pi4 with raspi os 64 installed.
    This is the premise:
    My pi4 has the official raspberry os 64 (aarch64).
    It uses the kms vc4 driver (the non fake kms one).
    It is a clean installation.
    My pi4 has the x11 server running.

    Qt 6.4.2 has been crosscompiled the first time with the EGLFS support (with this command line configuration):
    cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/opt/Qt6 -DCMAKE_STAGING_PREFIX=/opt/Qt6_rpi -DCMAKE_INSTALL_PREFIX=/opt/Qt6_rpi -DCMAKE_TOOLCHAIN_FILE=/home/michal/tmp/toolchains/rpi-toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON -DFEATURE_dbus=OFF -DBUILD_qtwebchannel=OFF -DBUILD_qtwebengine=OFF

    Then, after having read some discussions were people were experiencing issues with EGLFS, I deciced to get rid of it as well.
    cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/opt/Qt6 -DCMAKE_STAGING_PREFIX=/opt/Qt6_rpi -DCMAKE_INSTALL_PREFIX=/opt/Qt6_rpi -DCMAKE_TOOLCHAIN_FILE=/home/michal/tmp/toolchains/rpi-toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON -DFEATURE_dbus=OFF -DBUILD_qtwebchannel=OFF -DBUILD_qtwebengine=OFF -DQT_FEATURE_opengles2=ON -DQT_FEATURE_opengles3=ON -DQT_FEATURE_eglfs=OFF -DQT_QPA_DEFAULT_PLATFORM=xcb

    There is no way to have the main window be correctly instantiated, it seems that during instantiation the parameters are messed up and I am not allowed to do anything as the window instance just as the gl context instance are part of the plugin code.

    This is the famous and infamous error I am facing:

    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    QRhiGles2: Failed to create temporary context
    QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    QRhiGles2: Failed to create context
    Failed to create RHI (backend 2)
    Failed to initialize graphics backend for OpenGL.

    The glxinfo is showing that the gl mesa driver to be set in place, the glxgears is working fine and the dmesg command is showing the vc4 driver being loaded.

    The same error is showing up whatever qt6 build I am going to use, the one with EGLFS and the one without.

    The only difference is that when I am using the EGLFS compiled with variant I get the 0x300b error code which is a clear symptom of wrong arguments for the window creation.

    Really hope a kind and gentle soul can help.
    Thanks.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Harlock21
      wrote on last edited by
      #2

      Hi all, this is the config summary:

      OpenGL:
      Desktop OpenGL ....................... no
      opengles2 ............................ yes
      opengles3 ............................ yes
      OpenGL ES 3.1 ........................ yes
      OpenGL ES 3.2 ........................ yes
      Vulkan ................................. yes
      Session Management ..................... yes
      Features used by QPA backends:
      evdev .................................. yes
      libinput ............................... yes
      HiRes wheel support in libinput ........ no
      INTEGRITY HID .......................... no
      mtdev .................................. yes
      tslib .................................. yes
      xkbcommon .............................. yes
      X11 specific:
      xlib ................................. yes
      XCB Xlib ............................. yes
      EGL on X11 ........................... yes
      xkbcommon-x11 ........................ yes
      xcb-sm ............................... no
      QPA backends:
      DirectFB ............................... no
      eglfs .................................. no
      EGLFS details:
      EGLFS OpenWFD ........................ no
      EGLFS i.Mx6 .......................... no
      EGLFS i.Mx6 Wayland .................. no
      EGLFS RCAR ........................... no
      EGLFS EGLDevice ...................... no
      EGLFS GBM ............................ no
      EGLFS VSP2 ........................... no
      EGLFS Mali ........................... no
      EGLFS Raspberry Pi ................... no
      EGLFS X11 ............................ no
      LinuxFB ................................ yes
      VNC .................................... yes
      VK_KHR_display ......................... yes
      QNX:
      lgmon ................................ no
      IMF .................................. no
      XCB:
      Using system-provided xcb-xinput ..... no
      GL integrations:
      GLX Plugin ......................... no
      XCB GLX .......................... no
      EGL-X11 Plugin ..................... yes
      Windows:
      Direct 2D ............................ no
      Direct 2D 1.1 ........................ no
      DirectWrite .......................... no
      DirectWrite 3 ........................ no

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Harlock21
        wrote on last edited by
        #3

        Two things: when I was deploying all the plugin renderers were lacking and the sysroot had bad symlinks.
        Thanks all :)

        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