Closed
Bug 851992
Opened 11 years ago
Closed 11 years ago
Provide --with-system-icu build option
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla26
People
(Reporter: mozillabugs, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
11.57 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
6.02 KB,
patch
|
Details | Diff | Splinter Review |
The initial implementation of the ECMAScript Internationalization API is based on a bundled ICU. Distributors will likely want a --with-system-icu option to use a copy of ICU that's already in the OS.
Reporter | ||
Comment 1•11 years ago
|
||
Note from Jeff Walden, bug 724531 comment 29: Assuming someone implements --with-system-icu=, as seems likely, they might need to deal with allocator mismatching for NumberingSystem, in the "part 4" patch in bug 837957, if I understand our allocator-hooking correctly: <Waldo> does our malloc hooking in Gecko also properly hook new/delete? does it hook either in system libraries, should they be used? <Waldo> in particular, do things work right if there's a |delete foo| in Gecko, but the corresponding |new Foo| was in a system library?
Comment 2•11 years ago
|
||
Further patches in bug 837957 (part 7 at least) have a minimum version requirement of ICU 50.1, so that should also be enforced when compiling against a system ICU.
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #2) > Further patches in bug 837957 (part 7 at least) have a minimum version > requirement of ICU 50.1, so that should also be enforced when compiling > against a system ICU. Actually, that part has a comment indicating how it can be built with earlier versions of ICU. I do recommend, however, using a current version of ICU in order to get up-to-date locale data and in particular time zone data.
Reporter | ||
Comment 4•11 years ago
|
||
Another issue that an implementation of --with-system-icu does have to watch out for is binary compatibility: http://userguide.icu-project.org/design#TOC-ICU-Binary-Compatibility:-Using-ICU-as-an-Operating-System-Level-Library At this point, Intl.cpp does make use of some C++ API in the intl_numberingSystem function. ICU bug http://bugs.icu-project.org/trac/ticket/10039 requests a C API for this functionality. Implementations that use system ICUs that don't have that C API will have to change intl_numberingSystem. One possible workaround is to format a known number (0) in the desired locale and check the resulting string against the known numbering systems: 0 -> latn \u0660 -> arab \u0E50 -> thai etc.
Comment 5•11 years ago
|
||
(In reply to Norbert Lindenberg from comment #3) > Actually, that part has a comment indicating how it can be built with > earlier versions of ICU. Too much trouble. :-) Plus there's the outdated-ness concern, and security concerns from using older ICU. We require at-least-version for other optional system dependencies like NSPR and NSS. It's totally reasonable to do the same here.
Comment 6•11 years ago
|
||
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #5) > (In reply to Norbert Lindenberg from comment #3) > > Actually, that part has a comment indicating how it can be built with > > earlier versions of ICU. > > Too much trouble. :-) Plus there's the outdated-ness concern, and security > concerns from using older ICU. We require at-least-version for other > optional system dependencies like NSPR and NSS. It's totally reasonable to > do the same here. Yes, as long as you don't update & bump the dependency version too often :) As a distributor building with systemwide nspr/nss/sqlite, it's sometimes quite hard to follow the pace of updates & dependency on the very latest sqlite...
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → m_kato
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 768224 [details] [diff] [review] fix using pkconfig
Attachment #768224 -
Flags: review?(mh+mozilla)
Comment 9•11 years ago
|
||
Comment on attachment 768224 [details] [diff] [review] fix Review of attachment 768224 [details] [diff] [review]: ----------------------------------------------------------------- ::: configure.in @@ +4147,5 @@ > + Use system icu (located with pkgconfig)], > + MOZ_NATIVE_ICU=1) > + > +if test -n "$MOZ_NATIVE_ICU"; then > + PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1) I wonder what will happen when building against icu >= 51. ::: js/src/Makefile.in @@ +259,5 @@ > ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\ > cp -p intl/icu/lib/s$(libname)$(ICU_LIB_SUFFIX).lib intl/icu/lib/$(libname).lib;) > endif > > +ifndef MOZ_NATIVE_ICU Please move this under the ifdef ENABLE_INTL_API above.
Attachment #768224 -
Flags: review?(mh+mozilla) → review+
Comment 10•11 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #9) > > +if test -n "$MOZ_NATIVE_ICU"; then > > + PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1) > > I wonder what will happen when building against icu >= 51. We have 51.1 systemwide here so i can give it a shot...
Comment 11•11 years ago
|
||
Comment on attachment 768224 [details] [diff] [review] fix Fwiw, m-c builds & runs fine here using --with-system-icu, with 51.2 as systemwide icu4c. I had to manually merge configure.in's first chunk though.
Attachment #768224 -
Flags: feedback+
Comment 12•11 years ago
|
||
Should this land or not ? Build is broken on BSDs now after bug 853301, and that bug could temporarly help, if unbitrotted..
Comment 13•11 years ago
|
||
I still need this, at least until bug 899722.
Attachment #768224 -
Attachment is obsolete: true
Comment 14•11 years ago
|
||
For the upcoming spidermonkey-24 release, Gentoo Linux would really like this to both land and be backported if possible..... FYI, latest patch (except for js/src/configure.in, probably due to the update for de-bitrotting) applies clean to beta.
Comment 15•11 years ago
|
||
ICU isn't enabled in 24, right? So why would we need to backport this? Landing on the other hand... Why isn't this patch up for review? Please flag :glandium for it when it's ready.
Flags: needinfo?(jbeich)
Comment 16•11 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #15) > ICU isn't enabled in 24, right? So why would we need to backport this? It's enabled by default in js/src when JS_STANDALONE (at least, this was true according to beta a couple of days ago), which makes a difference for the spidermonkey-24 package. Will flag, thx!
Comment 17•11 years ago
|
||
The unbitrotten patch wasnt r? because the previous version (ie att 768244) was already r+'ed by glandium.. And it's indeed enabled by default on beta for JS_STANDALONE, cf http://mxr.mozilla.org/mozilla-beta/source/js/src/configure.in#4413
Updated•11 years ago
|
Attachment #791058 -
Flags: review?(mh+mozilla)
Comment 18•11 years ago
|
||
Try is green: https://tbpl.mozilla.org/?tree=Try&rev=903973d4ca18 -- if glandium approves the unbitrotten patch this should be good to land?
Comment 19•11 years ago
|
||
Comment on attachment 791058 [details] [diff] [review] fix (unbitrotten) Review of attachment 791058 [details] [diff] [review]: ----------------------------------------------------------------- ::: config/system-headers @@ +1140,5 @@ > +unicode/udat.h > +unicode/udatpg.h > +unicode/uenum.h > +unicode/unum.h > +unicode/ustring.h missing unicode/utypes.h ::: js/src/Makefile.in @@ +393,5 @@ > DEFINES += -DUSE_ZLIB > endif > > +ifdef MOZ_NATIVE_ICU > +EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) should be enough for both cases.
Attachment #791058 -
Flags: review?(mh+mozilla) → review+
Comment 20•11 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #19) > ::: config/system-headers > @@ +1140,5 @@ > > +unicode/udat.h > > +unicode/udatpg.h > > +unicode/uenum.h > > +unicode/unum.h > > +unicode/ustring.h > > missing unicode/utypes.h For completeness sake unicode/uclean.h should be there, too. > ::: js/src/Makefile.in > @@ +393,5 @@ > > DEFINES += -DUSE_ZLIB > > endif > > > > +ifdef MOZ_NATIVE_ICU > > +EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) > > EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) should be enough for both cases. Unless you mean something else removing SHARED_LIBRARY_LIBS breaks js/src/shell build with internal ICU due to missing symbols in libjs_static.a.
Attachment #791058 -
Attachment is obsolete: true
Attachment #795103 -
Flags: review?(mh+mozilla)
Flags: needinfo?(jbeich)
Comment 21•11 years ago
|
||
(In reply to Jan Beich from comment #20) > > ::: js/src/Makefile.in > > @@ +393,5 @@ > > > DEFINES += -DUSE_ZLIB > > > endif > > > > > > +ifdef MOZ_NATIVE_ICU > > > +EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) > > > > EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS) should be enough for both cases. > > Unless you mean something else removing SHARED_LIBRARY_LIBS breaks > js/src/shell build with internal ICU due to missing symbols in > libjs_static.a. I think he means that the 'ifdef MOZ_NATIVE_ICU' isn't needed because EXTRA_DSO_LDOPTS will just get an empty set appended to it when ifundef MOZ_NATIVE_ICU. (i haven't checked what else happens within this ifdef or if there's an else block)
Updated•11 years ago
|
Attachment #795103 -
Flags: review?(mh+mozilla) → review+
Comment 23•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6bd5bc19306c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Comment 24•11 years ago
|
||
Attachment #830524 -
Flags: review?(mh+mozilla)
Comment 25•10 years ago
|
||
Comment on attachment 830524 [details] [diff] [review] backport to esr24 branch Sorry I didn't come to this in time. That's an unfortunate consequence of me using http://harthur.github.io/bugzilla-todos/ for so long, and it not showing review requests on closed bugs.
Attachment #830524 -
Flags: review?(mh+mozilla)
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•