Issue 54479 - patch to build against system icu-3.4/3.6
Summary: patch to build against system icu-3.4/3.6
Alias: None
Product: utilities
Classification: Unclassified
Component: code (show other issues)
Version: 680m128
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: OOo 2.2
Assignee: ooo
QA Contact: Unknown
Depends on:
Reported: 2005-09-12 09:00 UTC by caolanm
Modified: 2007-01-04 15:01 UTC (History)
4 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

missing patch (12.31 KB, patch)
2005-09-12 12:13 UTC, caolanm
no flags Details | Diff
safer patch (14.09 KB, patch)
2005-09-13 14:58 UTC, caolanm
no flags Details | Diff
FWIW, this is what we have in ooo-build for m135. (13.51 KB, patch)
2005-10-27 16:23 UTC, kendy
no flags Details | Diff
my latest patch for this (14.99 KB, patch)
2006-02-28 12:49 UTC, caolanm
no flags Details | Diff
icu 3.6 patch (18.52 KB, patch)
2006-08-08 12:37 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2005-09-12 09:00:33 UTC
For reference, patch attached for the lunatic fringe to play with linking
against a system icu 3.4. Worked for me (tm).
Comment 1 ooo 2005-09-12 11:26:16 UTC
Hi Caolan,

I'd be fine if the lunatic fringe :-) didn't need any patch, but I doubt a
missing attachment is all they need.. in other words: I guess there should be some.

