Closed Bug 1635764 Opened 5 months ago Closed 4 months ago

--with-system-icu fails to build

Categories

(Firefox Build System :: General, defect, P1)

defect

Tracking

(firefox-esr68 unaffected, firefox75 unaffected, firefox76 unaffected, firefox77 unaffected, firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- unaffected
firefox78 --- fixed

People

(Reporter: jbeich, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

$ c++ --version
FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ pkg info -x icu
icu-67.1,1

$ echo "ac_add_options --with-system-icu" >>.mozconfig
$ ./mach build
[...]
ld.lld: error: undefined hidden symbol: uloc_getDefault
>>> referenced by OSPreferences_gtk.cpp
>>>               ../../../intl/locale/gtk/OSPreferences_gtk.o:(mozilla::intl::OSPreferences::ReadSystemLocales(nsTArray<nsTString<char> >&))
>>> referenced by Unified_cpp_js_src25.cpp
>>>               Unified_cpp_js_src25.o:(JSRuntime::getDefaultLocale()) in archive ../../../js/src/build/libjs_static.a
>>> did you mean: uloc_setDefault
>>> defined in: /usr/local/lib/libicuuc.so
ld.lld: error: undefined hidden symbol: unorm2_getNFDInstance
>>> referenced by Unified_cpp_unicharutil_util0.cpp
>>>               ../../../intl/unicharutil/util/Unified_cpp_unicharutil_util0.o:(mozilla::unicode::GetNaked(unsigned int))
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(str_normalize(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unorm2_getNFCInstance
>>> referenced by Unified_cpp_gfx_thebes1.cpp
>>>               ../../../gfx/thebes/Unified_cpp_gfx_thebes1.o:(gfxHarfBuzzShaper::Initialize())
>>> referenced by Unified_cpp_gfx_thebes1.cpp
>>>               ../../../gfx/thebes/Unified_cpp_gfx_thebes1.o:(gfxFontGroup::FindFontForChar(unsigned int, unsigned int, unsigned int, mozilla::unicode::Script, gfxFont*, FontMatchType*))
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(str_normalize(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: icu::TimeZone::createTimeZone(icu::UnicodeString const&)
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalResyncICUDefaultTimeZone()) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: icu::TimeZone::getUnknown()
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalResyncICUDefaultTimeZone()) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: icu::TimeZone::detectHostTimeZone()
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalResyncICUDefaultTimeZone()) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: icu::TimeZone::adoptDefault(icu::TimeZone*)
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalResyncICUDefaultTimeZone()) in archive ../../../js/src/build/libjs_static.a
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalResyncICUDefaultTimeZone()) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: icu::TimeZone::createDefault()
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::computeDSTOffsetMilliseconds(long)) in archive ../../../js/src/build/libjs_static.a
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::computeUTCOffsetMilliseconds(long)) in archive ../../../js/src/build/libjs_static.a
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::computeLocalOffsetMilliseconds(long)) in archive ../../../js/src/build/libjs_static.a
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalTimeZoneDisplayName(char16_t*, unsigned long, long, char const*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: icu::TimeZone::getDisplayName(signed char, icu::TimeZone::EDisplayType, icu::Locale const&, icu::UnicodeString&) const
>>> referenced by Unified_cpp_js_src18.cpp
>>>               Unified_cpp_js_src18.o:(js::DateTimeInfo::internalTimeZoneDisplayName(char16_t*, unsigned long, long, char const*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unorm2_getNFKCInstance
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(str_normalize(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unorm2_getNFKDInstance
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(str_normalize(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unorm2_spanQuickCheckYes
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(str_normalize(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unorm2_normalizeSecondAndAppend
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(int js::intl::CallICU<str_normalize(JSContext*, unsigned int, JS::Value*)::$_16, char16_t, 32ul>(JSContext*, str_normalize(JSContext*, unsigned int, JS::Value*)::$_16 const&, mozilla::Vector<char16_t, 32ul, js::TempAllocPolicy>&)) in archive ../../../js/src/build/libjs_static.a
>>> referenced by Unified_cpp_js_src2.cpp
>>>               Unified_cpp_js_src2.o:(int js::intl::CallICU<str_normalize(JSContext*, unsigned int, JS::Value*)::$_16, char16_t, 32ul>(JSContext*, str_normalize(JSContext*, unsigned int, JS::Value*)::$_16 const&, mozilla::Vector<char16_t, 32ul, js::TempAllocPolicy>&)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unumsys_open
>>> referenced by Unified_cpp_js_src5.cpp
>>>               Unified_cpp_js_src5.o:(js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unumsys_getName
>>> referenced by Unified_cpp_js_src5.cpp
>>>               Unified_cpp_js_src5.o:(js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
ld.lld: error: undefined hidden symbol: unumsys_close
>>> referenced by Unified_cpp_js_src5.cpp
>>>               Unified_cpp_js_src5.o:(js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*)) in archive ../../../js/src/build/libjs_static.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Keywords: in-triage
Priority: -- → P3

Can you take a look dmajor?

Flags: needinfo?(dmajor)

Ah yeah, so I missed that you were building for FreeBSD, which is a tier-3 supported platform. That combined with the --with-system-icu makes it unlikely we would have time to devote to working on this.

The error messages would suggest that your system ICU doesn't expose all the functions that the in-tree library does when linked. If that's not the case and it's a build thing we may accept patches.

Flags: needinfo?(dmajor)
Keywords: in-triage

FWIW since this was already traced down to bug 1634623, maybe glandium might have an idea offhand.

Flags: needinfo?(mh+mozilla)

This affects more than just --enable-system-icu, unfortunately.

Assignee: nobody → mh+mozilla
Flags: needinfo?(mh+mozilla)
Priority: P3 → P1
Depends on: 1638193
Depends on: 1638195
Depends on: 1639815
Depends on: 1641760

For the record, the reason I'm filing bugs to move various flags to python configure blocking this one is that to fix the regression from bug 1634623, the flags for old-configure need to be switched to js_option. But when doing that, when we invoke the js subconfigure, we also explicitly pass default values from the top-level configure, because they could be different from the js subconfigure default. So e.g. we'd pass --without-system-icu by default. For this specific one, it's actually okay. But for about all the cases that take string arguments, it's not handled correctly. It's a pretty common misuse of autoconf, and of all the flags we have, only one does it correctly-ish.

Depends on: 1641775
Depends on: 1641785
Depends on: 1641786

At the same time, because it's now simpler to do so, set the right data
file name for big-endians, even though we don't have or produce it
(bug #1264836). Also remove USE_ICU, which is redundant with
JS_HAS_INTL_API, and actively break the build at configure time when
using --without-intl-api with Firefox because this hasn't actually
worked for close to 3 years (since bug 1402048).

With the patch in this bug and all its dependencies, all the remaining flags attached to old-configure are not for Spidermonkey, so for the purpose of the regression from bug 1634623, this marks the end of it.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/23f9231f76bf
Move --with-system-icu and --with-intl-api to python configure. r=firefox-build-system-reviewers,rstewart
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

This change caused bug 1642184 on big endian arches like s390x.

Regressions: 1642184
You need to log in before you can comment on or make changes to this bug.