September 14, 2010

almagest almagest
Lab Rat
40 posts

Need help compiling Qt for embedded device (i.mx51 evk)

Page  
1

Hello.

Im trying to compile qt for an embedded device, the freescale i.mx51 EVK.

I’ve been following this guide [imxdev.org], and have succeeded in compiling (and running) qt for X11 (i use ubuntu 10.04) and the Qvfb.

Where i fail, and sorely need assistance, is when i try to compile for the embedded device. The error i receive when i configure is;

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
/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-mxc-g++.*

I used the following configuration;
./configure -embedded arm -xplatform qws/linux-mxc-g++ -release -prefix /usr/local/Trolltech/Qt-target-version -qt-gfx-linuxfb -qt-kbd-tty -qt-mouse-tslib -opengl es2 -little-endian -host-little-endian

I have checked the qmake.conf at this location, and doublechecked that the corresponding include, and library-files are at their respective places.

Excerpt from qmake.conf;
QMAKE_INCDIR_EGL = /tftpboot/ltib/usr/include/EGL
QMAKE_LIBDIR_EGL = /tftpboot/ltib/usr/lib
QMAKE_LIBS_EGL = -lEGL

If anyone could aid, it would be very appreciated. Ive been trying to fix this problem for the last three days.

Thanks for your time.
-almagest

26 replies

September 14, 2010

ngrosjean ngrosjean
Lab Rat
35 posts

Could you give us the last output lines of your ./configure commands, (one or two just before the error message)?

September 14, 2010

almagest almagest
Lab Rat
40 posts

Hi!
And thanks for helping!

g++ -c -o qxmlutils.o -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/include -I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/include/QtCore -I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/src/corelib/global -I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/src/corelib/xml -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-x86-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/src/corelib/xml/qxmlutils.cpp
g++ -o “/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/bin/qmake” project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o
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 /home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-mxc-g++.

Id be happy to supply more information if needed.
-a

September 14, 2010

ngrosjean ngrosjean
Lab Rat
35 posts

Hmmm… just some suggestions :

Did you have the libgl-dev package installed?

Did you try to compile without opengl option?

Did you try to compile with only -opengl

Did you try to compile with other options like -opengl es1cl

September 16, 2010

almagest almagest
Lab Rat
40 posts

Hello again. Thanks for replies.

Did you have the libgl-dev package installed?
Did you try to compile without opengl option?
Did you try to compile with only -opengl
Did you try to compile with other options like -opengl es1cl

I have the libgl-dev package.
Tried compiling without the opengl option (same .configure-line but omit “-opengl es2”) results in tslib functionality failed, (the standard jabber) .. include and library.. QMAKE_INCDIR and QMAKE_LIBDIR.
Compiling with only -opengl gives same error as original post.
Compiling with -opengl es1cl also gives errors as the original post.

However, i did notice an error (or warning – not sure) message in the beginning of all configuration variants;

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

Meanwhile i continue hunting the solution on the web.

- almagest

October 4, 2010

almagest almagest
Lab Rat
40 posts

Im still struggling with these errors.

I have made a symbolic link to the path of my rootfs (for the target embedded device). This is to make the needed includes and libraries available to Qmake.

It seems as if qmake does not find these files. The files and headers are all there (tslib, opengl etc.), and according to the howto i followed (se first post) the symbolic link should solve this.

- almagest

October 4, 2010

ngrosjean ngrosjean
Lab Rat
35 posts

Not easy to solve this problem, but note that you put some variable QMAKE???EGL on your qmake.conf but if I look on your “g++ -c -o qxmlutils.o -pipe -DQ…” command line, I don’t see any of your EGL data…

So here are some ideas:

  • Are you sure you read the right qmake.conf?
  • re-compile your qt lib, then when its fails, try to re-launch the “g++ -c -o qxmlutils.o -pipe -DQ…” command alone on the right directory, with adding the “-L…” and/or “-I…” you suppose to be neccessary.

October 12, 2010

almagest almagest
Lab Rat
40 posts

Hello again.

I’ve had some time to attack this problem further.
I decided to go for the -no-opengl option, to tackle one problem at the time.

Are you sure you read the right qmake.conf?

Im certain i read the right qmake.conf. I received a warning (QMAKE_LFLAGS_RPATH stuff) with full path that verified the qmake in question.

I still get the following error;

The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in/home/ael/Downloads/qtimx/qt-everywhere-opensource-src-4.7.0/mkspecs/qws/linux-mxc-g++

But think i can rule out the problem with compilation since the touchscreen binaries works on the target hw.

re-compile your qt lib, then when its fails, try to re-launch the “g++ -c -o qxmlutils.o -pipe -DQ…” command alone on the right directory, with adding the ”-L…” and/or ”-I…” you suppose to be neccessary.

I started reading the executed command really thoroughly when i came over this detail;

-I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-x86-g++

which really does not make sense, since i am compiling for arm architecture and have specified all my paths in ../qws/linux-mxc-g++.

Im just guessing here, but could this be the root of my problem?

