Static build Qt 5.15.16 to use QGLWidget with Mint 22.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/
-
Hi and welcome to devnet,
As is silly as it may sound: did you install the development variants of these packages ?
-
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 ?
-
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.
-
Z Zizin has marked this topic as solved on