View Full Version : Qt with OpenGL ES for ARM9 - All OpenGL ES tests h

12-01-2009, 03:12 PM
OK - I am at wit's end with this one.

have been trying to cross-compile MESA to include OpenGL ES libraries
in Qt. I am currently developing embedded using the FriendlyArm
mini2440 Development board (Samsung S3C2440 ARM9 (armv4t) processor).
However, I ended up simply downloading .deb packages and required
headers for OpenGL.

I have successfully compiled and run OpenGL
apps from 'demos' directory in Qt-4.6 for my native processor
(i686-pc-linux) straight out of the box. However, when I attempt to
compile for arm-linux-gnueabi Qt cannot find the required header files
(GL.h, EGL.h, etc.).

So, I went to Khronos and downloaded a bunch of header files.


root@swspc061:/opt/src/usr/include# ll
total 4
drwxr-xr-x 5 root root 4096 2009-12-01 09:02 GL


root@swspc061:/opt/src/usr/include# ll GL/EGL/egl
eglext.h egl.h eglplatform.h
root@swspc061:/opt/src/usr/include# ll GL/EGL/*
-rw-r--r-- 1 root root 3958 2009-12-01 08:52 GL/EGL/eglplatform.h
-rw-r--r-- 1 root root 371 2009-12-01 08:52 GL/EGL/egl.h
-rw-r--r-- 1 root root 8443 2009-12-01 08:52 GL/EGL/eglext.h


root@swspc061:/opt/src/usr/include# ll GL/GLES/*
-rw-r--r-- 1 root root 904 2009-12-01 08:52 GL/GLES/glplatform.h
-rw-r--r-- 1 root root 34296 2009-12-01 08:52 GL/GLES/gl.h
-rw-r--r-- 1 root root 44574 2009-12-01 08:52 GL/GLES/glext.h


root@swspc061:/opt/src/usr/include# ll GL/KHR/*
-rw-r--r-- 1 root root 9599 2009-12-01 08:52 GL/KHR/khrplatform.h

So that is where I placed all the files downloaded from Khronos.

Next, I downloaded the Debian ARM Lenny packages:

libgl1-mesa-dri (7.0.3-7)
A free implementation of the OpenGL API -- DRI modules
libgl1-mesa-glx (7.0.3-7)
A free implementation of the OpenGL API -- GLX runtime
libgl1-mesa-swx11 (7.0.3-7)
A free implementation of the OpenGL API -- runtime

I extracted the data files from the .deb packages:


root@swspc061:/opt/src/usr# ll lib/
total 3040
-rw-r--r-- 1 root root 2627020 2008-12-14 11:46 libGL.so.1.5.070004
-rw-r--r-- 1 root root 467500 2008-12-14 16:46 libGL.so.1.2
drwxr-xr-x 2 root root 4096 2008-12-14 16:46 dri
lrwxrwxrwx 1 root root 19 2009-12-01 08:33 libGL.so.1 -> libGL.so.1.5.070004


root@swspc061:/opt/src/usr# ll lib/dri/
total 21264
-rw-r--r-- 1 root root 2179680 2008-12-14 16:46 savage_dri.so
-rw-r--r-- 1 root root 2120936 2008-12-14 16:46 s3v_dri.so
-rw-r--r-- 1 root root 2125504 2008-12-14 16:46 r128_dri.so
-rw-r--r-- 1 root root 2216680 2008-12-14 16:46 mach64_dri.so
-rw-r--r-- 1 root root 2064988 2008-12-14 16:46 trident_dri.so
-rw-r--r-- 1 root root 2189028 2008-12-14 16:46 tdfx_dri.so
-rw-r--r-- 1 root root 2193816 2008-12-14 16:46 radeon_dri.so
-rw-r--r-- 1 root root 2246152 2008-12-14 16:46 mga_dri.so
-rw-r--r-- 1 root root 2147700 2008-12-14 16:46 r300_dri.so
-rw-r--r-- 1 root root 2228188 2008-12-14 16:46 r200_dri.so

I have set the following environment variables:


QMAKE_INCDIR_OPENGL = /opt/src/usr/include/GL
QMAKE_LIBDIR_OPENGL = /opt/src/usr/lib
QMAKE_LIBS_OPENGL = /opt/src/usr/lib

Which is where I extracted the files, yet I still am receiving:


root@swspc061:/opt/src/qt-everywhere-opensource-src-4.6.0-rc1# ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /opt/arm-mini2440-working/qt-453 -qt-mouse-tslib -opengl -little-endian -I /opt/src/usr/lib/ -I /opt/src/usr/lib/dri/ -I /opt/src/usr/include/
Which edition of Qt do you want to use ?

Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.


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

This is the Qt for Embedded Linux Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license? yes

Creating qmake. Please wait...
make: Nothing to be done for `first'.
All the OpenGL ES functionality tests failed!
You might need to modify the include and library search paths by editing

am completely lost. How do I set the above mentioned environment
variables correctly, which libs/includes are required, and what else am
I doing wrong!?

Please, any advice would be greatly appreciated.
I have searched high and low and it seems nobody else is doing this. I
highly doubt that is the case; perhaps I am just looking in all the
wrong places!

12-01-2009, 05:39 PM
From my gcc/Linux knowledge (which may or may not apply to your embedded tools) -- What if you change your configure line from

./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /opt/arm-mini2440-working/qt-453 -qt-mouse-tslib -opengl -little-endian -I /opt/src/usr/lib/ -I /opt/src/usr/lib/dri/ -I /opt/src/usr/include/


env CPPFLAGS="-I/opt/src/usr/lib/ -I/opt/src/usr/lib/dri/ -I/opt/src/usr/include/ -I/opt/src/usr/include/GL" LDFLAGS="-L/opt/src/usr/lib" ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /opt/arm-mini2440-working/qt-453 -qt-mouse-tslib -opengl -little-endian

Note, there is no space between the -I and the /paths/to/include/folders

Or use export (depends on which shell you are using though)

export QMAKE_INCDIR_OPENGL="/opt/src/usr/include/GL"
export QMAKE_LIBDIR_OPENGL="/opt/src/usr/lib"
export QMAKE_LIBS_OPENGL="/opt/src/usr/lib"
then run your configure command