Fix compilation on CentOS 6
ClosedPublic

Authored by kfunk on May 24 2017, 9:00 AM.

Details

Summary

Issue:

processui/CMakeFiles/processui.dir/ProcessModel.cpp.o: In function
`TimeUtil::systemUptimeSeconds()':
ProcessModel.cpp:(.text._ZN8TimeUtil19systemUptimeSecondsEv[_ZN8TimeUtil19systemUptimeSecondsEv]+0x15):
undefined reference to `clock_gettime'

Diff Detail

Repository
R111 KSysguard Library
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
kfunk created this revision.May 24 2017, 9:00 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 24 2017, 9:00 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Alright, I now see why this is no longer required under Linux: https://stackoverflow.com/a/32649327/592636

Since glibc 2.17, the library linking -rt is no longer required.
The clock_* are now part of the main C library. You can see the change history of glibc 2.17 where this change was done explains the reason for this change:

kfunk updated this revision to Diff 14798.May 24 2017, 10:35 AM

Conditionally link to librt

apol accepted this revision.May 24 2017, 10:37 AM
This revision is now accepted and ready to land.May 24 2017, 10:37 AM
This revision was automatically updated to reflect the committed changes.