.. title: Fix for "undefined reference to clock_gettime" .. slug: fix-for-undefined-reference-to-clock_gettime .. date: 2014-08-06 23:10:51 .. tags: linux .. category: .. link: .. description: .. type: text While running the build.sh script for SIPp I ran into this error: :: src/sipp-time.o: In function getmicroseconds()': /chroot/root/sipp/src/time.cpp:57: undefined reference to clock_gettime' .. TEASER_END: Read more The fix is to add LDFLAGS="-ltr" like so: :: LDFLAGS=" -lrt " ./configure --with-openssl --with-pcap --with-sctp --with-rtpstream LDFLAGS=" -lrt " make More information about this error: `Ubuntu Linux C++ error: undefined reference to 'clock_gettime' and 'clock_settime' `_; `Untitled pastebin `_; `[xymon] Can not compile 4.2.3 on CentOS 5.2 `_ Note: I published this post originally at `Fix for "undefined reference to clock_gettime" `_. Migrated to Nikola in February 2015.