[Solved] Qt OpenGL - EGLFS, EGL, XCB, X11, Wayland? Jetson board TK1

Hi,

I would like to get the Qt OpenGL examples such as the Cube example working on my board (http://doc-snapshot.qt-project.org/qt5-5.4/qtopengl-cube-example.html).

I’m a self-learning so I’m sorry to ask stupid questions.

  • What it is the difference between EGLFS and XCB ? They are doing the same thing ?
  • Which one is the best to use for my Jetson Board TK1 ?
  • Same questions for X11 and Wayland

I’m having the following error using ./cube - platform eglfs :

EGL Error : Could not create the egl surface: error = 0x300b
  • Does someone has any ideas of what I can do to solve it?

Thank you!

For what I known for now,
XCB(X11) is the qpa that works on JTK1.
I think wayland works, too. But haven’t tried out myself.

As for the opengl cube example, works fine on my machine.
I built QT5.4.0 with a dev-branch, which I believed that did’t matter here since
the branch is mainly about qtmultimedia.

So, build your QT 5.4.0 for source with the following configs, it should work.

#!/bin/sh
./configure -release -opensource -confirm-license \
-no-pch -nomake tests -nomake examples \
-egl \
-qpa xcb \
-no-eglfs \
-opengl es2 \
-qreal float \
-force-pkg-config \

(optional setting to save time & mem-space)
-skip qtwebkit -skip qtwebkit-examples \
-skip qtwebchannel -skip qtwebengine -skip qtwayland \

or you might just tried -platform xcb

Hi,

Thank you a lot for your answer!
I rebuilt my Qt with the configure option that you gave me.
I’m getting the following error when I am trying to run the Cube example on the target :

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

What does it mean ?
Does my built summary correct or am I missing something ?

Build options:
  Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile egl evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify ipv6ifname large-config linuxfb medium-config minimal-config mremap nis opengl opengles2 pcre png posix_fallocate qpa qpa reduce_exports release rpath shared small-config use_gold_linker xcb xcb-plugin xcb-sm xkbcommon-qt zlib 
  Build parts ............ libs examples
  Mode ................... release
  Using C++11 ............ yes
  Using gold linker....... yes
  Using PCH .............. no
  Target compiler supports:
    Neon ................. auto

Qt modules and options:
  Qt D-Bus ............... no
  Qt Concurrent .......... yes
  Qt GUI ................. yes
  Qt Widgets ............. yes
  Large File ............. no
  QML debugging .......... yes
  Use system proxies ..... no

Support enabled for:
  Accessibility .......... yes
  ALSA ................... no
  CUPS ................... no
  Evdev .................. yes
  FontConfig ............. no
  FreeType ............... yes (bundled copy)
  Glib ................... no
  GTK theme .............. no
  HarfBuzz ............... yes (bundled copy)
  Iconv .................. yes
  ICU .................... no
  Image formats: 
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using bundled copy)
    PNG .................. yes (in QtGui, using bundled copy)
  journald ............... no
  mtdev .................. no
  Networking: 
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. no
  NIS .................... yes
  OpenGL / OpenVG: 
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.0+)
    OpenVG ............... no
  PCRE ................... yes (bundled copy)
  pkg-config ............. yes 
  PulseAudio ............. no
  QPA backends: 
    DirectFB ............. no
    EGLFS ................ no
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ no
      MIT-SHM ............ yes
      Xcb-Xlib ........... no
      Xcursor ............ yes (loaded at runtime)
      Xfixes ............. yes (loaded at runtime)
      Xi ................. yes (loaded at runtime)
      Xi2 ................ no
      Xinerama ........... yes (loaded at runtime)
      Xrandr ............. yes (loaded at runtime)
      Xrender ............ no
      XKB ................ no
      XShape ............. yes
      XSync .............. yes
      XVideo ............. yes
  Session management ..... yes
  SQL drivers: 
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
  udev ................... no
  xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
  zlib ................... yes (bundled copy)

Thank you!

In your config output

XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ no

Means you xcb didn’t support egl, nor glx.
The most possible answer will be it failed the config test.
Rerun config with -v attached, figure out what libs or links you’re missing.

Hi,

Thank you a lot for your help!!
I got it work :)

I was missing some libraries as you suggested (libX11-xcb.so, libXrender.so, libXext.so, libxcb-render-util.so and libdbus-1.so (I needed to install on my target libdbus-1-dev)).

I nedded to remove -no-dbus from my ./configure and now I have “EGL on X… yes”!

Thanks a lot again!!!

Hi
I meet the same problem ,i want to know how i can get my configure (built)summary.
Thanks a lot!

Hi llp,

If this problem is about building Qt, I suggest to ask it in Qt forum.

We don’t officially support Qt on Tegra.