Fix for "undefined reference to clock_gettime"
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'
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.