build failure using --system-icu and ICU 74.1
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox134 | --- | fixed |
People
(Reporter: gaston, Unassigned)
References
Details
Attachments
(1 file)
435.88 KB,
application/x-xz
|
Details |
building with --with-system-icu
on OpenBSD, with a work-in-progress update to ICU 74.1, the build fails:
In file included from Unified_cpp_intl_lwbrk0.cpp:2:
/usr/obj/ports/firefox-120.0beta5/firefox-120.0/intl/lwbrk/LineBreaker.cpp:453:3: error: static_assert failed due to requirement 'U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)' "Gecko vs ICU LineBreak class mismatch"
static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Reporter | ||
Comment 1•1 year ago
|
||
icu4c 74.1 has a different U_LB_COUNT than 73.2
/usr/local/include/unicode/uchar.h: U_LB_COUNT = 43
/usr/obj/ports/icu4c-74_1-src/icu/source/common/unicode/uchar.h: U_LB_COUNT = 48
maybe the array in https://searchfox.org/mozilla-central/source/intl/lwbrk/LineBreaker.cpp#408 should be updated ?
Reporter | ||
Comment 2•1 year ago
•
|
||
Comment 3•1 year ago
|
||
Yes, sUnicodeLineBreakToClass
needs to be updated for ICU 74 (bug 1859752). The try-push for the ICU 74 release candidate has this patch:
--- a/intl/lwbrk/LineBreaker.cpp
+++ b/intl/lwbrk/LineBreaker.cpp
@@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB
/* JT = 34, [JT] */ CLASS_CHARACTER,
/* JV = 35, [JV] */ CLASS_CHARACTER,
/* CLOSE_PARENTHESIS = 36, [CP] */ CLASS_CLOSE_LIKE_CHARACTER,
/* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
/* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER,
/* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
/* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
/* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
+ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
+ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
+ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
+ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
+ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
+ };
static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass),
"Gecko vs ICU LineBreak class mismatch");
auto cls = GetLineBreakClass(u);
MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
// Overrides based on rules for the different line-break values given in
Reporter | ||
Comment 4•1 year ago
|
||
(In reply to André Bargull [:anba] from comment #3)
Yes,
sUnicodeLineBreakToClass
needs to be updated for ICU 74 (bug 1859752). The try-push for the ICU 74 release candidate has this patch:--- a/intl/lwbrk/LineBreaker.cpp +++ b/intl/lwbrk/LineBreaker.cpp @@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB /* JT = 34, [JT] */ CLASS_CHARACTER, /* JV = 35, [JV] */ CLASS_CHARACTER, /* CLOSE_PARENTHESIS = 36, [CP] */ CLASS_CLOSE_LIKE_CHARACTER, /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE, /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER, /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER, /* E_BASE = 40, [EB] */ CLASS_BREAKABLE, /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER, - /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER}; + /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER, + /* AKSARA = 43, [AK] */ CLASS_CHARACTER, + /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER, + /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER, + /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER, + /* VIRAMA = 47, [VI] */ CLASS_CHARACTER, + }; static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), "Gecko vs ICU LineBreak class mismatch"); auto cls = GetLineBreakClass(u); MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass)); // Overrides based on rules for the different line-break values given in
thanks, i had more or less the same wip patch locally, will confirm if it fixes the build and if runtime is still ok.
Reporter | ||
Comment 5•1 year ago
|
||
runtime seems ok using 120.0b5 with https://hg.mozilla.org/try/rev/d5f3b0c4f08a426ce00a153c04e177eecb6820e2 applied and built against systemwide icu 74.1.
Comment 6•1 year ago
|
||
The severity field is not set for this bug.
:m_kato, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Comment 8•1 year ago
|
||
With the patch build works with unified build, but with --disable-unified-build
the build fails to:
intl/components/src/TimeZone.cpp:345:3: error: use of undeclared identifier 'MOZ_TRY'
Full build log attached as compressed.
Comment 9•1 year ago
|
||
With the patch --disable-unified-build
is broken, but a unified build works fine. I get:
Reporter | ||
Comment 12•24 days ago
|
||
you're right, it seems i can build m-c fine without patches against systemwide icu 76.1 here; i'm still carrying a patch (https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/www/mozilla-firefox/patches/patch-intl_lwbrk_LineBreaker_cpp?rev=1.2&content-type=text/x-cvsweb-markup) in our ports for that issue, i'll recheck if it's still needed for release/beta.
Reporter | ||
Comment 13•23 days ago
|
||
mmm, i'll have to triplecheck, because building 133.0b4 without the above patch fails:
/usr/obj/ports/firefox-133.0beta4/firefox-133.0/intl/lwbrk/LineBreaker.cpp:455:3: error: static assertion failed due to requirement 'U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)': Gecko vs ICU LineBreak class mismatch
static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)
/usr/obj/ports/firefox-133.0beta4/firefox-133.0/intl/lwbrk/LineBreaker.cpp:455:28: note: expression evaluates to '48 == 43'
static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass)
1 error generated.
Reporter | ||
Comment 14•23 days ago
|
||
bah, sorry, hadn't realised that m-c had been updated to icu 76 in bug 1927706, which probably explains why m-c builds with system-icu unpatched, and why 133/beta still fails :) i guess we can close this one..
Updated•23 days ago
|
Description
•