sandeepkru / kosmosfs

Automatically exported from code.google.com/p/kosmosfs
Apache License 2.0
0 stars 0 forks source link

Compilation problem on ubuntu 11.10 64bit server #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Linking CXX executable cpfromkfs
../qcdio/libqcdio.a(qcmutex.o): In function `GetAbsTimeout':
/home/septem/kfs/kfs-0.5/src/cc/qcdio/qcmutex.cpp:40: undefined reference to 
`clock_gettime'
/home/septem/kfs/kfs-0.5/src/cc/qcdio/qcmutex.cpp:40: undefined reference to 
`clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [src/cc/tools/cpfromkfs] Error 1
make[1]: *** [src/cc/tools/CMakeFiles/cpfromkfs.dir/all] Error 2
make: *** [all] Error 2

Original issue reported on code.google.com by septem...@gmail.com on 29 Dec 2011 at 5:55

GoogleCodeExporter commented 8 years ago
Is this the same as here: 

for gcc 4.6.1 -lrt has to be last. 

http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-refere
nce-to-clock-gettime-and-clock-settim

Try to change  build/src/cc/tools/CMakeFiles/cpfromkfs.dir/link.txt file by 
adding -lrt to the end of the line (it does not matter if it exists in other 
places in the line). If this fixes it you have to add -lrt to other files also 
(same reason).

Original comment by jhkoi...@gmail.com on 26 Mar 2012 at 3:49