Opened 6 months ago

Closed 6 months ago

#18799 closed defect (fixed)

Fixes for packages affected by icu-74.1

Reported by: Bruce Dubbs Owned by: blfs-book
Priority: normal Milestone: 12.1
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description (last modified by pierre)

Several packages will need updates for icu-74.1.

Current known packages are:

Change History (23)

comment:1 by Xi Ruoyao, 6 months ago

SpiderMonkey test suite statistics updated at r12.0-529-ga192a33046. No runtime issues observed with gnome and polkit.

comment:2 by Xi Ruoyao, 6 months ago

Description: modified (diff)

Firefox:

/home/xry111/sources/12.1/firefox-115.4.0/intl/lwbrk/LineBreaker.cpp:439:17: error: static assertion failed due to requirement 'U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)': Gecko vs ICU LineBreak class mismatch

in reply to:  2 comment:3 by Xi Ruoyao, 6 months ago

Description: modified (diff)

Replying to Xi Ruoyao:

Firefox:

/home/xry111/sources/12.1/firefox-115.4.0/intl/lwbrk/LineBreaker.cpp:439:17: error: static assertion failed due to requirement 'U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)': Gecko vs ICU LineBreak class mismatch

Done at r12.0-533-g2281985533.

comment:4 by Xi Ruoyao, 6 months ago

Description: modified (diff)

Thunderbird needs the same workaround as Firefox, done at r12.0-536-g4ae4523d55.

comment:5 by Xi Ruoyao, 6 months ago

Type: enhancementdefect

comment:6 by Xi Ruoyao, 6 months ago

Description: modified (diff)

in reply to:  4 ; comment:7 by Xi Ruoyao, 6 months ago

Description: modified (diff)

Replying to Xi Ruoyao:

Thunderbird needs the same workaround as Firefox, done at r12.0-536-g4ae4523d55.

Reverted because the BLFS book does not use system ICU. The issue preventing us from using the system ICU is still not fixed in ICU 74.

in reply to:  7 comment:8 by Joe Locash, 6 months ago

Replying to Xi Ruoyao:

Replying to Xi Ruoyao:

Thunderbird needs the same workaround as Firefox, done at r12.0-536-g4ae4523d55.

Reverted because the BLFS book does not use system ICU. The issue preventing us from using the system ICU is still not fixed in ICU 74.

Thunderbird and Firefox patch their internal copy of ICU:

https://bugzilla.mozilla.org/show_bug.cgi?id=1843007#c1

The patch is intl/icu-patches/bug-1790071-ICU-22132-standardize-vtzone-output.diff in both the Firefox and Thunderbird source trees.

For my builds I patch ICU and have FF/TB use the system ICU.

The patch still applies to ICU-74.1.

comment:9 by Bruce Dubbs, 6 months ago

It looks like this is the patch:

diff --git a/icu4c/source/i18n/vtzone.cpp b/icu4c/source/i18n/vtzone.cpp
index 3035106701..5e738e11fa 100644
--- a/icu4c/source/i18n/vtzone.cpp
+++ b/icu4c/source/i18n/vtzone.cpp
@@ -1735,14 +1735,14 @@ VTimeZone::write(VTZWriter& writer, UErrorCode& status) const {
             }
         }
     } else {
-        UnicodeString icutzprop;
-        UVector customProps(nullptr, uhash_compareUnicodeString, status);
+        UVector customProps(uprv_deleteUObject, uhash_compareUnicodeString, status);
         if (olsonzid.length() > 0 && icutzver.length() > 0) {
-            icutzprop.append(olsonzid);
-            icutzprop.append(u'[');
-            icutzprop.append(icutzver);
-            icutzprop.append(u']');
-            customProps.addElement(&icutzprop, status);
+            LocalPointer<UnicodeString> icutzprop(new UnicodeString(ICU_TZINFO_PROP), status);
+            icutzprop->append(olsonzid);
+            icutzprop->append(u'[');
+            icutzprop->append(icutzver);
+            icutzprop->append(u']');
+            customProps.adoptElement(icutzprop.orphan(), status);
         }
         writeZone(writer, *tz, &customProps, status);
     }

