QT-Eglfs not working on x86_64 debian testing

  • Hi,

    after building QT with opengl (following this howto: http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi)

    and compiling one of the examples, i get the following error ("QXcbConnection: Could not connect to display")
    if i run the example from a shell without x-server
    on a shell with x-server this example is fully working, but i don't think, that eglfs is working, the qt-application uses only x11.

    the reason is, that i want to run my own qt-applications without x-server applications i only want to run them directly with eglfs.

    i am running a debian testing (with 64bit)

    here are the steps, i did to compile qt:
    git clone git://gitorious.org/qt/qt5.git
    cd qt5

    Tweak the qt_base configure

    change the following lines in /usr/local/src/qt5/qtbase/configure

    flags for libdbus-1

    QT_CFLAGS_DBUS="-I/usr/include/dbus-1.0/ -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include/"

    flags for Glib (X11 only)

    QT_CFLAGS_GLIB="-I/usr/include/glib-2.0/ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/"

    and add the following lines in /usr/local/src/qt5/qtbase/configure
    QT_CFLAGS_PULSEAUDIO="-I/usr/include/glib-2.0/ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/"
    QT_LIBS_PULSEAUDIO="-lpulse -lpulse-mainloop-glib"

    flags for GStreamer (X11 only)

    QT_CFLAGS_GSTREAMER="-I/usr/include/gstreamer-0.10/ -I/usr/include/glib-2.0/ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I/usr/include/libxml2/"

    add the following to the line, where QT_CFLAGS_FONTCONFIG is in the else-case:

    Run ./configure
    ./configure -v -opengl es2 -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 &> output

    here i saw EGLFS ..... yes.

    make -j 5 &> output_make

    make install &> output_make_install

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If I saw things correctly you probably have both XCB and eglfs support and XCB is picked up by default. Try calling your app like this

    @myapp -platform eglfs@

    Hope it helps

  • hi, thanks for the reply,

    am i right, if you mean that the application (for example one of the qt-examples), i compiled with the eglfs-enabled qmake and make.
    should be started with this the params "-platform eglfs".

    because if i do this, i get the following errors:
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: DRI2: xcb_connect failed
    Could not initialize egl display

    i tried it on the analogclock-example.


  • Lifetime Qt Champion

    It still tries to connect to xcb…

    To ensure it doesn't, rebuild your Qt with -no-xcb when your configure

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.