Problem in dynamically loading libraries (QT5 on AM335x board)

315 views
Skip to first unread message

mori...@gmail.com

unread,
Apr 2, 2014, 10:05:09 AM4/2/14
to beagl...@googlegroups.com

Hello everybody,
I've cross compiled QT5.2.1 with ICU support for TI AM335x (not exactly a Beagleboard but much similar).

Now I am doing some tests, but I am not able to execute any program built against the cross-compiled QT. Any program (even the simples console-based "Hello, world" exits with code 1 just at the startup and does not produce any output).

If a perform a "strace" of my program I have the output that you can read at the following address: https://onedrive.live.com/redir?resid=DCB987547568DE13!107&authkey=!ANC7D8Zh7ZfGz4w&ithint=file,.log

The problem seems to be something wrong just after loading libicudata.so.52 library... exit_group(1) is being called somewhere... but who is calling it? How can I discover that?

Can somebody help me? Thanks for your support!

Thiago Marques

unread,
Apr 3, 2014, 9:00:35 AM4/3/14
to beagl...@googlegroups.com
Hi Morix Dev,

   I had a similar problem. Do you find out what was causing this error? Qt AM335x application exits with code 1 at startup.
Tḧanks,

Best regards ,

Morix Dev

unread,
Apr 3, 2014, 9:17:08 AM4/3/14
to beagl...@googlegroups.com
Hi Thiago,
I haven't found a solution yet... I am still working on it... now I am suspecting that is something related to compiler optimization flags when compiling QT...

I'll let you know if I find a useful solution... but hey: please do not hesitate to write here if you found a valid solution too! :)

Thanks & regards.
/Morix

Morix Dev

unread,
Apr 3, 2014, 9:28:37 AM4/3/14
to beagl...@googlegroups.com
Thiago,
just to narrow down the problem... can you tell me how you cross-compiled QT? I mean can you tell me which flags have you put on your "./configure" command line and what is the content of your "qtbase/mkspecs/<your-architecture>/qmake.conf"?

Thanks,
/Morix

Morix Dev

unread,
Apr 8, 2014, 4:33:11 AM4/8/14
to beagl...@googlegroups.com
Hello,
I found the solution: the problem is due to ICU which cannot (don't know why) dynamically load its data at runtime from libicudata.so.52.

I recompiled ICU for packaging data in standard file (instead of shared library) and now it works fine!

You can review the full story here and here.

/Morix

Thiago Marques

unread,
Apr 8, 2014, 7:53:43 AM4/8/14
to beagl...@googlegroups.com
Hi,
 Thanks, sorry for the delay to respond, it's because I was in another project. Today I will try to compile the ICU again.
   My "./configure" command line is:
./configure -prefix /opt/qt5 -debug-and-release -make libs -xplatform linux-arm-gnueabi-g++ -opengl es2 -confirm-license -opensource -icu -no-xcb -no-pch -make examples -verbose -shared -plugin-sql-sqlite -qt-zlib -no-cups -qt-libpng -qt-libjpeg

I apply this path that I made: patch_qt5_1_1__1.0
I copied the include to my filesystem. 


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/-BY4H6RC8W4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
   Thiago Marques.

Link - Plataforma Lattes: http://lattes.cnpq.br/1955476621748054

phone : +55 (61) 8274-9140 
            +55 (61) 3032-4506
patch_qt5_1_1__1.0

Thiago Marques

unread,
Apr 10, 2014, 9:47:04 AM4/10/14
to beagl...@googlegroups.com
Hi Morix,
   I recompiled QT5 no ICU and it works. I need the ICU, so I recompile the ICU. If I compile for static library works, but if I compile to static library does not work, still the same error that you mentioned. I'm cross compiling this way:

$ export CC=arm-linux-gnueabihf-gcc
$ export CXX=arm-linux-gnueabihf-g++
$ export AR=arm-linux-gnueabihf-ar
$ export RANLIB=arm-linux-gnueabihf-ranlib
$ export CFLAGS="-pipe -O2 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
$ export CPPFLAGS=$CFLAGS

$ export ICU_FLAGS="-I/mnt/lhome/am335x/libs_apps/libicu/icu/source/common/ -I/mnt/lhome/am335x/libs_apps/libicu/icu/source/tools/tzcode/"

$ export LDFLAGS="-Wl,-rpath-link=/usr/local/ti-sdk-am335x-evm/linux-devkit/filesystem/lib -L/usr/local/ti-sdk-am335x-evm/linux-devkit/filesystem/lib -Wl,-rpath-link=/usr/local/ti-sdk-am335x-evm/linux-devkit/filesystem/usr/lib -L/usr/local/ti-sdk-am335x-evm/linux-devkit/filesystem/usr/lib"

$ sh /mnt/lhome/am335x/libs_apps/libicu/icu/source/configure --host=arm-linux-gnueabihf --prefix=/opt/icu --disable-samples --disable-tests --with-cross-build=/mnt/lhome/am335x/libs_apps/libicu/icu_pc

$ make -j 4
$ make install

I see your post but don't work. Did you only recompile ICU arm? 



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/-BY4H6RC8W4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Morix Dev

unread,
Apr 10, 2014, 10:13:53 AM4/10/14
to beagl...@googlegroups.com
Hello Thiago,
yes I just recompiled only ICU for ARM specifying the option "--with-data-packaging=files" on configure command line... have you tried to do that?

Thiago Marques

unread,
Apr 10, 2014, 10:19:41 AM4/10/14
to beagl...@googlegroups.com
Thanks. It works fine.


2014-04-10 11:13 GMT-03:00 Morix Dev <mori...@gmail.com>:
Hello Thiago,
yes I just recompiled only ICU for ARM specifying the option "--with-data-packaging=files" on configure command line... have you tried to do that?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/-BY4H6RC8W4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages