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


I am experiencing a problem with ICU4C version 52.

I cross compiled it for TI AM335x 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 <a href="https://onedrive.live.com/?cid=dcb987547568de13&id=DCB987547568DE13!108&ithint=file,.log&authkey=!AEZgEeISWwoMjs8" rel="nofollow">here</a>.

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?

<hr />

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).


I found the solution or at least a workaround.

For a reason that I could not determine, ICU fails to load its data (embedded in libicudata.so.52) at startup (when cross-compiled for ARM using <em>Linaro GCC toolchain</em>).

Digging into ICU documentation I discovered that I could compile ICU to package data in different ways, and I decided to package them in standard files. The configuration of ICU cross-compilation is done this way:

./configure --host=arm-linux-gnueabihf --prefix=/opt/icu --disable-samples --disable-tests --with-cross-build=/home/morix/devel/icupc/source --with-data-packaging=files

At run-time I have then to set my environment variable ICU_DATA to point to the data folders (which in my case is /opt/icu/share/icu/52.1) and the magic is done: ICU runs fine (icuinfo tool terminates with ICU Initialization returned: U_ZERO_ERROR which indicates success).


  • Cross-compiled ICU4C does not work (all applications exit with code “1”)
  • Why does Perl's two arg open seem to strip newlines?
  • Problem with an expect script
  • Alamofire timeout not working in Swift 3
  • sql data type bit
  • Sum each column for a table with over 20 columns without writing out each sum
  • How to obtain dynamic google map url of a specific map (I have static map url)
  • Running bash in subprocess breaks stdout of tty if interrupted while waiting on `read -s`?
  • How to copy a Shape to another worksheet (not as a picture)?
  • Restrict method filter with multiple date condition
  • Android NFC read Tags issue. Activity starts each time on data received
  • openssl handshake failed
  • How to resolve docker host names (/etc/hosts) in containers
  • Interpreting STRACE output - pipes and forks
  • How do I retrieve the user information of a user authenticated with Apache's mod_ldap?
  • using System.Speech.Synthesis with Windows10 universal app (XAML-C#)
  • GAE: Way to get reference to an HttpSession from its ID?
  • Spring boot 2.0.0.M4 required a bean named 'entityManagerFactory' that could not be found
  • How do I configure context broker accept post requests from my remote sensor?
  • What is the purpose of TaskExecutor in spring?
  • Ajax Loaded meta Tags
  • swift auto completion not working in Xcode6-Beta
  • Bug in WPF DataGrid
  • TFS: Get latest causes slow project reloading
  • Javascript Callbacks with Object constructor
  • How to make Safari send if-modified-since header?
  • File upload with ng-file-upload throwing error
  • Free memory of cv::Mat loaded using FileStorage API
  • Memory offsets in inline assembly
  • Java static initializers and reflection
  • need help with bizarre java.net.HttpURLConnection behavior
  • How to get NHibernate ISession to cache entity not retrieved by primary key