Repository navigation
Build ICU 78.1 from source as 3rdparty/icu for libSceIcu #11150
Replies: 5 comments
|
Update: #13578 by @KernelPanicNT already does the first phase of this proposal. It adds So I won't open a separate submodule PR. Feedback on the approach is best given on #13578, and once it merges I'll build the remaining data-dependent exports (such as |
|
I would like to take one slice of the data-dependent work, so it does not overlap with what is planned here:
It would stack on #13578. Everything else (collation, formatting, locales, converters, normalization, UText callbacks, the rule-based break APIs and the ICU 68 C++ objects) stays with the people already working on it, and the data build should make those easier to add. mantavisual, KernelPanicNT: does that split work for you, or is any of it already in progress on your side? |
|
I'd like to take one small slice that no open PR implements yet: the 12 internal case-property exports They are still @PrivacyOnion @KernelPanicNT if either of you already has these planned, tell me and I'll drop the claim. AI-assisted: yes (Claude Code) |
|
Two more small slices I'd like to take, both stacked on #16971 because they need its data build. No open PR implements them; #13578 lists the first group as blocked on
@AlexWhitehouse @KernelPanicNT tell me if either overlaps with something you have planned and I'll drop it. The AI-assisted: yes (Claude Code) |
|
I’m working on the eight C date-formatter exports in libSceIcu, stacked on #16971: The guest calls use the pinned ICU 78.1 backend. I compared the generated data with the official 78.1 data across 906 locales, including style and pattern formatting and named time zones. I’m also testing field iteration, buffer sizing and guest memory access. Is anyone already working on these exports in an unpublished branch? If so, please point me to it so we can agree on the split before submitting upstream. AI-assisted: yes |
Uh oh!
There was an error while loading. Please reload this page.
Why
Firmware 13.42's
libSceIcu.sprxis ICU 78.1 with 299 exports (BunnyFl's list and measurement). The exports that need no Unicode data are being ported by hand: AZLisme's #10961–#10967 cover theu_str*/UTF-8 functions, and my #11013 → #11136 chain covers version, error-name, set, enumeration, field-position and character-iterator functions. Almost everything left needs ICU's data:Porting that by hand would mean copying ICU's generated tables into this repository.
CONTRIBUTING.mdrules that out ("Third-party code is added as a submodule under3rdparty/and built from source"). It would also drift from the console.Proposal
https://github.com/unicode-org/icuat tagrelease-78.1as3rdparty/icu, the version 13.42 reports.icu4c/source/common(and lateri18n) as static libraries. The CMake file takes its file lists from ICU's owncommon/sources.txtandi18n/sources.txt(202 and 254 lines). OnlylibSceIcu.prxlinks them. Keep ICU's version-suffixed symbol renaming (u_strlen_78) and hidden visibility, so nothing clashes with a host ICU that another library loads.APS5_VABIwrapper over the matching ICU call. The functions already ported by hand stay as they are; wrappers only cover what is not implemented yet.Phase 1: no data file
ICU compiles its core tables into the library itself (
uchar_props_data.h,ucase_props_data.h,ubidi_props_data.h,propname_data.h, andnorm2_nfc_data.hwithNORM2_HARDCODE_NFC_DATAon by default). Withcommonplusstubdata, about 40 of the 13.42 exports work as on the console:u_charType,u_isalphaand the other classifiers,u_hasBinaryProperty,u_getIntPropertyValue,u_charDirection,u_charMirror,ublock_getCode,uscript_getScript/hasScript/getShortNameu_tolower/toupper/totitle/foldCase, andu_strToLower/ToUpper/FoldCase, whose locale-specific rules need no dataunorm2for NFC/NFDubidi_*uset_openPatternutext_openUCharsPhase 2: ICU data
Collation, break rules, locales, formatting, converters, time zones, NFKC and UTS 46 need ICU's data (
icudt78l, about 30 MB). It would be loaded throughudata_setCommonData, which 13.42 exports, or embedded. There are two ways to get it, and I would like the maintainers to choose:icu4c/source/datawith ICU's own tools (genrb,makeconv,gencnval,pkgdata, …), built in the same CMake tree. Fully from source, but a longer build.icu4c-78.1-data-bin-l.zip(12.8 MB), checked against the release's publishedSHASUM512.txt. Simpler, but not built from source.This covers most of the remaining ~150 named exports:
ucol_*,ubrk_*,uloc_*,ucal_*,udat_*,unum*,ucnv_*,uplrules_*,uidna_*,usearch_*, …Notes
UCharIteratorandUTextproviders, converter callbacks,ubidi_setClassCallback) use the guest ABI. On Linux that is the host ABI. On Windows they need small thunks.glslangorffmpeg-coresubmodules.Questions
3rdparty/icusubmodule atrelease-78.1acceptable?commonandstubdataonly) go first as its own PR?If this is acceptable, I would start with phase 1 after the current ICU PR order (#11013 → #10961 … #10967 → #11088 → #11115 → #11118 → #11122 → #11132 → #11136), coordinating with @AZLisme.
All reactions