Skip to content

qt5-qtbase: Missing GLX/EGL support in XCB integration breaks OpenGL applications in containers #70037

@vejeta

Description

@vejeta

Problem

Qt5 applications fail to use OpenGL (even software rendering) in containerized environments.

Steps to reproduce:

docker run --rm -it cgr.dev/chainguard/wolfi-base
apk add qt5-qtbase qt5-qtbase-x11
# Run any Qt5 app requiring OpenGL

Error:

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

Root cause:

qt5-qtbase is compiled without XCB GLX/EGL integration. The file libQt5XcbQpa.so.5 contains the hardcoded error message and lacks GLX initialization code.

Missing configure flags:

  • -xcb
  • -xcb-xlib
  • -feature-xcb-glx-plugin
  • -egl
  • Using -opengl instead of -opengl desktop on x86_64

Impact:

  • Video playback shows black screen in applications like Stremio
  • Software OpenGL via Mesa llvmpipe fails
  • Affects all Qt5 GUI applications needing OpenGL in containers

Proposed solution:

I'm working on a fix that adds the missing configure flags. Currently part of a larger draft PR,
but happy to split the qt5-qtbase changes into a separate PR if preferred for easier review.
https://github.com/wolfi-dev/os/pull/69098/files#diff-c7b776b7f311351d1c674a9338ac129ead0ddc059e19a60dfa2dbd01b82e4e35R116-R143

Testing done:

  • Confirmed the plugin exists but Qt can't use it
  • Verified the error is in core Qt5XcbQpa library
  • Testing fix with real applications (Stremio)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions