[Solved]Cross compile Qt5.4.1 for olimex a20

Started by Gokul Dhanwate, May 25, 2015, 04:42:58 PM

Previous topic - Next topic

Gokul Dhanwate

Hello,
I am cross compiling qt5.4.1 for olimex a20 4gb.I am following guide lines in bellow link
http://wiki.qt.io/QT-Compilation-OLIMEX

1 ./configure - successful
2.make - getting following error

.obj/qprocess_unix.o: In function `QProcessManager::run()':
qprocess_unix.cpp:(.text+0x712): undefined reference to `__fdelt_chk'
.obj/qprocess_unix.o: In function `QProcessPrivate::waitForStarted(int)':
qprocess_unix.cpp:(.text+0x121c): undefined reference to `__fdelt_chk'
.obj/qprocess_unix.o: In function `QProcessPrivate::waitForReadyRead(int)':
qprocess_unix.cpp:(.text+0x132a): undefined reference to `__fdelt_chk'
qprocess_unix.cpp:(.text+0x136e): undefined reference to `__fdelt_chk'
qprocess_unix.cpp:(.text+0x13a0): undefined reference to `__fdelt_chk'
.obj/qprocess_unix.o:qprocess_unix.cpp:(.text+0x13de): more undefined references to `__fdelt_chk' follow
collect2: error: ld returned 1 exit status
make[2]: *** [../../lib/libQt5Core.so.5.4.1] Error 1
make[2]: Leaving directory `/usr/local/qt-everywhere-opensource-src-5.4.1/qtbase/src/corelib'
make[1]: *** [sub-corelib-make_first] Error 2
make[1]: Leaving directory `/usr/local/qt-everywhere-opensource-src-5.4.1/qtbase/src'
make: *** [sub-src-make_first] Error 2


please tell me where I am doing wrong

thanks

Gerrit

 undefined reference to `__fdelt_chk'

If you get that error,believe you need to have glibc 2.15 or higher

Gokul Dhanwate

Hi Gerrit
Thank you for reply!

But my glibc version is glibc 2.19

I checked it using following command

# ldd --version
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Does I exactly need 2.15?

Gerrit

Quote# ldd --version

the command is right, but you have to do it on the A20 itself

Gokul Dhanwate

Hi Gerrit,

Thank you very much for support!

when I am running this command on a20,the output is

# ldd --version
ldd (Debian EGLIBC 2.13-38) 2.13
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

It is showing 2.13 version

How can I update it to newer?

Gerrit

updating GLIBC is not without risks, it is possible that some program stop working, maybe first look around for an image that comes with a more recent GLIBC like this one https://olimex.wordpress.com/2013/10/15/unofficial-ubuntu-13-04-image-with-mali-3d-drivers-for-a20-olinuxino/

Gokul Dhanwate

Gerrit thanks again!

I managed to update glibc

But this time I am getting following error when I make

arm-linux-gnueabihf/libfreetype.a(ftinit.o): relocation R_ARM_THM_MOVW_ABS_NC against `tt_driver_class' can not be used when making a shared object; recompile with -fPIC
/mnt/a20/usr/lib/arm-linux-gnueabihf/libfreetype.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[4]: *** [../../../../plugins/platforms/libqoffscreen.so] Error 1


Any idea about this?

Gerrit

Quoterecompile with -fPIC

I guess that could be a solution, try to add this to the compiler options somewhere

AzHofi

Hi guys,
is there anyone onboard, who tried this new "boot to qt" feature on a20? Is it possible/supported?

Gokul Dhanwate

Thanks Gerrit,

Finally I am successful in cross compiling qt for a20.
That was a problem related to shared and static libraries.
And solution is http://stackoverflow.com/questions/19894541/libm-relocation-error-when-building-qt-5-for-nitrogen6x

Gokul Dhanwate

Hi

I have done everything,but when I deploy qt application on a20,I am getting following error

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
EGL Error : Could not create the egl surface: error = 0x300b

bash: line 1:  4187 Aborted                 DISPLAY=':0.0' /opt/qt/hello_qt
Application finished with exit code 134.


Any idea about this?

thanks

Gerrit

QuoteAny idea about this?

http://community.arm.com/message/13101

http://linhttp://linux-sunxi.org/Qt5_For_Mali_Binariesux-sunxi.org/Qt5_For_Mali_Binaries