Last Comment Bug 781720 - alder needs -lrt for clock_gettime
: alder needs -lrt for clock_gettime
Status: RESOLVED FIXED
[qa-]
:
Product: Core
Classification: Components
Component: WebRTC (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Ralph Giles (:rillian) needinfo me
: Jason Smith [:jsmith]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 18:43 PDT by Ralph Giles (:rillian) needinfo me
Modified: 2012-08-19 22:25 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
rough fix (1.16 KB, patch)
2012-08-09 18:49 PDT, Ralph Giles (:rillian) needinfo me
rjesup: review+
ted: review+
Details | Diff | Review

Description Ralph Giles (:rillian) needinfo me 2012-08-09 18:43:20 PDT
Today's alder tree hg 504791ea983f doesn't link for me on Fedora 17.

make[6]: Entering directory `/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/media/webrtc/signaling/test'
/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/_virtualenv/bin/python /home/giles/mozilla/mozilla-webrtc/config/pythonpath.py -I../../../../config /home/giles/mozilla/mozilla-webrtc/config/expandlibs_exec.py --depend .deps/signaling_unittests.pp --target signaling_unittests --uselist --  /usr/bin/ccache c++  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pthread -pipe -DDEBUG -D_DEBUG -DTRACING -g -fno-omit-frame-pointer  -o signaling_unittests signaling_unittests.o  -lpthread  -Wl,-z,noexecstack   -Wl,-rpath-link,/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/bin -Wl,-rpath-link,/usr/local/lib  -L../../../../dist/bin -L../../../../dist/lib  -L/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/bin -lxpcom -lmozalloc -lxul  -L/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/lib -lnspr4 -lplc4 -lplds4 -L../../../../dist/bin -L../../../../dist/lib -lcrmf -lsmime3 -lssl3 -lnss3 -lnssutil3 ../../../../xpcom/glue/libxpcomglue_s.a ../../../../media/mtransport/standalone/libmtransport_s.a ../../../../media/webrtc/signalingtest/signaling_ecc/libecc.a ../../../../media/webrtc/signalingtest/signaling_sipcc/libsipcc.a ../../../../layout/media/libgkmedias.a ../../../../media/webrtc/trunk/testing/gtest_gtest/libgtest.a  -lasound    -lX11  -lgtk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0   -lgthread-2.0    -lXrender  /home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/lib/libxpcomglue_s.a -L/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/bin -lxpcom -lmozalloc -L/home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/lib -lnspr4 -lplc4 -lplds4 /home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/lib/libjs_static.a /home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/modules/zlib/src/libmozz.a -Wl,--whole-archive /home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/lib/libmozglue.a /home/giles/mozilla/mozilla-webrtc/obj-x86_64-unknown-linux-gnu/dist/lib/libmemory.a -Wl,--no-whole-archive -rdynamic -ldl   
/usr/bin/ld: ../../trunk/third_party/libjingle/libjingle_libjingle/source/talk/base/timeutils.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
/usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1 so try adding it to the linker command line
/lib64/librt.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[6]: *** [signaling_unittests] Error 1
Comment 1 Ralph Giles (:rillian) needinfo me 2012-08-09 18:44:18 PDT
Note that these are the unit tests failing to link, not gecko itself.
Comment 2 Ralph Giles (:rillian) needinfo me 2012-08-09 18:49:48 PDT
Created attachment 650752 [details] [diff] [review]
rough fix

This fixes the build for me, but I don't know if it's the proper thing or not.
Comment 3 Randell Jesup [:jesup] 2012-08-10 08:51:53 PDT
Comment on attachment 650752 [details] [diff] [review]
rough fix

pass review to a build peer:
1-liner to fix unit tests on F17 --  -lrt is already included for xul.

Side note: most places use explicit -lrt, a few (one?) use REALTIME_LIBS
Comment 4 Ralph Giles (:rillian) needinfo me 2012-08-13 17:23:55 PDT
Following up in IRC confusion; the patch causes no problems for me on MacOS. REALTIME_LIBS is empty there.
Comment 5 Ralph Giles (:rillian) needinfo me 2012-08-14 09:43:58 PDT
Thanks Ted. Pushed.

https://hg.mozilla.org/projects/alder/rev/649c8ae14dd1

Note You need to log in before you can comment on or make changes to this bug.