Problem in dynamically loading libraries (QT5 on AM335x board)

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!

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 ,

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! :slight_smile:

Thanks & regards.
/Morix

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//qmake.conf”?

Thanks,
/Morix

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

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.
<https://github.com/prabindh/qt-configs/tree/master/qt5_1.0_Aug13>

patch_qt5_1_1__1.0 (19.8 KB)

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?

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?

Thanks. It works fine.