This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Cross-compiled ICU4C does not work (all applications exit with code "1")

I cross compiled ICU4C version 52.1 (http://site.icu-project.org) for TI AM335x Starter Kit board using the toolchain provided by TI (SDK 6.00.00); my development machine is Ubuntu 12.04 LTS 32-bit.

The problem is that when I deploy the library to my target platform and launch any tool (like icuinfo or even any application which rely on ICU, e.g. a QT application) then it exits with code 1 (and no output is produced). If I strace the command, I obtain the output you can find here.

In other words, it seems that somebody is calling exit_group(1) after having loaded libicudata.so.52.

But why? How can I fix the problem?


Just for reference, here is how I cross-compiled ICU (maybe I've made some mistakes?):

1) first of all I compiled ICU for my development machine:

./configure --host=arm-linux-gnueabihf --prefix=/opt/icu
  --disable-samples --disable-tests --with-cross-build=/opt/icupc

followed by:

make && make install

2) then I cross-compiled ICU: I've set my environment variables AR, CC, CFLAGS, LDFLAGS, LIBS, CPPFLAGS, CXX, CXXFLAGS, CPP for pointing to my cross-compiling toolchain and then:

./configure --host=arm-linux-gnueabihf --prefix=/opt/icu
  --with-cross-build=/home/morix/devel/icupc/source

followed by:

make && make install

3) at the end I copied the content of /opt/icu to my target platform and I've tried to run icuinfo, with no luck (as previously described).

  • Morix, please note that the ICU package is a third party product which is not included in the Sitara Linux SDK and this is really a generic Linux question. This forum is for Sitara hardware and Sitara Linux SDK related questions.

    There is a generic Linux forum, where you may ask your question: http://e2e.ti.com/support/embedded/linux/f/354.aspx

    A quick web search shows some people suggesting to pass "--enable-shared=yes" command line argument when configuring ICU. You can try that.

    Best regards,
    Miroslav

  • Hi Miroslav,
    you are right: ICU is not part of Sitara SDK, but consider that I am perfectly able to compile ICU on standard linux (e.g. my machine running Ubuntu): it compiles and works fine... the problem occurs only on AM335x so I thought that this was the right place to ask for... since I think it is something related to the toolchain, too.

    If I was wrong then I apologize for my abuse.

    Anyway I am going to try your suggestion and I'll key you informed about that.

    Thanks again & regards.
    /Morix

  • Miroslav,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.

    Regards,
    /Morix