Important: Please read the Qt Code of Conduct -

Qt embedded compile with opengl error...

  • Hi everyone
    Now I'm meet some error in compiling qt embedded with opengl for arm in ubuntu 12.04 .
    acturally, I am compileing qt opensource both version is 4.8.4 and 4.6.2.
    I received opengl lib and header file from cpu vendor for arm.
    but, in configure, I meet error message like below...

    =================== configure message 4.8.4 =============================
    The OpenGL ES 2.0 functionality test failed!
    You might need to modify the include and library search paths by editing

    =================== configure message 4.6.2 =============================
    WARNING: /home/hnrhee/work/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++/qmake.conf:6: Unable to find file for inclusion ../../common/gcc-base-unix.conf
    WARNING: /home/hnrhee/work/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++/qmake.conf:7: Unable to find file for inclusion ../../common/g++-unix.conf
    The EGL functionality test failed!
    EGL is required for OpenGL ES to manage contexts & surfaces.
    You might need to modify the include and library search paths by editing

    my configure is

    ./configure -opensource -confirm-license -release -embedded arm --prefix=/project/qte-opengl -static -little-endian -no-accessibility -shared -no-cups -no-stl -qt-libpng -qt-libjpeg -no-qvfb -no-dbus -qt-freetype -no-nis -no-qt3support -no-largefile -no-libmng -qt-mouse-tslib -I/home/tslib-master/arm_tslib/include -L/home/tslib-master/arm_tslib/lib -opengl es2 -I/home/mali_drv -L/home/mali_drv -no-separate-debug-info -nomake examples -nomake docs -nomake tools -depths 16,18,24 -optimized-qmake -pch -qt-libjpeg -qt-zlib -no-libtiff -ptmalloc -no-webkit -no-script -no-scripttools -xplatform qws/linux-arm-g++

    I checked there is the library and header file in /home/mali_drv folder...

    mkspecs/qws/linux-arm-g++/qmake.conf is

    qmake configuration for building with arm-linux-g++


    modifications to g++.conf

    QMAKE_CC = arm-none-linux-gnueabi-gcc
    QMAKE_CXX = arm-none-linux-gnueabi-g++
    QMAKE_LINK = arm-none-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

    modifications to linux.conf

    QMAKE_AR = arm-none-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
    QMAKE_STRIP = arm-none-linux-gnueabi-strip

    QMAKE_LFLAGS += -Wl,-rpath-link=/home/tslib-master/arm_tslib/lib



    Actually I was googling over 3 days but I can not find solution about this...
    please advise to me.

    Best Regards

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you ensure that the libs and header were put in a folder that can be found by the configuration script ?

  • Yes, I checked libs and header path in configiration

  • Lifetime Qt Champion

    Can you re-run configure with -v ? That should show you where the failure happens

  • thans you for your apply...
    when i was doing with -v option,
    error message is below...

    arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I../../../../tslib-master/arm_tslib/include -I/usr/include/GLES2 -o opengles2.o opengles2.cpp
    cc1plus: warning: include location "/usr/include/GLES2" is unsafe for cross-compilation
    opengles2.cpp:45: fatal error: GLES2/gl2.h: No such file or directory

    but there is /usr/include/GLES2 folder and gl2.h file...

    ls -al /usr/include/GLES2/
    total 100
    drwxr-xr-x 2 root root 4096 jun 31 11:06 ./
    drwxr-xr-x 95 root root 12288 jun 8 17:28 ../
    -rw-r--r-- 1 root root 31914 jun 19 05:54 gl2.h
    -rw-r--r-- 1 root root 48666 jun 19 05:54 gl2ext.h
    -rw-r--r-- 1 root root 909 jun 19 05:54 gl2platform.h

  • Lifetime Qt Champion

    Did you install the ARM headers/libs in your system folders ?

  • Hello SGaist,

    I am also getting the below error, while configuring Qt with opengl -es2 option. Can you please elaborate, how to install ARM headers/libs in system folders ?

    opengles2.cpp:45: fatal error: GLES2/gl2.h: No such file or directory


  • Lifetime Qt Champion

    Installing ARM headers/libs in system folders is wrong.

    You have a tool chain with it's own set of headers and libraries. Copy then needed files there. (You can get them i.e from the debian packages)

  • Hi,

    I am having problem in providing finding the lib -lGLESv2 in the downloaded packages. But there is a lib -lGLESv2x present in the package. But, the configuration is searching for -lGLESv2.

    How do I solve this issue ?

    Note: I am using Red-hat Linux.


  • Lifetime Qt Champion

    From the debian packages: "libgles2-mesa-dev" and its friends

  • Hi,
    I met the same issue as you,have you solved this issue? I cannot solve this issue despite reading many forum posts,I feel loses very much.What should be done to solve this issue?

Log in to reply