[Releasing] ICU support in QtCore and QtWebKit

Thiago Macieira thiago.macieira at intel.com
Tue Sep 11 12:25:02 CEST 2012


tl;dr:

Let's include our own copy of ICU in the binary packages

Long story:

As far as I know, the major reason why we need distribution version-specific 
packages for Qt 5, unlike in Qt 4, is the need for ICU support. As some of you 
may know, the ICU developers attended the "OpenSSL School of Library Naming" 
with "Advanced Boost Naming 101" and haven't learned yet to make library 
releases.

I've prepared two sets of patches for QtCore that enable it to dynamically 
load ICU, at run-time. Unlike D-Bus and OpenSSL dynamic loading, this has the 
following properties:
 a) it's loaded at library load time, not at first use
 b) there's no graceful fallback when the libraries are absent

The reason for a) is that the load process itself requires ICU, due to 
recursion via QString::fromLocal8Bit / toLocal8Bit. Therefore, I had to run it 
at a time when we're absolutely sure that no other threads could call those 
functions.

The reason for b) is that we don't compile code for the fallback case. I'm not 
expert enough in this area to make that fallback easily. Besides, since this 
option is to be used *only* for the SDK, it's quite likely it would bit-rot 
between releases and just cause us headaches because they don't get tested on 
a day-to-day basis.

Add another issue: WebKit. It uses ICU extensively and its buildsystem would 
need to be modified to use the loader in QtCore. Or, to copy the loader into it 
like the one we'd have in QtCore. Some of the changes might not be acceptable 
for WebKit mainstream, requiring our team to keep branches.

None of those options are particularly palatable.

Therefore I suggest an alternative: let's just bundle the ICU libraries in our 
SDKs. 

There are two choices:
 I) build ICU during the binary build process, alongside the rest of Qt
 II) pre-build ICU and keep a binary copy ready to be deployed into the build 
process

Is there anyone volunteering for that task? ICU seems to have the options for 
inserting a suffix to the functions and library names, which we'll need on Linux 
and on Mac. I don't think we need it on Windows.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden



More information about the Releasing mailing list