Important: Please read the Qt Code of Conduct -

OpenGL ES 2.x disabled.

  • Hello,
    I tried to configure Qt5 using this command
    ./configure v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2 -make libs -device imx6 -compile-examples -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi -sysroot /ltib_install/ltib/rootfs -no-gcc-sysroot -prefix /opt/qt5
    I am getting below error..
    opengles2.cpp:45:25: fatal error: GLES2/gl2.h: No such file or directory
    compilation terminated.
    make: *** [opengles2.o] Error 1
    OpenGL ES 2.x disabled.
    The OpenGL ES 2.0 functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in /home/jigar/qt5/qtbase/mkspecs/devices/linux-imx6-g++.

  • Moderators

    OpenGL is required by QtGui and QtQuick modules: you can't compile them without it. You can skip unneeded modules with
    -skip modulename

  • Hello Sierdzio,
    i am new in QT and also in Ubuntu.
    I don't get it how can i skip modules?

  • my qmake.conf file is like this..

    qmake configuration for the Freescale iMX6 boards (single, dual and quad)

    This mkspec is based and tested on the ltib-source-release 3.0.15

    Building ltib including glib, gpu-drivers and what ever you want to use (e.g. dbus or fontconfig)

    This mkspec is tested with a framebuffer (eglfs) configuration (not testes with X11)

    A typical configure line looks like:

    /home/tsenyk/qt5/qt5/configure -opensource -confirm-license -make libs -device imx6 \

    -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \

    -sysroot <path-to-your-ltib-install>/rootfs -no-gcc-sysroot \

    -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1

    NOTE: currently ltib doesn't produce a proper staging/sysroot-filessystem.

    If gcc's --sysroot is used, the toolchain doesn't find basic binaries (e.g. crt1.o),

    therefore you have to pass -no-gcc-sysroot to configure if you pass -sysroot to configure!


    EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp

    QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include
    QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib


    QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib

    IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1



  • Moderators

    OK, in this case I think you can safely just omit that "-no-opengl" flag when calling configure. The board seems to have all you need to run OpenGL ES.

  • I tried this below script. and it works ..
    so can you tell me will i get any problem related to gui of QT?

    ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -make libs -device imx6 -compile-examples -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -sysroot /home/jigar/ltib_install/ltib/rootfs -no-gcc-sysroot -prefix /opt/qt5

  • Moderators

    [quote author="jigarchokshi" date="1392802673"]so can you tell me will i get any problem related to gui of QT?[/quote]

    I don't understand this question, please rephrase or explain.

    If it compiles, the situation is definitely looking good. Without OpenGL, you should be able to use all non-gui modules (core, network, XML, etc.), plus QtQuick1 and QtWidgets.

  • but i need qtqui module also..
    so now i must have configure with opengles2.0.
    so now how can i add opengles2.0 in my sysroot?
    i am using ltib as rootfs and in ltib opengles is not available.

  • Moderators

    QtGui itself is kind of a hard question: it does not depend on OpenGL as such, but might be required in some situations. You have said that the configuration and make stages were successful, so I think it is fine.

  • I am following below link to cross compile qt 5.

    But on step 8 i have a problem again because now i don’t have a “qtjsbackend” directory in my installed qt5 directory. :(

  • Moderators

    Do you want to use QtQuick1 (a deprecated module)? If no, then just skip it.

  • okay... but i realize now that i must need qtQuick2 as i am developing gui and for that i must need opengles2...

  • okay... but i realize now that i must need qtQuick2 as i am developing gui and for that i must need opengles2... so now i know that i can not condigure without opengles 2.0..

  • Moderators

    You can choose to use widgets, which should not require OpenGL. But QtQuick 2 is cool, too :) Your board does support it, so no worries.

  • hie again back after long time..
    as you suggested me to compile without gles 2.0 .. i did that and it was perfect..
    i am following this link to cross compile qt 5.2.

    now in step 8 as described there should be 2 directories.
    qtjsbackend and qtdeclarative

    because when i configure qt i used no opengles . so i am not getting qtjsbackend. that's fine. i am getting qtdeclarative directory.

    When i tried to build that directory using ../qtbase/bin/qmake -r command.
    I got error for qt-quick.
    Project ERROR: Unknown module(s) in QT: quick-private

    To solve this error i tried following solution

    modify this file qtbase/bin/qt.conf and add the correct prefix, the one given on configure


    But still i got same error.
    Thanks you.. :)

  • Moderators

    Some people say that this can be fixed by turning off tests and examples:
    -nomake tests -nomake examples

  • but whre should i write because i write this at configuration time and i got error like this...
    ~/qt5/qtbase$ ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -make libs -device imx6 -compile-examples -device-option -nomake tests -nomake examples CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin -sysroot /ltib_install/ltib/rootfs -no-gcc-sysroot -prefix /opt/qt5
    tests: unknown argument
    CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin: unknown argument

  • Moderators

    [quote author="jigarchokshi" date="1393498528"]tests: unknown argument[/quote]

    I have not seen that error before, and I am using this flag regularly. Possibly some other option is silently removing tests already, although that would be a bit strange. Remove the flag, then.

  • so now how should i go ahead? any idea?

Log in to reply