Closed Bug 948876 Opened 6 years ago Closed 6 years ago

(debug?) builds failing due to the linker failing to find ICU symbols

Categories

(Firefox Build System :: General, defect)

x86_64
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 934742

People

(Reporter: jwatt, Unassigned)

References

Details

Attachments

(2 files)

I just tried to create an Aurora debug build and it failed due to the linker failing to find ICU symbols. Clobber didn't help.

I'm using Xcode 5.0.2.

$ clang++ --version
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

27:07.13 Executing: clang++ -o js -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 -DDEBUG -D_DEBUG -DTRACING -g -fno-omit-frame-pointer -Wl,-filelist,/Users/jwatt/mozilla/trees/obj/mozilla-aurora-debug/js/src/shell/tmpg1m_Vr.list -lobjc -framework ExceptionHandling -Wl,-executable_path,../../../dist/bin -L../../../dist/bin -L../../../dist/lib -L/Users/jwatt/mozilla/trees/obj/mozilla-aurora-debug/dist/lib -lnspr4 -lplc4 -lplds4 ../libjs_static.a -L../../../dist/lib -lmozglue -lm
27:07.13 /Users/jwatt/mozilla/trees/obj/mozilla-aurora-debug/js/src/shell/tmpg1m_Vr.list:
27:07.13     js.o
27:07.13     jsheaptools.o
27:07.13     jsoptparse.o
27:07.13     ../editline/editline.o
27:07.13     ../editline/sysunix.o
27:07.13     ../../../modules/zlib/src/adler32.o
27:07.13     ../../../modules/zlib/src/compress.o
27:07.13     ../../../modules/zlib/src/crc32.o
27:07.13     ../../../modules/zlib/src/deflate.o
27:07.13     ../../../modules/zlib/src/gzclose.o
27:07.13     ../../../modules/zlib/src/gzlib.o
27:07.13     ../../../modules/zlib/src/gzread.o
27:07.13     ../../../modules/zlib/src/gzwrite.o
27:07.13     ../../../modules/zlib/src/infback.o
27:07.13     ../../../modules/zlib/src/inffast.o
27:07.13     ../../../modules/zlib/src/inflate.o
27:07.13     ../../../modules/zlib/src/inftrees.o
27:07.13     ../../../modules/zlib/src/trees.o
27:07.13     ../../../modules/zlib/src/uncompr.o
27:07.13     ../../../modules/zlib/src/zutil.o
27:07.13 
27:07.13 ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
27:07.13 Undefined symbols for architecture x86_64:
27:07.13   "_T_CString_integerToString_50", referenced from:
27:07.13       _ucol_getShortDefinitionString_50 in libjs_static.a(ucol_sit.o)
27:07.13   "_T_CString_toUpperCase_50", referenced from:
27:07.14       _ucurr_forLocale_50 in libjs_static.a(ucurr.o)
27:07.14       _ucurr_getName_50 in libjs_static.a(ucurr.o)
27:07.14       _ucurr_getNumericCode_50 in libjs_static.a(ucurr.o)
27:07.14   "icu_50::CharString::getAppendBuffer(int, int, int&, UErrorCode&)", referenced from:
27:07.14       icu_50::DigitList::getDecimal(icu_50::CharString&, UErrorCode&) in libjs_static.a(digitlst.o)
27:07.14   "icu_50::CharString::appendInvariantChars(icu_50::UnicodeString const&, UErrorCode&)", referenced from:
27:07.14       icu_50::NumberFormat::makeInstance(icu_50::Locale const&, UNumberFormatStyle, UErrorCode&) in libjs_static.a(numfmt.o)
27:07.14       icu_50::DecimalFormat::expandAffix(icu_50::UnicodeString const&, icu_50::UnicodeString&, double, icu_50::FieldPositionHandler&, signed char, icu_50::UnicodeString const*) const in libjs_static.a(decimfmt.o)
27:07.14   "icu_50::CharString::append(char const*, int, UErrorCode&)", referenced from:
27:07.14       icu_50::CharString::append(icu_50::StringPiece const&, UErrorCode&) in libjs_static.a(fmtable.o)
27:07.14       icu_50::CharString::append(icu_50::CharString const&, UErrorCode&) in libjs_static.a(fmtable.o)
27:07.14       icu_50::CharString::append(icu_50::StringPiece const&, UErrorCode&) in libjs_static.a(decimfmt.o)
27:07.14       icu_50::DigitList::getDecimal(icu_50::CharString&, UErrorCode&) in libjs_static.a(digitlst.o)
[SNIP]
27:07.55   "_utrie_open_50", referenced from:
27:07.55       _uprv_uca_initTempTable_50 in libjs_static.a(ucol_elm.o)
27:07.55   "_utrie_serialize_50", referenced from:
27:07.55       _uprv_uca_assembleTable_50 in libjs_static.a(ucol_elm.o)
27:07.55   "_utrie_set32_50", referenced from:
27:07.56       _uprv_cnttab_constructTable_50 in libjs_static.a(ucol_cnt.o)
27:07.56       uprv_uca_finalizeAddition(tempUCATable*, UCAElements*, UErrorCode*) in libjs_static.a(ucol_elm.o)
27:07.56       uprv_uca_addContraction(tempUCATable*, unsigned int, UCAElements*, UErrorCode*) in libjs_static.a(ucol_elm.o)
27:07.56   "_utrie_unserialize_50", referenced from:
27:07.56       _ucol_initCollator_50 in libjs_static.a(ucol.o)
27:07.56 ld: symbol(s) not found for architecture x86_64
27:07.56 clang: error: linker command failed with exit code 1 (use -v to see invocation)
27:07.56 gmake[7]: *** [js] Error 1
27:07.56 gmake[6]: *** [shell/libs] Error 2
27:07.56 gmake[5]: *** [libs] Error 2
27:07.56 gmake[4]: *** [js/src/libs] Error 2
27:07.56 gmake[3]: *** [libs] Error 2
27:07.56 gmake[2]: *** [default] Error 2
27:07.56 gmake[1]: *** [realbuild] Error 2
27:07.56 gmake: *** [build] Error 2


