Closed Bug 908080 Opened 11 years ago Closed 11 years ago

discarded symbols in icu libs when linking makeconv

Categories

(Firefox Build System :: General, defect)

x86_64
OpenBSD
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gaston, Unassigned)

References

Details

Since a pair of days, my m-c builds fail with tons of 'discarded symbols' on icu libs, and interestingly only on amd64 when linking makeconv. Maybe a clang vs gcc thing ?

clang++ -fPIC -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11   -o ../../bin/makeconv makeconv.o ucnvstat.o genmbcs.o gencnvex.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -lm  
local symbol 0: discarded in section `.text._ZNKSt9type_infoeqERKS_' from ../../lib/libicui18n.a(calendar.o)
local symbol 1: discarded in section `.text._ZNK6icu_508Calendar7getTimeER10UErrorCode' from ../../lib/libicui18n.a(calendar.o)
local symbol 2: discarded in section `.text._ZN6icu_508Calendar7setTimeEdR10UErrorCode' from ../../lib/libicui18n.a(calendar.o)
local symbol 3: discarded in section `.text._ZN6icu_509ClockMath11floorDivideEdd' from ../../lib/libicui18n.a(gregocal.o)
...
local symbol 1598: discarded in section `.text._ZNK6icu_507UVector4sizeEv' from ../../lib/libicuuc.a(usetiter.o)
local symbol 1599: discarded in section `.text._ZN6icu_5013UnicodeString5setToEi' from ../../lib/libicuuc.a(usetiter.o)
local symbol 1600: discarded in section `.text._ZNK6icu_5013UnicodeString6lengthEv' from ../../lib/libicuuc.a(usetiter.o)
clang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[8]: *** [../../bin/makeconv] Error 1


Full log at http://buildbot.rhaalovely.net/builders/mozilla-central-amd64/builds/856/steps/build/logs/stdio
Do you use vanilla clang 3.3 ? If so try different version
or some fixes freebsd backported from trunk.

http://svnweb.freebsd.org/base/head/contrib/llvm/?view=log

Also, bug 903369 recently altered ICU build.
Blocks: es-intl
(In reply to Jan Beich from comment #1)
> Do you use vanilla clang 3.3 ? If so try different version
> or some fixes freebsd backported from trunk.
> 
> http://svnweb.freebsd.org/base/head/contrib/llvm/?view=log

Honestly, i have better things to do rather than chasing bugs in the toolchain, a standard compiler with a stable version should just work. I prefer finding what broke in the ICU build..

> Also, bug 903369 recently altered ICU build.

tried removing 
 MOZ_SUBCONFIGURE_WRAP([.],[
from js/src/configure.in, changed nothing. Might try to revert the whole changeset, unless someone has an idea what could cause this.
Backporting http://www.sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elflink.c.diff?cvsroot=src&r1=1.75&r2=1.76 to our ld seems to help, my build goes further into js/. I'll make sure everything builds & works in the end.

Still, i'd like to track what change in ICU build triggered this....
(In reply to Landry Breuil (:gaston) from comment #4)
> Backporting
> http://www.sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elflink.c.
> diff?cvsroot=src&r1=1.75&r2=1.76 to our ld seems to help, my build goes
> further into js/. I'll make sure everything builds & works in the end.
> 
> Still, i'd like to track what change in ICU build triggered this....

Depends exactly how long you've had the problem.

If your last successful build predates bug 853301, then ICU was simply not enabled before. Note you can build --without-intl-api, since it's currently built and not used at all.

If it's only really a couple days, them my guess is on bug 899722 part 4, which effectively changed the compiler used to build icu (gcc was forced, before)
(In reply to Mike Hommey [:glandium] from comment #5)
> 
> If it's only really a couple days, them my guess is on bug 899722 part 4,
> which effectively changed the compiler used to build icu (gcc was forced,
> before)

Oh right this is probably the case, if ICU was always built with gcc before even if clang was used for the rest of m-c, and this chunk changed this, then it's probably the cause. That would mean i'd have never built ICU with clang previously. The failure only showed up some days ago.
I think there's nothing we can do here. Fix your toolchain or disable icu.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
It seems the same problem started affecting openbsd/i386 recently. Build with clang, at some point when linking makeconv ld blows the same as on openbsd/macppc. My i386 builder has been down for a while, and it was using gcc 4.6 anyway..
And this now affects amd64 too, my builder started failing but at least i have a regression window :
Oct 18 00:00 	855da6d8a327... 	failure 	#913
Oct 17 00:00 	423b9c30c73d... 	success 	#912
And now i remembered that i had a workaround for this issue in my binutils, and upgraded the machine in between those two days, so overwrote the fixed binutils with a broken one. sigh. So thanks to ICU, i'm now totally unable to build m-c with clang on OpenBSD.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.