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

New Ubuntu install (details below), can’t get QCAD to run. Well, it runs the setup wizzard if there’s no config file, and the splash screen looks right. But when the main application window opens, it’s black. It does respond to motion if the mouse travels over it. Also, the Properties window shows up in a separate window. Here’s the terminal output at startup

QCAD version 3.25.2
Warning: RPropertyTypeId::generateId: property already initialized: 7RObject : “” : “Invisible”
13:55:43: Debug: RGLES3DPlugin::initScriptExtensions
13:55:43: Debug: Renaming old unversioned config file from ‘/home/neffk/.config/QCAD/QCAD3.conf’ to ‘/home/neffk/.config/QCAD/QCAD3_old.conf’
Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Warning: QOpenGLWidget: Failed to create context
Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Warning: QOpenGLWidget: Failed to create context
13:55:50: Debug: RGLES3DPlugin::initScriptExtensions
Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Warning: composeAndFlush: makeCurrent() failed
Warning: composeAndFlush: makeCurrent() failed
Warning: composeAndFlush: makeCurrent() failed
Warning: composeAndFlush: makeCurrent() failed

Previously on this hardware I was told to delete ~/opt/qcadcam-3.25.2-pro-linux-x86_64/plugins/libqcadgles3d.so because there was no OpenGL support.

I tried each of the variations in ~/opt/qcadcam-3.25.2-pro-linux-x86_64/qcad separately.

Any ideas for things I could try?


linux version

cat /etc/os-release

PRETTY_NAME=“Ubuntu 23.04”
NAME=“Ubuntu”
VERSION_ID=“23.04”
VERSION=“23.04 (Lunar Lobster)”
VERSION_CODENAME=lunar
ID=ubuntu
ID_LIKE=debian
HOME_URL=“https://www.ubuntu.com/
SUPPORT_URL=“https://help.ubuntu.com/
BUG_REPORT_URL=“Bugs : Ubuntu
PRIVACY_POLICY_URL=“Data privacy | Ubuntu and Canonical Legal
UBUNTU_CODENAME=lunar
LOGO=ubuntu-logo

Did you try removing ~/opt/qcadcam-3.25.2-pro-linux-x86_64/plugins/libqcadgles3d.so?

Yes, it’s deleted. Sorry, I meant to say so in my initial post.

Can you try the other Linux package labeled:

QCAD/CAM 3.28.1 for Linux Qt 5.14 64bit (Installer)

I purchased in 2020 so I don’t have download access. Do I need to buy again? I have an upgrade code. I have the Pro CAD/CAM version, BTW.



In the mean time, I poked around, making sure OpenGL is available on my system

glxinfo | grep ‘^direct rendering:’

direct rendering: Yes

I then deleted the config file and ran qcad again. The config window shows up but the main window is black.

Here’s a thread on the topic…

I’ve sent you a PM with a download link for QCAD/CAM 3.25.2 with Qt 5.14, so you can try if that fixes the issue.

Now I’m getting this error.

qcad: error while loading shared libraries: libqcadecmaapi.so: cannot open shared object file: No such file or directory

find ./ -name ‘libqcadec*’ shows it is in the current directory,

opt/qcadcam-3.25.2-pro-linux-qt5.14-x86_64


Install details:

./qcadcam-3.25.2-pro-linux-qt5.14-x86_64.run
Verifying archive integrity… All good.
Uncompressing QCAD…
QCAD Setup…
Making dir /home/neffk/opt/qcadcam-3.25.2-pro-linux-qt5.14-x86_64…
mkdir: created directory ‘/home/neffk/opt/qcadcam-3.25.2-pro-linux-qt5.14-x86_64’
Copying files…
Invoking postinstall.sh…
Installing mimetypes…
Installing mimetype icons…
Installing desktop menu entries…
Installing desktop icon…
Creating uninstall script…
Setting executable flag…
QCAD Setup finished.

qcad

qcad: error while loading shared libraries: libqcadecmaapi.so: cannot open shared object file: No such file or directory

rm ~/.config/QCAD/QCAD3

QCAD3.conf QCAD3_old.conf

rm ~/.config/QCAD/QCAD3*

qcad

qcad: error while loading shared libraries: libqcadecmaapi.so: cannot open shared object file: No such file or directory

cd plugins/

mv libqcadgles3d.so no_opengl_libqcadgles3d.so

cd ..

qcad

qcad: error while loading shared libraries: libqcadecmaapi.so: cannot open shared object file: No such file or directory

mv libqcadgles3d.so no_opengl_libqcadgles3d.so

Note that this will not disable the plugin. You need to delete the file or move it away to a different directory, etc.

Perhaps, this was the problem all along?

To start QCAD/CAM:

cd /home/neffk/opt/qcadcam-3.25.2-pro-linux-qt5.14-x86_64
./qcad

Note that ./ in front of qcad.

The QT version appears to be working.

I normally use ./ for executables but today I apparently forgot. I looked back in terminal’s the history and saw I was using ./qcad yesterday. Sure enough, “which qcad” revealed a stale binary (gasp). Also, I had tried re-naming and moving the file out of ~/opt. I thought library searching was limited to certain directories and that it would be safe to move the file to ~/tmp. Posting the terminal transcript was more helpful than I expected. Anyway, thanks for your help. In theory, small mistakes should be resolved by users but there’s a psychological aspect for us older folks—small mistakes and unsolvable problems look similar at the outset.