Linking is failing on my Ubuntu box with the following: http://pastebin.mozilla.org/1620136 I'm reasonably certain that this is fallout from bug 751727. Shot in the dark - perhaps Thunderbird's build configuration does not define HAVE_CLOCK_MONOTONIC? (see mozilla/xpcom/ds/Makefile.in).
Even better - a direct link to the Makefile.in: http://mxr.mozilla.org/comm-central/source/mozilla/xpcom/ds/Makefile.in#75
I am getting exactly this trying to build firefox trunk on ubuntu ian@tqft-l:/sourcetrees/programs/mozilla/mozilla$ uname -a Linux tqft-l 3.2.0-24-generic #38-Ubuntu SMP Tue May 1 16:18:50 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) /sourcetrees/programs/mozilla/central/mozilla-central/gfx/layers/ipc/ShadowLayersParent.cpp:424: undefined reference to `mozilla::TimeStamp::Now()' ../../gfx/layers/ShadowLayersParent.o: In function `mozilla::TimeDuration::ToMilliseconds() const': /sourcetrees/programs/mozilla/central/mozilla-central/obj-x86_64-unknown-linux-gnu/gfx/layers/../../dist/include/mozilla/TimeStamp.h:81: undefined reference to `mozilla::TimeDuration::ToSeconds() const' /usr/bin/ld.bfd.real: libxul.so: hidden symbol `mozilla::TimeStamp::Startup()' isn't defined
I was able to get Thunderbird to build with Landry Breuil's patch that he mentions in comment 7 of bug 751727: https://hg.mozilla.org/try/rev/341fbf4bc89e He writes: "After a quick look configure fails to find CLOCK_MONOTONIC #define because it's in sys/time.h and not time.h. ... Hrm apparently POSIS says that it should be in time.h, so i'll see if i can get OpenBSD fixed instead." So perhaps Ubuntu is in the same boat as OpenBSD, and have put the time.h file in an unexpected place. Cc'ing Chris Coulson. In the meantime, however, Landry's patch allows me to build.
Created attachment 621513 [details] [diff] [review] Use LIBS instead of LDFLAGS when testing for clock_gettime in librt This is one part of the problem: ac_link puts LDFLAGS before the .c file name, and LIBS after. Putting -lrt before the .c file name makes the Ubuntu linker throws -lrt away and then fails to link, which makes the MONOTONIC test fail.
Comment on attachment 621513 [details] [diff] [review] Use LIBS instead of LDFLAGS when testing for clock_gettime in librt Review of attachment 621513 [details] [diff] [review]: ----------------------------------------------------------------- Hilarious.
https://hg.mozilla.org/integration/mozilla-inbound/rev/0321d95b860d If the sys/time.h vs. time.h part is still necessary, please file a separate bug.