My .mozconfig contains:

export CC=clang
export CXX=clang++
. $topsrcdir/browser/config/mozconfig
ac_add_options --enable-debug --disable-optimize
ac_add_options --enable-debug-symbols
mk_add_options MOZ_MAKE_FLAGS="-j8 -s"
Attached file full build log
I'm trying to reproduce.
Sorry, cannot reproduce it on the tip of Aurora.
Your full log would be more useful if it was the output from mach build -v
This seems to be intermittent. I popped and pushed various patches in my queue and rebuilt multiple times trying to figure out if they were somehow triggering this (none of them use ICU). At some point the linking issue went away, and now I can happily build with any number of the patches applied, or not... Then this morning I saw the same issue in one of my m-i trees (no patches applied), which went away after two rebuilds.

(In reply to Mike Hommey [:glandium] from comment #4)
> Your full log would be more useful if it was the output from mach build -v

Yeah, sorry about that.
Just experienced the same thing on a fresh m-i pull and clobber build. Invoking |mach build| a second time was sufficient to get the build to complete this time.
Summary: Aurora debug builds failing due to the linker failing to find ICU symbols → (debug?) builds failing due to the linker failing to find ICU symbols
I experience this every time I start a build from scratch. A second 'mach build' completes just fine. This started maybe a few weeks ago.
I've been getting this (or something very much like it, can't remember the exact linker error message) on and off for many months, possibly ever since ICU landed. Running "mach build" again always completes the build, which is probably why I haven't gotten around to filing a bug for it.
This was done with the latest m-c code as of 30 minutes ago on a MacBook Air (current gen) running OS X 10.9.1.
Hmm, does anybody remember if this started roughly since bug 915735 landed?  Or if it started before then?
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #10)
> Hmm, does anybody remember if this started roughly since bug 915735 landed? 
> Or if it started before then?

That timing seems about right to me.
Apparently Jeff and Benoit are both hitting this bug after every clobber, so they can reliably reproduce it.  Glandium, can you please help us figure out what's causing this?  Thanks!
I've already filed this as bug 934742. This is fairly annoying.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 934742
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.