Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
qxcbintegrationglxeglx-11opengl
16 Posts 3 Posters 2.9k 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.
  • R Offline
    R Offline
    Rick_Hedin
    wrote on 19 Jun 2023, 17:35 last edited by
    #1

    I inherited a program from someone who has left the organization. When I run it, I get this message.

    I have the impression I need to reconfigure my X-server, rather than edit the code. Does somebody know under what circumstances this message would pop up?

    S 1 Reply Last reply 19 Jun 2023, 18:15
    0
    • R Rick_Hedin
      19 Jun 2023, 17:35

      I inherited a program from someone who has left the organization. When I run it, I get this message.

      I have the impression I need to reconfigure my X-server, rather than edit the code. Does somebody know under what circumstances this message would pop up?

      S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 19 Jun 2023, 18:15 last edited by
      #2

      Hi,

      Which distribution are you running on your machine ?
      Are you using your distribution provided Qt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rick_Hedin
        wrote on 20 Jun 2023, 18:58 last edited by
        #3

        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?

        S 1 Reply Last reply 20 Jun 2023, 19:26
        0
        • R Rick_Hedin
          20 Jun 2023, 18:58

          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?

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 20 Jun 2023, 19:26 last edited by
          #4

          Did you install it using the online installer ?
          And again: which distribution are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rick_Hedin
            wrote on 20 Jun 2023, 20:02 last edited by
            #5

            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

            S 1 Reply Last reply 20 Jun 2023, 20:26
            0
            • R Rick_Hedin
              20 Jun 2023, 20:02

              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

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 20 Jun 2023, 20:26 last edited by
              #6

              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).

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rick_Hedin
                wrote on 20 Jun 2023, 20:29 last edited by
                #7

                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?

                S 1 Reply Last reply 20 Jun 2023, 20:43
                0
                • R Rick_Hedin
                  20 Jun 2023, 20:29

                  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?

                  S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 20 Jun 2023, 20:43 last edited by
                  #8

                  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.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Rick_Hedin
                    wrote on 20 Jun 2023, 20:53 last edited by
                    #9

                    [ 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)

                    jeremy_kJ 1 Reply Last reply 20 Jun 2023, 23:04
                    0
                    • R Offline
                      R Offline
                      Rick_Hedin
                      wrote on 20 Jun 2023, 21:45 last edited by
                      #10

                      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?

                      1 Reply Last reply
                      0
                      • R Rick_Hedin
                        20 Jun 2023, 20:53

                        [ 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)

                        jeremy_kJ Offline
                        jeremy_kJ Offline
                        jeremy_k
                        wrote on 20 Jun 2023, 23:04 last edited by jeremy_k
                        #11

                        @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.html

                        QT_DEBUG_PLUGINS=1 and QT_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.

                        Asking a question about code? http://eel.is/iso-c++/testcase/

                        1 Reply Last reply
                        1
                        • R Offline
                          R Offline
                          Rick_Hedin
                          wrote on 21 Jun 2023, 10:37 last edited by
                          #12

                          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?

                          jeremy_kJ 1 Reply Last reply 21 Jun 2023, 16:34
                          0
                          • R Rick_Hedin
                            21 Jun 2023, 10:37

                            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?

                            jeremy_kJ Offline
                            jeremy_kJ Offline
                            jeremy_k
                            wrote on 21 Jun 2023, 16:34 last edited by
                            #13

                            @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.

                            Asking a question about code? http://eel.is/iso-c++/testcase/

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 21 Jun 2023, 17:48 last edited by
                              #14

                              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.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              jeremy_kJ 1 Reply Last reply 21 Jun 2023, 17:52
                              0
                              • S SGaist
                                21 Jun 2023, 17:48

                                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.

                                jeremy_kJ Offline
                                jeremy_kJ Offline
                                jeremy_k
                                wrote on 21 Jun 2023, 17:52 last edited by
                                #15

                                @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.

                                Asking a question about code? http://eel.is/iso-c++/testcase/

                                R 1 Reply Last reply 21 Jun 2023, 23:53
                                0
                                • jeremy_kJ jeremy_k
                                  21 Jun 2023, 17:52

                                  @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.

                                  R Offline
                                  R Offline
                                  Rick_Hedin
                                  wrote on 21 Jun 2023, 23:53 last edited by
                                  #16

                                  @jeremy_k @SGaist Gotcha. So I should leave the one RedHat installed alone. But I can have different Qt and Qt Creator installations installed at different locations, and they won't fight.

                                  They won't even fight over the system libraries on /usr/lib or some such?

                                  1 Reply Last reply
                                  0

                                  1/16

                                  19 Jun 2023, 17:35

                                  • Login

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