Re: [libc6-dev:armhf] CLOCK_BOOTTIME, CLOCK_REALTIME, CLOCK_REALTIME_ALARM...
On Sun, Sep 14, 2014 at 06:18:06PM +0200, Alban Ponche wrote:
> Hello,
>
> don't know if it's a bug, i'm surely not a hacker, but, when i try to
> compile Systemd on my Raspberry pi, i got this error :
>
> CC src/libsystemd/sd-event/libsystemd_la-sd-event.lo
> src/libsystemd/sd-event/sd-event.c: In function
> 'event_source_type_to_clock':
> src/libsystemd/sd-event/sd-event.c:528:24: error: 'CLOCK_BOOTTIME'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c:528:24: note: each undeclared identifier
> is reported only once for each function it appears in
> src/libsystemd/sd-event/sd-event.c:534:24: error: 'CLOCK_REALTIME_ALARM'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c:537:24: error: 'CLOCK_BOOTTIME_ALARM'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c: In function
> 'clock_to_event_source_type':
> src/libsystemd/sd-event/sd-event.c:544:61: warning: declaration of 'clock'
> shadows a global declaration [-Wshadow]
> src/libsystemd/sd-event/sd-event.c:551:14: error: 'CLOCK_BOOTTIME'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c:557:14: error: 'CLOCK_REALTIME_ALARM'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c:560:14: error: 'CLOCK_BOOTTIME_ALARM'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c: In function 'event_setup_timer_fd':
> src/libsystemd/sd-event/sd-event.c:816:27: warning: declaration of 'clock'
> shadows a global declaration [-Wshadow]
> src/libsystemd/sd-event/sd-event.c: In function 'sd_event_add_time':
> src/libsystemd/sd-event/sd-event.c:847:27: warning: declaration of 'clock'
> shadows a global declaration [-Wshadow]
> src/libsystemd/sd-event/sd-event.c: In function
> 'sd_event_source_get_time_clock':
> src/libsystemd/sd-event/sd-event.c:1617:76: warning: declaration of 'clock'
> shadows a global declaration [-Wshadow]
> src/libsystemd/sd-event/sd-event.c: In function 'sd_event_wait':
> src/libsystemd/sd-event/sd-event.c:2324:37: error: 'CLOCK_BOOTTIME'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c: In function 'sd_event_now':
> src/libsystemd/sd-event/sd-event.c:2504:50: warning: declaration of 'clock'
> shadows a global declaration [-Wshadow]
> src/libsystemd/sd-event/sd-event.c:2516:14: error: 'CLOCK_REALTIME_ALARM'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c:2524:14: error: 'CLOCK_BOOTTIME'
> undeclared (first use in this function)
> src/libsystemd/sd-event/sd-event.c:2525:14: error: 'CLOCK_BOOTTIME_ALARM'
> undeclared (first use in this function)
>
>
> After little search, i found that it's due to
> file /usr/include/arm-linux-gnueabihf/bits/time.h, in which some constants
> are missing :
>
> /* Monotonic system-wide clock that includes time spent in suspension. */
> # define CLOCK_BOOTTIME 7
> /* Like CLOCK_REALTIME but also wakes suspended system. */
> # define CLOCK_REALTIME_ALARM 8
> /* Like CLOCK_BOOTTIME but also wakes suspended system. */
> # define CLOCK_BOOTTIME_ALARM 9
>
>
> I had this in the bits/time.h and compilation is now OK.
>
> Here is my libc6-dev version :
> root@domoticzpi:~# dpkg -l libc6-dev:armhf
> Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
> |
> État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
> |/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
> ||/ Nom Version Architecture
> Description
> +++-=================================-=====================-=====================-=======================================================================
> ii libc6-dev:armhf 2.13-38+rpi2+deb7u3 armhf
> Embedded GNU C Library: Development Libraries and Header Files
This seems to be a too old version to build recent versions of systemd.
You should try to either build older version, or upgrade your libc to a
more recent version, like the one from Jessie.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
Reply to: