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. Static build Qt 5.15.16 to use QGLWidget with Mint 22.1
Forum Updated to NodeBB v4.3 + New Features

Static build Qt 5.15.16 to use QGLWidget with Mint 22.1

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 416 Views 1 Watching
  • 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.
  • ZizinZ Offline
    ZizinZ Offline
    Zizin
    wrote on last edited by
    #1

    Hello, I am trying to port an application I made in Windows to Linux which makes use of a QGLWidget to display 3D graphics. I've created a static build of Qt 5.15.16 using Mint 22.1 and it mostly works however when I open the QGLWidget I get the error

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

    Upon examining my config.summary I see the following

    XCB:
      Using system-provided xcb-xinput ..... no
      Native painting (experimental) ....... no
      GL integrations:
        GLX Plugin ......................... no
        EGL-X11 Plugin ..................... no
    

    I've installed every package I can find related to XCB, X11, GLX, and EGL but I still can't get a yes for GLX Plugin or EGL-X11 Plugin.

    I have added "-static-libgcc -static-libstdc++" to QMAKE_LFLAGS in qtbase/mkspecs/linux-g++-64/qmake.conf and my configure command is

    ../qt-everywhere-src-5.15.16/configure -prefix ../5.15.16/g++13.3.0-x64-a -opensource -confirm-license -static -platform linux-g++-64 -no-ltcg -skip qtscript -skip qtserialport -skip qtsensors -skip qtandroidextras -skip qtwebengine -skip qtcharts -skip qtdatavis3d -skip qtnetworkauth -skip qtvirtualkeyboard -skip qtwebglplugin -make libs -make tools -nomake tests -nomake examples -no-compile-examples -no-dbus -qt-pcre -qt-zlib -no-openssl -system-freetype -no-harfbuzz -opengl desktop -qt-libpng -qt-libjpeg -no-sql-sqlite -skip qtmultimedia -no-openvg -skip qtgamepad -fontconfig  -no-reduce-exports -bundled-xcb-xinput -L /usr/lib/
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      As is silly as it may sound: did you install the development variants of these packages ?

      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
      • ZizinZ Offline
        ZizinZ Offline
        Zizin
        wrote on last edited by
        #3

        Thanks! Not that silly, made that mistake before but yes I did install the -dev versions.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Then you should check the error logs from the tests to see why the failed.

          Another possibly silly question: did you reconfigure Qt from scratch once you installed the dev packages ?

          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
          • ZizinZ Offline
            ZizinZ Offline
            Zizin
            wrote on last edited by Zizin
            #5

            Yeah, I've been deleting the build directory every time. I deleted the source directory too just to try it but got the same result. Here is my config.log file: https://tmpfiles.org/dl/24763454/config.log Some libraries are not found but it does appear to find all the xcb ones. It does not even search for xcb-glx or libxcb-glx0-dev which is what I was guessing was the important one.

            Edit: You know what... I may have figured it out. I noticed QMAKE_LIBDIR_OPENGL in my qmake.conf file was pointing to a folder that doesn't exist, so changed that and QMAKE_LIBDIR_X11 to /usr/lib/x86_64-linux-gnu and now my configure is looking pretty cherry. https://tmpfiles.org/dl/24764955/config.log Too late to wait for the build to finish but I'll report back in the morning if it worked.

            1 Reply Last reply
            1
            • ZizinZ Offline
              ZizinZ Offline
              Zizin
              wrote on last edited by Zizin
              #6

              It works!
              Screenshot from 2025-04-14 07-24-09.png

              1 Reply Last reply
              1
              • ZizinZ Zizin has marked this topic as solved on

              • Login

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