QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
-
I'm sorry to be slow to answer. This thing apparently doesn't notify me. I'll check morning and afternoon.
Well, when I check the About box on Qt Creator, I get this.
Qt Creator 10.0.1
Based on Qt 6.4.3 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)Built on May 4 2023 01:14:39
From revision d2b3c31e04
Copyright 2008-2023 The Qt Company Ltd. All rights reserved.
But this may not be the copy of Qt Creator that generated the program. I am currently trying to build it from source, using the desktop of the programmer who is now gone. If that effort succeeds, I will know more.
I suspect that the environment changed around the program. Like GLX and EGL are not enabled by default anymore. But I don't really know.
I realize that is not very much information. It is all I have, at the moment.
Does it generate any ideas?
-
Did you install it using the online installer ?
And again: which distribution are you using ? -
The other Qt Creator installation, where the program was probably built, looks like this.
Qt Creator 4.7.0
Based on Qt 5.11.1 (MSVC 2015, 32 bit)
Built on Jul 17 2018 04:27:33
From revision dedbb40f57
Enterprise Features: Enabled
Licensee: Hebert Tim -
Do you realize that you are not answering my questions ?
And from your description, your colleague was working on Windows while you are working on Linux (which distribution is still a mystery).
-
The Qt Creator that built the program that is failing was installed five years ago. I wasn't here. I don't know whether he used the online installer.
I'm sorry to be ignorant, I don't know what you mean by "which distribution." Is not "Qt Creator 4.7.0, Based on Qt 5.11.1 (MSVC 2015, 32 bit)" a distribution?
I have learned a little more, by talking to a sales engineer at Qt Corp. The instance of Qt Creator that built the program that's failing is a perpetual license. (Which means we can't move to a more recent version without purchasing a different license.)
(The other instance of Qt Creator doesn't matter, now that I think about it, because it wasn't used to build the program. But it is an open-source instance of Qt Creator.)
Am I helping?
-
By distribution, I want to know which Linux distribution you are working on.
As for Qt Creator, it's an IDE. What is really important in your case, is the exact Qt version used to build the application and the compiler. Since your colleague was on Windows, I would guess Visual Studio however MinGW is also a possibility.
Seing the age of Qt Creator, it's likely to be Qt 5 that was used anyway. Hence, if you want to build your application on Linux and avoid some pitfalls, you should start with the Qt version provided by your Linux distribution. That should help you get started.
-
[ The forum won't let me post more often than every ten minutes. I guess to make sure I don't fill up the channel. ]
Ah. Red Hat Enterprise Linux. Release 8.7.
I hadn't even considered that. Does RedHat distribute Qt as part of their system? An rpm, or something?
Yes, it is QT 5 (Qt 5.11.1) Yes, it is Visual Studio (MSVC 2015, 32 bit)
-
So, nobody knows specifically what that message means? Is there a function
call openGL->enableGLX(true);
that has not been called?
Perhaps it was not necessary in a previous version of the surrounding libraries, but it is necessary now?
Or to ask it another way: Who wrote QXcbIntegration? Are they still around?
-
@Rick_Hedin said in QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled:
[ The forum won't let me post more often than every ten minutes. I guess to make sure I don't fill up the channel. ]
Ah. Red Hat Enterprise Linux. Release 8.7.
I hadn't even considered that. Does RedHat distribute Qt as part of their system? An rpm, or something?
Almost certainly, yes. It won't be a commercially licensed version.
A dnf search for qt5- should return a list of related packages.Yes, it is QT 5 (Qt 5.11.1) Yes, it is Visual Studio (MSVC 2015, 32 bit)
This answer is inconsistent with running on Linux. If the Qt SDK is installed for the system in question, run the
qtdiag
program. It should be in <Qt Installation>/<Qt version>/<platform>/bin/This will report a lot of information. Probably too much for a reasonable forum post. Look for information about the Qt version, OpenGL configuration, and host platform. Eg:
Qt 5.15.14 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6)) on "xcb" OS: Fedora Linux 37 (Thirty Seven) [linux version 6.3.5-100.fc37.x86_64] [...] LibGL Vendor: Mesa Renderer: llvmpipe (LLVM 15.0.7, 256 bits) Version: 4.5 (Compatibility Profile) Mesa 23.0.3 Shading language: 4.50 Format: Version: 4.5 Profile: 2 Swap behavior: 0 Buffer size (RGB): 8,8,8 Profile: None (QOpenGLFunctions_4_5), Core (QOpenGLFunctions_4_5_Core), Compatibility (QOpenGLFunctions_4_5_Compatibility) Unable to create a Vulkan instance, error code is0 Qt Rendering Hardware Interface supported backends: OpenGL (with default QSurfaceFormat): [...]
At runtime for a program, additional information can be printed by setting a few environment variables.
https://doc.qt.io/qt-6/debug.htmlQT_DEBUG_PLUGINS=1
andQT_LOGGING_RULES=*.*=true
are a useful start.Turning on all logging rules will probably be too much. See https://doc.qt.io/qt-6/qloggingcategory.html for information on configuring a reduced set.
@Rick_Hedin said in QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled:
So, nobody knows specifically what that message means? [...]
Or to ask it another way: Who wrote QXcbIntegration? Are they still around?Keep in mind that this is a user forum. Most people posting here don't work for The Qt Company, and are likely doing it for fun or personal fulfillment.
-
Hi, Jeremy. That's great information. RedHat probably has a version of Qt that they've "blessed" and that I can install. There are techniques that can be used to find out what's going on with Qt. Thank you.
Can I have more than one version of Qt installed on a system? {Meaning RedHat) And I can run either QtCreator4.7 or QtCreator10.0?
-
@Rick_Hedin said in QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled:
Can I have more than one version of Qt installed on a system? {Meaning RedHat) And I can run either QtCreator4.7 or QtCreator10.0?
By default, different Qt 5 RPM package versions will overwrite each other. This behavior is the same for most RPM packages. There are tricks such as using docker containers, different install roots, manually unpacking, or telling rpm to ignore the database.
The Creator version should not matter. Use whatever is available, a different IDE, or the command line if you prefer.
-
Just a minor correction, you can have several versions of Qt installed: the official from your distribution that lives in the system folders that you should not touch or try to override and then the ones you can install using the online installer or that you build yourself which will live somewhere else in the system such as your home directory or the /opt directory. Doing so will avoid having them interfere with your system.
-
@SGaist said in QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled:
Just a minor correction, you can have several versions of Qt installed: the official from your distribution that lives in the system folders that you should not touch or try to override and then the ones you can install using the online installer or that you build yourself which will live somewhere else in the system such as your home directory or the /opt directory. Doing so will avoid having them interfere with your system.
I had presumed, given the enthusiasm for a Red Hat provided package, that the question was limited to those packages. Using the Qt Company's online installer, the number of installations is effectively infinite.
-