Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed

OK - I am at wit’s end with this one.

I
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.

Code:

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#

Code:

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

Code:

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

Code:

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:

Code:

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

Code:

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:

Code:

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:

Code:

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.

o

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
dependencies

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
QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
/opt/src/qt-everywhere-opensource-src-4.6.0-rc1/mkspecs/qws/linux-arm-g++.

I
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!

Trying to cross-compile for ARM9 (armv4t) Samsung S3C2440 processor on FriendyArm mini2440.

Have Qt453 installed and can run demos, including FluidLauncher, but I require OpenGL for certain apps.

Configure:
Code:

./configure -xplatform qws/linux-arm-g++ -embedded arm -opengl es1 -prefix /opt/arm-mini2440-working/qt-453 -qt-mouse-tslib -little-endian -v

EGL (EGL/egl.h) auto-detection… ()
arm-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -I…/…/…/mkspecs/qws/linux-arm-g++ -I. -I…/…/…/…/usr/include/GL -I/opt/src/tslib-build/include -o egl.o egl.cpp
egl.cpp: In function ‘int main(int, char**)’:
egl.cpp:46: error: ‘EGLint’ was not declared in this scope
egl.cpp:46: error: expected ;' before ‘x’ egl.cpp:47: error: ‘EGLDisplay’ was not declared in this scope egl.cpp:47: error: expected;’ before ‘dpy’
egl.cpp:48: error: ‘EGLContext’ was not declared in this scope
egl.cpp:48: error: expected ;' before ‘ctx’ egl.cpp:49: error: ‘dpy’ was not declared in this scope egl.cpp:49: error: ‘ctx’ was not declared in this scope egl.cpp:49: error: ‘eglDestroyContext’ was not declared in this scope make: *** [egl.o] Error 1 EGL (EGL/egl.h) disabled. EGL (GLES/egl.h) auto-detection... () arm-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I../../../../usr/include/GL -I/opt/src/tslib-build/include -o egl4gles1.o egl4gles1.cpp egl4gles1.cpp: In function ‘int main(int, char**)’: egl4gles1.cpp:46: error: ‘EGLint’ was not declared in this scope egl4gles1.cpp:46: error: expected;’ before ‘x’
egl4gles1.cpp:47: error: ‘EGLDisplay’ was not declared in this scope
egl4gles1.cpp:47: error: expected ;' before ‘dpy’ egl4gles1.cpp:48: error: ‘EGLContext’ was not declared in this scope egl4gles1.cpp:48: error: expected;’ before ‘ctx’
egl4gles1.cpp:49: error: ‘dpy’ was not declared in this scope
egl4gles1.cpp:49: error: ‘ctx’ was not declared in this scope
egl4gles1.cpp:49: error: ‘eglDestroyContext’ was not declared in this scope
make: *** [egl4gles1.o] Error 1
EGL (GLES/egl.h) disabled.
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
QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in
/opt/src/qt-everywhere-opensource-src-4.6.0-rc1/mkspecs/qws/linux-arm-g++.

I am confused and need some help on these environment variables, what includes I require and what libs.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.