Qt 5.4 Cross Compile for Raspberry Pi 2



  • Hi,
    I try to cross compile qt 5.4 for raspberry pi 2 with success, but when I try run qmlscene test.qml i get message:

    EGL Error : Could not create the egl surface: error = 0x300b

    Aborted

    ===
    I also export variables:
    export LD_LIBRARY_PATH=/usr/lib:LD_LIBRARY_PATH
    export TSLIB_TSEVENTTYPE=INPUT
    export QTDIR=/usr/local/Qt-5.4
    export QWS_MOUSE_PROTO=tslib:/dev/input/event2
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/local/lib/ts
    export TSLIB_TSDEVICE=/dev/input/event2
    export QWS_DISPLAY=LinuxFB:mmWidth=1366:mmHeight=768
    export QT_QPA_EGLFS_PHYSICAL_WIDTH=345
    export QT_QPA_EGLFS_PHYSICAL_HEIGHT=195
    export QT_QPA_EGLFS_DEPTH=16

    Any suggestion what is wrong?



  • I had the same problem on Cubieboard2. The only solution that worked for me was this one:

    http://www.decom.ufop.br/imobilis/?p=4367

    Straight to the point:

    • Open qtbase/src/plugins/platforms/qeglfshooks_stub.cpp

    • Find EGLNativeWindowType QEglFSHooks::createNativeWindow

    • Change it to:

      EGLNativeWindowType QEglFSHooks::createNativeWindow(QPlatformWindow *platformWindow,
      const QSize &size,
      const QSurfaceFormat &format)
      {
         Q_UNUSED(platformWindow);
         Q_UNUSED(size);
         Q_UNUSED(format);
         //return 0;
      
        static struct mali_native_window native_window = {
        .width = (short unsigned int)size.width(),
        .height = (short unsigned int)size.height(),
        };
         return &native_window;
      }

Log in to reply
 

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