Closed Bug 781720 Opened 12 years ago Closed 12 years ago

alder needs -lrt for clock_gettime

Categories

(Core :: WebRTC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: rillian, Assigned: rillian)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

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
Note that these are the unit tests failing to link, not gecko itself.
Attached patch rough fixSplinter Review
This fixes the build for me, but I don't know if it's the proper thing or not.
Attachment #650752 - Flags: review?(rjesup)
Attachment #650752 - Flags: review?(rjesup) → review+
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
Attachment #650752 - Flags: review?(ted.mielczarek)
Attachment #650752 - Attachment is patch: true
Following up in IRC confusion; the patch causes no problems for me on MacOS. REALTIME_LIBS is empty there.
Attachment #650752 - Flags: review?(ted.mielczarek) → review+
Assignee: nobody → giles
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.