Cross Compiling Qt for ARM with OpenGL

  • hi everyone,
    After searching the web and going through tutorials I tried configuring qt 4.8.4 with OpenGL options:
    This is my command
    ./configure -embedded arm -xplatform
    -prefix /usr/local/qt_install -little-endian -no-webkit -nomake demos
    -nomake examples -no-largefile -optimized-qmake -nomake tools
    -no-openssl -opengl

    The error which i get is

    You have not explicitly asked to use pkg-config and are cross-compiling.
    pkg-config will not be used to automatically query cflag/lib parameters for
    All the OpenGL ES functionality tests failed!
    You might need to modify the include and library search paths by editing


    My qmake.conf file looks like this

    # modifications to g++.conf
    QMAKE_CC = /usr/local/qt-source-cross/arm-2012.09/bin/arm-none-linux-gnueabi-gcc -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt
    QMAKE_CXX = /usr/local/qt-source-cross/arm-2012.09/bin/arm-none-linux-gnueabi-g++ -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt
    QMAKE_LINK = /usr/local/qt-source-cross/arm-2012.09/bin/arm-none-linux-gnueabi-g++ -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt
    QMAKE_LINK_SHLIB = /usr/local/qt-source-cross/arm-2012.09/bin/arm-none-linux-gnueabi-g++ -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt

    # modifications to linux.conf
    QMAKE_AR = /usr/local/qt-source-cross/arm-2012.09/bin/arm-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = /usr/local/qt-source-cross/arm-2012.09/bin/arm-linux-gnueabi-objcopy
    QMAKE_STRIP = /usr/local/qt-source-cross/arm-2012.09/bin/arm-linux-gnueabi-strip
    MAKE_RANLIB = /usr/local/qt-source-cross/arm-2012.09/bin/arm-none-linux-gnueabi-ranlib
    QMAKE_INCLDIR_OPENGL = /usr/include/GL /usr/include/GL/internal/
    QMAKE_LIBDIR_OPENGL = /usr/lib64/
    QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um -lusc
    QMAKE_INCDIR_OPENGL_EGL = /usr/include/GLES/
    QMAKE_LIBDIR_OPENGL_EGL = /usr/lib64/
    QMAKE_LIBS_OPENGL_EGL = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um -lusc
    QMAKE_INCLDIR_OPENGL_ES2 = /usr/include/GLES2/
    QMAKE_LIBDIR_OPENGL_ES2 = /usr/lib64/
    QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um -lusc
    QMAKE_LIBS_THREAD = -lpthread


    For opengl libraries I installed Mesa using yum.
    I don't know where I'm missing :(
    Please help.

  • Lifetime Qt Champion


    Since you are cross-compiling you also need to get the equivalent libraries for ARM otherwise you would be trying to link ARM generated code with x86 libraries.

  • hi,
    Thankx for the reply.
    So you saying me I'v to cross compile mesa libraries with arm compiler and then configure qt?
    and lets say even if I configured this libraries using source with arm compiler, but I won't be able to install it in my Fedora system.
    So how will i link these libraries while configuring qt-src.
    and moreover configuring mesa is a headache i guess, coz Im too lazy.
    Please help.

  • Lifetime Qt Champion

    What kind of linux distribution do you run on your target ? If it's for example a Debian derivative your could always get their precompiled package

  • It is Debian.
    But what if it is not Debian distro. I've to do all the steps.. like compiling mesa then configuring qt?

  • Lifetime Qt Champion

    In that case you would rather use something like OpenEmbedded or the Yocto project that provides most of the things ready to build.

    Nothing forbids you to go from scratch but that takes time and you would have to configure everything including mesa qt the base libraries etc...

  • Hi RhnBlk,
    I'm also getting same error... you got any success?

Log in to reply

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