-   Linux - Newbie (
-   -   error: Couldn't find clock_gettime (

cnsoft 07-03-2010 05:54 AM

error: Couldn't find clock_gettime
Hi there,

When i install libdrm, i get the following error:
checking for clock_gettime... no
checking for clock_gettime in -lrt... no
configure: error: Couldn't find clock_gettime

It seems that it cannt find clock_gettime function, but i find it as follow:
$ grep clock_gettime /usr/include/time.h
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;

Can anybody help me? Thanks a lot!

knudfl 07-03-2010 07:23 AM


checking for clock_gettime in -lrt... no
" lrt " means ''

'' is provided by 'glibc-devel'

Please check with : rpm -qa | grep glibc

If no 'glibc-devel' : you will have to install it ..
# yum install glibc-devel

cnsoft 07-03-2010 08:41 AM

Hi knudfl,

Thanks for your reply! I have already installed glibc-devel.

$ rpm -qa|grep glibc-devel

knudfl 07-03-2010 09:50 AM

Did you find a solution ?


cnsoft 07-03-2010 12:18 PM

No, the glibc-devel is installed in my system, i dont know why it cant find it. Thanks!

knudfl 07-03-2010 12:50 PM

I tested libdrm versions 1.0.5, 2.3.1, 2.4.21
on CentOS 4 , before writing post #2.
No errors, any version.
( 2.4.21 requires libpthread-stubs ).

I have have glibc-devel-2.3.4-2.43.
Yours is older, the clock_gettime object may be
slightly different ?

Not easy to upgrade glibc with no Redhat account.
I wouldn't try it. Then rather install a new OS.
( And no guaranty, that libdrm will work at all,
no package libdrm for EL 4 might indicate that.)
Redhat AS 4 is from February 2005.

cnsoft 07-03-2010 02:06 PM

Hi knudfl,

Thanks, maybe i need install the CentOS!

skunkburner 03-05-2013 06:55 AM

I realise this is an old thread, but I had the same problem.
I had glibc-devel installed and got the
configure: error: Couldn't find clock_gettime error when trying to compile 32-bit mesa

I am running a 64-bit version of fedora and had the 64-bit glibc-devel installed.

If run 'yum install glibc-devel.i686'
that should get round the clock_gettime error, or at least it did for me.

All times are GMT -5. The time now is 03:38 PM.