When my system LD is gold, the mozilla build fails. Here's the error message: make[4]: Entering directory `/tmp/mozilla-1.9.2/browser/app' c++ -o firefox-bin -I/usr/X11R7/include -fno-rtti -fno-exceptions -Wall - Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non- virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -pedantic -fno- strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O2 -fPIC -pipe nsBrowserApp.o -lpthread -Wl,-rpath-link,/tmp/mozilla-1.9.2/dist/bin -Wl,- rpath-link,/opt/firefox64/lib -L../../dist/bin -L../../dist/lib -Wl,--whole- archive -L../../dist/lib -ljemalloc -Wl,--no-whole-archive -lxul - L/tmp/mozilla-1.9.2/dist/bin -lmozjs /tmp/mozilla- 1.9.2/dist/lib/libxpcomglue_s.a -L/tmp/mozilla-1.9.2/dist/bin -lxpcom - L/tmp/mozilla-1.9.2/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl - L/usr/X11R7/lib64 -lgtk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lfreetype - lz -lfontconfig -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 - lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -L/usr/X11R7/lib64 -lX11 -lz -lasound -ldl -lm /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../x86_64-unknown-linux- gnu/bin/ld: error: hidden symbol 'nsCOMPtr_base::begin_assignment()' is not defined locally /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../x86_64-unknown-linux- gnu/bin/ld: error: hidden symbol 'nsCOMPtr_base::~nsCOMPtr_base()' is not defined locally /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../x86_64-unknown-linux- gnu/bin/ld: error: hidden symbol 'nsCOMPtr_base::begin_assignment()' is not defined locally /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../x86_64-unknown-linux- gnu/bin/ld: error: hidden symbol 'nsCOMPtr_base::begin_assignment()' is not defined locally collect2: ld returned 1 exit status make[4]: *** [firefox-bin] Error 1 make[4]: Leaving directory `/tmp/mozilla-1.9.2/browser/app' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/tmp/mozilla-1.9.2/browser' make[2]: *** [libs_tier_app] Error 2 make[2]: Leaving directory `/tmp/mozilla-1.9.2' make[1]: *** [tier_app] Error 2 make[1]: Leaving directory `/tmp/mozilla-1.9.2' make: *** [default] Error 2 I don't know if this is a bug in mozilla or gold. I'm using gcc 4.4.3 to build firefox. I have seen this behavior before and then switched back to the old LD, but since gold is now needed to to link time optimization in LLVM, that is no longer an option.
Which gold sources are you using? I also don't know whether this is a bug in mozilla or gold. The error means that there is a relocation which references a hidden symbol which is not defined, or is defined in a shared object. Either way the dynamic linker will not be able to satisfy the reference, and gold expects that the program will fail at runtime. If you can find the definitions and references to nsCOMPtr_base::begin_assignment() and show the output of readelf -s, that would help.
I have heard that other people are able to build mozilla with current development versions of gold. Is this still a problem for you?
Closing due to lack of reply and other reports of successful builds. Please reopen if this is still a problem.