Comment 2 caolanm 2005-09-12 12:13:50 UTC
Created attachment 29489 [details]
missing patch
Comment 3 ooo 2005-09-12 15:10:37 UTC
Yeah, nice one! If this works for you then it basically also verifies that the
new RulebasedCollator API for a binary collator image actually works similar to
our hacked API of ICU 2.6.
Comment 4 caolanm 2005-09-13 14:58:16 UTC
Created attachment 29529 [details]
safer patch
Comment 5 kendy 2005-09-15 16:35:47 UTC
The patch seems to break the 'internal icu' case for me :-( 
(This is from m129 build, so the line number is shifted a bit thanks to 
SISSL/LGPL -> LGPL conversion.)  
error: no matching function for call to  
`icu_2_6::RuleBasedCollator::RuleBasedCollator(const sal_uInt8*&, int,  
icu_2_6::RuleBasedCollator*&, UErrorCode&)'  
error: candidates are: icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
icu_2_6::Locale&, UErrorCode&)  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator()  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
icu_2_6::UnicodeString&, icu_2_6::Collator::ECollationStrength,  
UColAttributeValue, UErrorCode&)  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
icu_2_6::UnicodeString&, UColAttributeValue, UErrorCode&)  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
icu_2_6::UnicodeString&, icu_2_6::Collator::ECollationStrength, UErrorCode&)  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
uint8_t*, UErrorCode&)  
error:                 icu_2_6::RuleBasedCollator::RuleBasedCollator(const  
icu_2_6::UnicodeString&, UErrorCode&)  
ICECREAM[5556]: Compiled on  
dmake:  Error code 1, while making  
Comment 6 caolanm 2005-09-15 17:00:00 UTC
you got unicode headers in your external solver, and there's icu2_6 names there
so you got a icu 3.6 delivered into your solver somehow. 

They shouldn't have been build/delivered (by the 2nd patch) anyway. grep icu
*/prj/build.lst to make sure they are all ICU:icu and so on, you get the picture. 
Comment 7 rene 2005-09-15 17:22:12 UTC
Isn't it completely normal to have icu_2.6 when you use intermal icu? ;) 
Comment 8 kendy 2005-09-15 17:35:42 UTC
And - that was a clean build... 
Comment 9 caolanm 2005-09-15 17:53:22 UTC
ah, I didn't read kendy properly "The patch seems to break the 'internal icu'
case for me". Yes it breaks the current internal case. It's a trivial matter to
stick an #ifdef SYSTEM_ICU around the diff, propogate the SYSTEM_ICU into the and the usual tedious stuff. Left as an exercise for the reader.
Comment 10 kendy 2005-09-16 09:42:33 UTC
Which I of course successfully completed and fixed it for us this way in  
ooo-build ;)  
But - I have no knowledge wrt. icu, so I thought that there could be a fix that 
works for both without #ifdefs, and wanted to warn you that the patch breaks 
normal build.  Sorry, I did not read properly 'for the lunatic fringe' ;-) 
Comment 11 panbk 2005-10-20 05:24:25 UTC
OOo's own hacks to the icu-2.6 were, apparently, designed to add support for the
following 5 charsets: dz ja km ko ne.

Are we sure, these are not already supported by the ICU itself? Maybe, there is
no need for all this hackery any more?
Comment 12 panbk 2005-10-20 05:34:33 UTC
OOo's own hacks to the icu-2.6 were, apparently, designed to add support for the
following 5 charsets: dz ja km ko ne.

Are we sure, these are not already supported by the ICU itself? Maybe, there is
no need for all this hackery any more?

Cmc! You say, it "worked for you". Have you tried using any of these charsets?
Comment 13 caolanm 2005-10-20 13:45:02 UTC
Not personally, I have a To-Do for out i18n people to test ko and jp, but not
got around to it yet.

FWIW this patch is in the rawhide OOo for testing purposes, and got no
complaints yet. Which doesn't mean much I admit.
Comment 14 panbk 2005-10-24 17:18:19 UTC
The posted patches do not apply cleanly to m135 :-(

Are there any updates?
Comment 15 ooo 2005-10-26 20:13:55 UTC

I don't know where you see Japanese, Korean and Nepali support being patched in,
but Khmer and Tibetan (Dzongkha) are, yes. Khmer was added to ICU 3.4,
Tibetan/Dzongkha hopefully will be added for ICU 3.6

And no, no up-to-date patch for m135 available, if soneone has, please attach it
to this issue.

Comment 16 kendy 2005-10-27 16:23:12 UTC
Created attachment 30927 [details]
FWIW, this is what we have in ooo-build for m135.
Comment 17 caolanm 2005-10-27 16:45:29 UTC
kendy: that will break under some circumstances, the "NULL" passed to the
collator. See my "safer" patch and the use of ucacollator
Comment 18 kendy 2005-10-27 16:59:46 UTC
cmc: Right, sorry, thanks for noticing.  I just took what we had in ooo-build 
and updated it for m135 so that it applied (we still build with the internal 
rene: Do you use the patch?  Could you update it, please? ;-) 
Comment 19 rene 2005-11-01 16:31:22 UTC
kendy: for what? m135? I don't do build for them atm. I stick with ooo-build-2-0
since I need to do OOo 2.0 packaging and fixes for that.

But yes, we saw the crashes, too, see;repeatmerged=no.

I have to admit I am a bit confused about which patch I should use now...
Comment 20 rene 2005-11-01 16:42:59 UTC
ah, I guess I see....
Comment 21 caolanm 2006-02-28 12:49:10 UTC
Created attachment 34511 [details]
my latest patch for this
Comment 22 ooo 2006-04-11 14:32:28 UTC
Hi Karl,

In your 'icuupgrade' CWS, can you please integrate the portions of this patch
that enable building against a system ICU 3.4. You may also want to compare the
approach taken in the patch to adapt the RuleBasedCollator and
RuleBasedBreakIterator creation with what you got so far.

Comment 23 pavel 2006-07-29 17:30:59 UTC
The target of icuupgrade cws is 2.0.5 -> changing the target of this issue as well.
Comment 24 caolanm 2006-08-08 12:38:00 UTC
Created attachment 38330 [details]
icu 3.6 patch
Comment 25 caolanm 2006-08-08 12:42:20 UTC
I updated my own icu to icu 3.6 preview recently and revisited this patch in
view of the icuupgrade.workspace. 

Something I noted with 3.6, and perhaps worth checking for 3.4 as well, is that
the setText of the icu breakiterator does not actually *copy* the UnicodeString
text it is passed, but takes a pointer to it secretly, so it has to exist for
the duration of being used, otherwise it's likely to crash and burn nastily.

See the attached patch for reference which is just the workspace systemicu
workspace with the --systemicu additions to configure and solenv, and then the
addition of a 
"UnicodeString aICUText" to avoid the use of a dtored UnicodeString
Comment 26 ooo 2006-11-07 16:58:48 UTC
Karl, did you notice the latest patch and Caolan's comment from August? Are your
changes in CWS icuupgrade to the i18npool files identical or with similar
effect? Please add this issue to CWS icuupgrade and add module config_office and
apply the related patch portion. Watch out for any other missing bits like
changes to build.lst and files.

Comment 27 karl.hong 2006-11-14 01:20:25 UTC
Apply patch to cws icuupgrade.
Comment 28 karl.hong 2006-11-17 05:57:36 UTC
ready for QA.
Comment 29 stefan.baltzer 2006-12-04 16:21:24 UTC
SBA->ER: As discussed, please proceed.
Comment 30 ooo 2006-12-04 16:49:46 UTC
In CWS 'icuupgrade' verified presence of
- activated sections in config_office/{configure,set_soenv}.in
- ICU:icu in {i18npool,scp2,vcl}/prj/build.lst
- BUILD_TYPE ICU in solenv/config/ssrc680.ini
Comment 31 ooo 2007-01-04 15:01:44 UTC
Available in m198, closing.