ICU binary compatibility

Hello Xojo developers,

there is something wrong with the way Xojo uses icu.

In your blog (http://blog.xojo.com/2015/04/27/linux_libicu_and_xojo_2015_release_2/) you say ‘This noticably reduces the size of built apps on Linux and allows security (and other) updates for ICU to be managed by the system. This is really the proper way to do things for Linux system libraries.’

This might be true, but if you want customers to provide their own version of libicu, you must build Xojo and applications generated by Xojo with a stable ABI. The icu homepage (See: http://userguide.icu-project.org/design) is pretty clear about that:

[quote]Here are the requirements for enabling binary compatibility for ICU4C:

  1. Applications must use only APIs that are marked as stable.
  2. Applications must use only plain C APIs, never C++.
  3. ICU must be built with function renaming disabled.
  4. Applications must be built using an ICU that was configured for binary compatibility.
  5. Use ICU version 3.0 or later.[/quote]

and a few lines below:

But that’s not what Xojo does, right?

As far as I can see, applications build by Xojo run only on Linux versions which ship libicu compiled WITHOUT “–disable-renamimg” (like Debian or Red Hat).
They do NOT run on distributions which ship libicu compiled WITH “–disable-renamimg”. People running Xojo applications on the latter distributions usually receive error messages like:

[quote]Runtime Error
Please report what caused this error along with the information below.
RuntimeCore/ICUStable.cpp: 148
Failure Condition: functionPtr
Could not resolve u_strFromUTF8[/quote]

As far as I can see, you have three options:

  1. You continue to use libicu WITHOUT “–disable-renaming”. In this case, Xojo applications will run only on Linux distributions that ship libicu build WITHOUT “–-disable-renaming”. And they will run safely only if your customers have installed exactly the same version of libicu that you have. Applications created by Xojo may also run if customers have a different version of libicu, but this is risky - because ABI compatibility is not guaranteed. Strange things may happen.
  2. You switch to release-to-release binary compatibility (this is what icu programmers seem to recommend). But your binaries probably won’t run on Debian or Red Hat (I didn’t test that).
  3. You realize that neither option 1 nor 2 is optimal. A solution might be that you ship a compatible version of libicu with applications built with Xojo.

Following

[quote=268598:@Michael Hofmann]Hello Xojo developers,

there is something wrong with the way Xojo uses icu.[/quote]

Thanks for mentioning this. Offhand I agree with your assessment and will look further into it after the long weekend.

Hello,

I See your Point. And that should be Adressed. I have just one Question?

Which Linux Distributions are that with the Correct Compiled libicu’s?

I tried many. Never had any Problem. (Some even now in VMs to test the Apps)

  • Debian
  • Ubuntu
  • Linux Mint
  • CentOS (RHEL)
  • OpenSUSE
  • Arch (Manjaro, Antergos)

Heck even bananian Linux (Debian) for the BananaPi never gives me Problems with my Xojo Apps. (An in some i use the “Text”-Type, so use ICU)
(Even if i had Problems with Xojo on Manjaro sometimes, that had nothing to do with ICU)

The Only Linux Distri i haven’t tried is Gentoo or LinuxFromScratch - never could get my self to work the Installation routines…

[quote=268611:RenLandscheidt]
Which Linux Distributions are that with the Correct Compiled libicu’s?[/quote]

Gentoo Linux ships libicu compiled WITH “–disable-renaming”.

There were long discussions on the mailing lists of other distributions:
Red Hat: https://bugzilla.redhat.com/show_bug.cgi?id=856594
Debian: https://sourceforge.net/p/icu/mailman/message/19691869/

The situation is messy. Of course it would be best if all Linux distributions could switch to a libicu compiled WITH “–disable-renaming”. But this is not going to happen. For that reason, the only solution for independent application providers is probably to ship their own version of libicu…