Thanks for your time.
A.

October 12, 2010

ngrosjean ngrosjean
Lab Rat
35 posts

Ah! A quick short idea (I’ve no time now) You need to export some data like :

  1. # export ARCH=arm
  2. # export CROSS_COMPILE=yourCompiler(arm-none-linux-gnueabi?)

I hope it’s help.

By the way, you should google for “qt export ARCH=arm”

October 21, 2010

almagest almagest
Lab Rat
40 posts

The problem was resolved by crosscompiling tslib from scratch. If i remember correctly, i also set CROSS_COMPILE=arm-none-linux-gnueabi . The opengl es error was due to an unreadable library. Found another one in another bsp-package. (not related to qt at all).

If any one wants more detail regarding any of this, ill answer to the best of my knowledge.
Dont hesitate to send me an email.

And finally, thanks ngrosjean, for all the time invested. – You made a difference. – a.

November 17, 2010

yli_net yli_net
Lab Rat
1 posts

I got same problem with a mips platform, why tslib is related to opengl qt build?
Do you still need to specify the QMAKE_INCDIR and QMAKE_LIBDIR in the qmake.conf file? where is your opengl header/lib stored anyway, in the target rfs or in the host machine.

Thanks

November 17, 2010

almagest almagest
Lab Rat
40 posts

Its guess its related since Qt on Embedded devices has its own window manager (qws), and many devices take input from the touchscreen.
Yes, you still have to specify where the include and lib-files are, since they might be different from the host architecture. In my case, i had the rootfs on the host machine, in a directory named /tftp/rootfs/ where the usr/include and usr/lib resided. ( ex. /tftp/rootfs/usr/lib )

I think its nicely explained here;
Qt Tslib [doc.trolltech.com]

Hopefully that answered some of your questions.

I have one though, what is your issue? tslib, opengl, or both?

Regards
almagest

January 25, 2011

bonil bonil
Lab Rat
2 posts

I’ve been having similar compile problem with tslib:

The tslib functionality test failed!

I’ve tried the solution of almagest:

1 # export ARCH=arm
2 # export CROSS_COMPILE=yourCompiler(arm-none-linux-gnueabi?)

by setting these variable in the terminal and then restart the compile of qt for the target (imx51 evk) but the problem is still there.

Am I doing something wrong? Do I have to install tslib-dev library on my host?

If anyone could aid, it would be very appreciated. I’ve been trying to fix this problem for the last days.

Thank you for your time.
bonil

P.S.: I’ll post more details later

January 25, 2011

Volker Volker
Ant Farmer
5428 posts

As a general rule of thumb:
If you compile things you almost always want the dev-packages of the libs used on your machine. They usually provide the header files, which are needed in the include parts of the sources, and debug symbols (that may help later on).

PS: I have no clue about Qt @ embedded, that’s just a general rule to follow.

February 3, 2011

bonil bonil
Lab Rat
2 posts

Probably I found out the problem:

QMAKE_INCDIR_OPENGL = /tftpboot/ltib/usr/include/GL

  1. $ ls /tftpboot/ltib/usr/include/GL
  2. $ ls: cannot access /tftpboot/ltib/usr/include/GL: No such file or directory

but the /GL folder does not exist.

how do I have to build my LTIB? Do I have to compile it with FSL Gnome?

Can somebody help me?

February 8, 2011

sanjay1758 sanjay1758
Lab Rat
2 posts

hi, i’m using i.mx51 with ubuntu 10.04

I have qt-everywhere-opensource-src-4.6.0.tar.gz and trying to install QT for my target i.MX51 evk.

I hav done my configuration successfully and i’m getting errors while executing make command.

the configuration command i had given is :
$ ./configure -embedded arm -xplatform qws/linux-mxc-g++ -release -prefix /usr/local/Trolltech/Qt-target-version -qt-gfx-linuxfb -qt-kbd-tty -qt-mouse-pc -webkit -exceptions -verbose -little-endian -host-little-endian

i had left openGL and tslib because i’m also getting errors with them related to “ qmake.conf “ file and my application doesn’t need those packages.

the error i’m getting while executing make command is:
—————————————————-

/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find -lglib-2.0
collect2: ld returned 1 exit status
make1: *** [../../lib/libQtCore.so.4.6.0] Error 1
make1: Leaving directory `/home/ubuntu10/qt-src-4.6.0/qt-target/src/corelib’
make: *** [sub-corelib-make_default-ordered] Error 2

————————————————————————

Please help me in solving this …..
i hav been trying this from the last 10 days but i’m unable to crack these errors.

if you know the compilation along with openGl ,es2, tslib,openssl then please help me in resolving those errors also….
——————————————————————————
if possible usend me your qmake.conf file
—————————————————————————————

Page  
1

  ‹‹ [Solved] After compiling I have no /include/QtDesigner, Why?      Compile Errors Building Qt 4.6.3 With VS2008 For Windows x86_64 platforms ››

You must log in to post a reply. Not a member yet? Register here!