comment:10 by Xi Ruoyao, 6 months ago

I don't like the idea using Mozilla's patch which not approved by the ICU developers. We all know that Mozilla has a bad tendency to randomly hack upstream packages and cover up real issues... (LLVM 16 nightmare.)

comment:11 by Joe Locash, 6 months ago

Except for spidermonkey and qtwebengine the packages in the desription are end packages. Why not just have them use their internal copy of ICU and there's no need to fix?

in reply to:  11 ; comment:12 by Xi Ruoyao, 6 months ago

Replying to Joe Locash:

Except for spidermonkey and qtwebengine the packages in the desription are end packages. Why not just have them use their internal copy of ICU and there's no need to fix?

Because we know how to fix them, and they are end packages so in the worst case (the fix is wrong) we'll not blow up other packages. So why not saving some SBUs?

in reply to:  12 comment:13 by Xi Ruoyao, 6 months ago

Replying to Xi Ruoyao:

Replying to Joe Locash:

Except for spidermonkey and qtwebengine the packages in the desription are end packages. Why not just have them use their internal copy of ICU and there's no need to fix?

Because we know how to fix them

If we cannot figure out a fix we'll use the internal copy of ICU as the last resort.

comment:14 by Xi Ruoyao, 6 months ago

qtwebengine:

sed 's/^#define BA_LB_COUNT.*$/#define BA_LB_COUNT 40/' \
    -i src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc

Not sure if this is the "correct" fix.

comment:15 by Xi Ruoyao, 6 months ago

libreoffice: https://gerrit.libreoffice.org/c/core/+/158749, but it seems failing the CI.

in reply to:  15 ; comment:16 by pierre, 6 months ago

Replying to Xi Ruoyao:

libreoffice: https://gerrit.libreoffice.org/c/core/+/158749, but it seems failing the CI.

Looks like they still have:

CustomTarget/i18npool/breakiterator/line.brk
createRuleBasedBreakIterator: ICU Error "U_BRK_UNRECOGNIZED_OPTION"  at line 17, column 14
make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/i18npool/CustomTarget_breakiterator.mk:92: /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/workdir/CustomTarget/i18npool/breakiterator/line.brk] Error 12

comment:17 by pierre, 6 months ago

Description: modified (diff)

in reply to:  16 comment:18 by pierre, 6 months ago

Replying to pierre:

Replying to Xi Ruoyao:

libreoffice: https://gerrit.libreoffice.org/c/core/+/158749, but it seems failing the CI.

Looks like they still have:

CustomTarget/i18npool/breakiterator/line.brk
createRuleBasedBreakIterator: ICU Error "U_BRK_UNRECOGNIZED_OPTION"  at line 17, column 14

This is because there is an obsolete, now removed, option (!!LBCMNoChain) in the file 18npool/source/breakiterator/data/line.txt. The build can be made to pass with:

sed -e /LBCM/d -i i18npool/source/breakiterator/data/line.txt

Note that The commit referenced above is not necessary for the build. It just adds an option for CJK languages, that I am unable to test!

comment:19 by martyj19, 6 months ago

Blessings upon pierre for finding the spot that needed to be changed. I confirm that removing !!LBCMNoChain solves libreoffice.

comment:20 by Xi Ruoyao, 6 months ago

SeaMonkey is slightly different from Firefox:

(for i in {43..47}; do
   sed '/ZWJ/s/$/,CLASS_CHARACTER/' -i intl/lwbrk/LineBreaker.cpp || exit $?
 done)

comment:21 by Xi Ruoyao, 6 months ago

Description: modified (diff)

comment:22 by pierre, 6 months ago

Description: modified (diff)

comment:23 by Bruce Dubbs, 6 months ago

Resolution: fixed
Status: newclosed

All issues appear to be fixed. Closing.

Note: See TracTickets for help on using tickets.