Van Rafelghem Dominique
2012-03-12 16:52:56 UTC
Hi everyone,
I'm working on a project that uses a PowerPC 405. The current configuration is running an old version of Linux, 2.4.18 and an old glibc, 2.2.3. I tried to build the DirectFB code using the cross compiler (ppc_405-gcc version 3.2.1) also quite old. But the code won't compile due to compilation errors in /data/DirectFB-1.5.3/lib/direct/os/linux/glibc/clock.c.
Here is the output of the compiler:
clock.c: In function `direct_clock_get_time':
clock.c:59: `CLOCK_MONOTONIC' undeclared (first use in this function)
clock.c:59: (Each undeclared identifier is reported only once
clock.c:59: for each function it appears in.)
clock.c:63: `CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
clock.c:67: `CLOCK_THREAD_CPUTIME_ID' undeclared (first use in this function)
clock.c: In function `direct_clock_set_time':
clock.c:111: `CLOCK_MONOTONIC' undeclared (first use in this function)
clock.c:115: `CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
clock.c:119: `CLOCK_THREAD_CPUTIME_ID' undeclared (first use in this function)
clock.c: In function `direct_clock_resolution':
clock.c:151: `CLOCK_MONOTONIC' undeclared (first use in this function)
clock.c:155: `CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
clock.c:159: `CLOCK_THREAD_CPUTIME_ID' undeclared (first use in this function)
make[5]: *** [clock.lo] Error 1
make[5]: Leaving directory `/data/DirectFB-1.5.3/lib/direct/os/linux/glibc'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/data/DirectFB-1.5.3/lib/direct/os'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/data/DirectFB-1.5.3/lib/direct'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/data/DirectFB-1.5.3/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/DirectFB-1.5.3'
make: *** [all] Error 2
It looks like the version of glibc is too old since the defines such as CLOCK_MONOTONIC defines aren't present in the linux/time.h file. Is there any way I can get this to work with this old kernel/glibc version? Any suggestions would be helpful.
Dominique Van Rafelghem
DTI Software Inc.
Lake Forest, CA
I'm working on a project that uses a PowerPC 405. The current configuration is running an old version of Linux, 2.4.18 and an old glibc, 2.2.3. I tried to build the DirectFB code using the cross compiler (ppc_405-gcc version 3.2.1) also quite old. But the code won't compile due to compilation errors in /data/DirectFB-1.5.3/lib/direct/os/linux/glibc/clock.c.
Here is the output of the compiler:
clock.c: In function `direct_clock_get_time':
clock.c:59: `CLOCK_MONOTONIC' undeclared (first use in this function)
clock.c:59: (Each undeclared identifier is reported only once
clock.c:59: for each function it appears in.)
clock.c:63: `CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
clock.c:67: `CLOCK_THREAD_CPUTIME_ID' undeclared (first use in this function)
clock.c: In function `direct_clock_set_time':
clock.c:111: `CLOCK_MONOTONIC' undeclared (first use in this function)
clock.c:115: `CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
clock.c:119: `CLOCK_THREAD_CPUTIME_ID' undeclared (first use in this function)
clock.c: In function `direct_clock_resolution':
clock.c:151: `CLOCK_MONOTONIC' undeclared (first use in this function)
clock.c:155: `CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
clock.c:159: `CLOCK_THREAD_CPUTIME_ID' undeclared (first use in this function)
make[5]: *** [clock.lo] Error 1
make[5]: Leaving directory `/data/DirectFB-1.5.3/lib/direct/os/linux/glibc'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/data/DirectFB-1.5.3/lib/direct/os'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/data/DirectFB-1.5.3/lib/direct'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/data/DirectFB-1.5.3/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/DirectFB-1.5.3'
make: *** [all] Error 2
It looks like the version of glibc is too old since the defines such as CLOCK_MONOTONIC defines aren't present in the linux/time.h file. Is there any way I can get this to work with this old kernel/glibc version? Any suggestions would be helpful.
Dominique Van Rafelghem
DTI Software Inc.
Lake Forest, CA