3

I have a unix binary file built with QT and OpenGL which I'm trying to execute on linux-64. It is a simple visual program that shows 2d and 3d graphics.

I have installed all necessary dependencies such as QT and openGL libraries. However, I have stuck with the following error trying to execute the binary

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

However, the binary eventually runs but with some missing features such as 3D graphics.

my setup includes: virtual linux-64 using virtualBox, Vagrant, x-11 forwarding, and a Mac machine.

xarlymg89
  • 2,552
  • 2
  • 27
  • 41
salamon
  • 49
  • 1
  • 1
  • 4
  • Try running `glxinfo`. If it tells you to enable 3D acceleration you may have to shutdown virtualBox to change the settings. –  Jun 28 '15 at 19:44
  • glxinfo shows a log. I believe 3d acceleration is enabled. (However, direct rendering is set to NO, not sure if this is related). – salamon Jun 28 '15 at 21:04
  • *"However, the binary eventually runs"* so that wasn't an error, it was just a warning. And since you've got no direct rendering, you can't use any OpenGL rendering (2D or 3D). – peppe Jun 28 '15 at 21:46
  • I suppose then that indirect rendering is being enforced, and OpenGL should still works (potentially slower). However, I have tried to enforce direct rendering by reinstalling drivers but still no luck. – salamon Jun 29 '15 at 05:20

4 Answers4

1

Eventually I realised that OpenGL 3.3 wouldn't work easily on virtual machines .. yet. I had to boot from ubuntu usb and work from there by installing latest mesa 3d package.

salamon
  • 49
  • 1
  • 1
  • 4
0

This shows a similar issue and the developer in the comment said our 3D support is not very clean in Linux guests, hence the warnings. You can give a try to VMware.

Vedanshu
  • 2,230
  • 23
  • 33
  • thanks for the hint. Eventually I realised that OpenGL 3.3 wouldn't work on virtual machines .. yet. I had to boot from ubuntu usb and work from there. – salamon Jul 16 '15 at 02:41
0

After some time trying to get some opengl working on a particular locked down linux box, I ended up going back to Qt Creator 2.5.2 .

http://download.qt.io/archive/qtcreator/2.5/

http://download.qt.io/archive/qtcreator/2.5/qt-creator-linux-x86_64-opensource-2.5.2.bin

After getting it on the linux box...

chmod u+x *.bin
./qt-creator-linux-x86_64-opensource-2.5.2.bin

And after a short installer, Qt Creator is working!

Basically QtQuick is a requirement in any Qt Creator built after 2.5 (aka Qt 5.x) and QtQuick NEEDS opengl libraries and support.

Hope that helps.

phyatt
  • 18,472
  • 5
  • 61
  • 80
0

I see this problem when executing Qt App, I was executing in dash prompt. (Ubuntu 16.04 has dash by default). I changed to bash prompt and rebuilt my QT App. This error is gone. To configure bash I used below command.

sudo dpkg-reconfigure dash