Closed Bug 947299 Opened 11 years ago Closed 11 years ago

ICU-related errors

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: wingo, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 1 obsolete file)

Just pulled to 159180:0d405a9b2a8a. With a fresh rebuild (autoconf2.13; cd +debug; ../configure --enable-debug --with-system-nspr; make clean; make) I got ICU errors that I could not fix without nuking the builddir: make[2]: Leaving directory `/home/wingo/src/mozilla-central/js/src/+debug/intl/icu/target' /home/wingo/src/mozilla-central/js/src/+debug/config/nsinstall -R -m 644 'intl/icu/target/lib/libicui18n.so.' 'dist/bin' /home/wingo/src/mozilla-central/js/src/+debug/config/nsinstall -R -m 644 'intl/icu/target/lib/libicuuc.so.' 'dist/bin' /home/wingo/src/mozilla-central/js/src/+debug/config/nsinstall -R -m 644 'intl/icu/target/lib/libicudata.so.' 'dist/bin' /home/wingo/src/mozilla-central/js/src/+debug/config/nsinstall: cannot access intl/icu/target/lib/libicui18n.so.: No such file or directory So I nuked and redid the whole thing. I was able to build but not to run; ./js would not load: wingo@rusty:~/src/mozilla-central/js/src$ +debug/js +debug/js: error while loading shared libraries: libicui18n.so.50: cannot open shared object file: No such file or directory So I redid the whole thing --with-system-icu. After updating my system's ICU: ii libicu-dev:amd64 52.1-2 amd64 Development files for International Components for Unicode ii libicu48:amd64 4.8.1.1-13+nmu1 amd64 International Components for Unicode ii libicu4j-java 4.2.1.1-2 all Library for Unicode support and internationalization ii libicu52:amd64 52.1-2 amd64 International Components for Unicode I get two regressions in Intl: wingo@rusty:~/src/mozilla-central/js/src$ tests/jstests.py -s -o +debug/js Intl/NumberFormat/format.js ## Intl/NumberFormat/format.js: rc = 3, run time = 0.029025 /home/wingo/src/mozilla-central/js/src/+debug/js -f shell.js -f Intl/shell.js -f Intl/NumberFormat/shell.js -f Intl/NumberFormat/format.js Intl/NumberFormat/format.js:21:0 Error: Assertion failed: got "-$1.00", expected "($1.00)" REGRESSION - Intl/NumberFormat/format.js [0|1|0|0] 100% ==========================================================>| 0.0s REGRESSIONS Intl/NumberFormat/format.js FAIL wingo@rusty:~/src/mozilla-central/js/src$ tests/jstests.py -s -o +debug/js Intl/DateTimeFormat/format.js ## Intl/DateTimeFormat/format.js: rc = 3, run time = 0.036932 /home/wingo/src/mozilla-central/js/src/+debug/js -f shell.js -f Intl/shell.js -f Intl/DateTimeFormat/shell.js -f Intl/DateTimeFormat/format.js Intl/DateTimeFormat/format.js:26:0 Error: Assertion failed: got "\u0E51\u0E52 \u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21 \u0E52\u0E55\u0E55\u0E55 \u0E50\u0E53:\u0E50\u0E50:\u0E50\u0E50", expected "\u0E51\u0E52 \u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21 \u0E52\u0E55\u0E55\u0E55, \u0E50\u0E53:\u0E50\u0E50:\u0E50\u0E50" REGRESSION - Intl/DateTimeFormat/format.js [0|1|0|0] 100% ==========================================================>| 0.0s REGRESSIONS Intl/DateTimeFormat/format.js FAIL
OK, I did the following: cd js/src mkdir obj cd obj ../configure --enable-debug --with-system-nspr make -j4 cd dist/bin ./js ./js: error while loading shared libraries: libicui18n.so.50: cannot open shared object file: No such file or directory ls -lh total 0 lrwxrwxrwx 1 ehsan ehsan 19 Dec 6 12:16 gdb-tests -> ../../gdb/gdb-tests lrwxrwxrwx 1 ehsan ehsan 54 Dec 6 12:16 gdb-tests-gdb.py -> /media/storage/moz/src/js/src/obj/gdb/gdb-tests-gdb.py lrwxrwxrwx 1 ehsan ehsan 14 Dec 6 12:16 js -> ../../shell/js lrwxrwxrwx 1 ehsan ehsan 29 Dec 6 12:16 jsapi-tests -> ../../jsapi-tests/jsapi-tests lrwxrwxrwx 1 ehsan ehsan 49 Dec 6 12:16 js-gdb.py -> /media/storage/moz/src/js/src/obj/shell/js-gdb.py lrwxrwxrwx 1 ehsan ehsan 49 Dec 6 12:16 libicudata.so.50 -> ../../../obj/intl/icu/target/lib/libicudata.so.50 lrwxrwxrwx 1 ehsan ehsan 49 Dec 6 12:16 libicui18n.so.50 -> ../../../obj/intl/icu/target/lib/libicui18n.so.50 lrwxrwxrwx 1 ehsan ehsan 47 Dec 6 12:16 libicuuc.so.50 -> ../../../obj/intl/icu/target/lib/libicuuc.so.50 lrwxrwxrwx 1 ehsan ehsan 29 Dec 6 12:16 libmozjs-28a1.so -> ../../../obj/libmozjs-28a1.so lrwxrwxrwx 1 ehsan ehsan 22 Dec 6 12:14 nsinstall -> ../../config/nsinstall I'm not sure what's going on here... glandium, any ideas?
Blocks: 915735
Component: Internationalization → Build Config
Flags: needinfo?(mh+mozilla)
On OS X, the following works around it for me: export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./dist/bin/
(In reply to comment #2) > On OS X, the following works around it for me: > > export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./dist/bin/ But isn't that the default on Linux?
The first bad revision is: changeset: 159166:b0678affef03 user: Ehsan Akhgari <ehsan@mozilla.com> date: Fri Dec 06 08:08:52 2013 -0500 summary: Bug 915735 - Build ICU as a shared library where JS is built as a shared library; r=glandium Incidentally Jan's workaround in comment 2 doesn't work for me. No idea why not.
$ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./dist/bin/ $ ./js dyld: Library not loaded: ../lib/libicudata.50.1.2.dylib Referenced from: /Users/jorendorff/dev/mi/js/src/d-objdir/./js Reason: image not found Trace/BPT trap: 5 $ ./dist/bin/js dyld: Library not loaded: ../lib/libicudata.50.1.2.dylib Referenced from: /Users/jorendorff/dev/mi/js/src/d-objdir/./dist/bin/js Reason: image not found Trace/BPT trap: 5
So, the problem is that icu is built shared when js is built shared. Which it apparently is on standalone builds. So this should be changed to making icu built shared when js is built shared *and* not standalone.
Flags: needinfo?(mh+mozilla)
Comment on attachment 8344057 [details] [diff] [review] Don't build ICU as a shared library when building JS in standalone mode; r=glandium This patch doesn't quite work yet, but I'm not sure why. Any ideas?
Attachment #8344057 - Flags: feedback?(mh+mozilla)
Assignee: nobody → ehsan
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #8) > Comment on attachment 8344057 [details] [diff] [review] > Don't build ICU as a shared library when building JS in standalone mode; > r=glandium > > This patch doesn't quite work yet, but I'm not sure why. Any ideas? Without knowing how it doesn't quite work, it's hard to tell.
I get linker errors: libmozjs-28a1.dylib Executing: /usr/bin/clang++ -Qunused-arguments -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wsign-compare -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -fno-common -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -O3 -fno-stack-protector -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -fPIC -o libmozjs-28a1.dylib -Wl,-filelist,/Users/ehsan/moz/mozilla-central/js/src/obj/tmpbxzpMI.list -lobjc -framework ExceptionHandling -Wl,-executable_path,dist/bin -Wl,-dead_strip -dynamiclib -install_name @executable_path/libmozjs-28a1.dylib -compatibility_version 1 -current_version 1 -single_module -lm -lm -lz /Users/ehsan/moz/mozilla-central/js/src/obj/tmpbxzpMI.list: Compression.o Decimal.o Parser.o jsarray.o jsatom.o jsmath.o jsutil.o ExecutableAllocatorPosix.o OSAllocatorPosix.o ARMAssembler.o MacroAssemblerARM.o MacroAssemblerX86Common.o YarrJIT.o pm_stub.o Unified_cpp_0.o Unified_cpp_1.o Unified_cpp_2.o Unified_cpp_3.o Unified_cpp_4.o Unified_cpp_5.o Unified_cpp_6.o Unified_cpp_7.o Unified_cpp_8.o Unified_cpp_9.o Unified_cpp_10.o Unified_cpp_11.o Undefined symbols for architecture x86_64: "_u_cleanup_50", referenced from: JS_ShutDown() in Unified_cpp_7.o "_u_init_50", referenced from: JS_Init() in Unified_cpp_7.o "_ucal_setGregorianChange_50", referenced from: NewUDateFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_udatpg_open_50", referenced from: js::intl_patternForSkeleton(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_udat_open_50", referenced from: NewUDateFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_udatpg_close_50", referenced from: js::intl_patternForSkeleton(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_udat_close_50", referenced from: js::intl_FormatDateTime(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o dateTimeFormat_finalize(js::FreeOp*, JSObject*) in Unified_cpp_0.o "_ucal_getType_50", referenced from: js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_udatpg_getBestPattern_50", referenced from: js::intl_patternForSkeleton(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_udat_getAvailable_50", referenced from: js::intl_DateTimeFormat_availableLocales(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_ucal_getKeywordValuesForLocale_50", referenced from: js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_unum_setTextAttribute_50", referenced from: NewUNumberFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_udat_format_50", referenced from: js::intl_FormatDateTime(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_ucal_open_50", referenced from: js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_unum_open_50", referenced from: NewUNumberFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_ucal_close_50", referenced from: js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_unum_close_50", referenced from: js::intl_FormatNumber(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o NewUNumberFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o numberFormat_finalize(js::FreeOp*, JSObject*) in Unified_cpp_0.o "_uenum_count_50", referenced from: js::intl_availableCollations(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "icu_50::NumberingSystem::createInstance(icu_50::Locale const&, UErrorCode&)", referenced from: js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_udat_countAvailable_50", referenced from: js::intl_DateTimeFormat_availableLocales(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "icu_50::NumberingSystem::getName()", referenced from: js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_unum_setAttribute_50", referenced from: NewUNumberFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_uenum_next_50", referenced from: js::intl_availableCollations(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "icu_50::Locale::~Locale()", referenced from: js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_u_strlen_50", referenced from: js::intl_patternForSkeleton(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o NewUDateFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_uenum_close_50", referenced from: js::intl_availableCollations(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o js::intl_availableCalendars(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_ucol_close_50", referenced from: js::intl_CompareStrings(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o NewUCollator(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o collator_finalize(js::FreeOp*, JSObject*) in Unified_cpp_0.o "_ucol_open_50", referenced from: NewUCollator(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_ucol_setAttribute_50", referenced from: NewUCollator(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_unum_getAvailable_50", referenced from: js::intl_NumberFormat_availableLocales(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_ucol_strcoll_50", referenced from: js::intl_CompareStrings(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_unum_formatDouble_50", referenced from: js::intl_FormatNumber(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_ucol_getKeywordValuesForLocale_50", referenced from: js::intl_availableCollations(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_u_setMemoryFunctions_50", referenced from: JS_SetICUMemoryFunctions(void* (*)(void const*, unsigned long), void* (*)(void const*, void*, unsigned long), void (*)(void const*, void*)) in Unified_cpp_7.o "_udat_getCalendar_50", referenced from: NewUDateFormat(JSContext*, JS::Handle<JSObject*>) in Unified_cpp_0.o "_ucol_getAvailable_50", referenced from: js::intl_Collator_availableLocales(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "icu_50::Locale::Locale(char const*, char const*, char const*, char const*)", referenced from: js::intl_numberingSystem(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_unum_countAvailable_50", referenced from: js::intl_NumberFormat_availableLocales(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o "_ucol_countAvailable_50", referenced from: js::intl_Collator_availableLocales(JSContext*, unsigned int, JS::Value*) in Unified_cpp_0.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [libmozjs-28a1.dylib] Error 1 make: *** [default] Error 2
Comment on attachment 8344057 [details] [diff] [review] Don't build ICU as a shared library when building JS in standalone mode; r=glandium nm, I was just forgetting to run autoconf to update my configure script!
Attachment #8344057 - Attachment is obsolete: true
Attachment #8344057 - Flags: feedback?(mh+mozilla)
Attachment #8344084 - Flags: review?(mh+mozilla)
Attachment #8344084 - Flags: review?(mh+mozilla) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Thank you.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: