Page 1 of 1

compile Weston 1.7

Posted: Sat Apr 11, 2015 9:30 am
by Vertigo
Hello,
i compile weston and while the compile process the error in weston-compositor.o appears

Code: Select all

make  all-am
make[1]: Entering directory '/home/pi/weston'
  CC     src/weston-compositor.o
src/compositor.c: In function ‘clock_name’:
src/compositor.c:4744:4: error: ‘CLOCK_BOOTTIME’ undeclared (first use in this function)
src/compositor.c:4744:4: note: each undeclared identifier is reported only once for each function it appears in
src/compositor.c:4744:3: error: array index in initializer not of integer type
src/compositor.c:4744:3: error: (near initialization for ‘names’)
Makefile:4739: recipe for target 'src/weston-compositor.o' failed
make[1]: *** [src/weston-compositor.o] Error 1
make[1]: Leaving directory '/home/pi/weston'
Makefile:2524: recipe for target 'all' failed
make: *** [all] Error 2
If i comment in the line 4744 the compile process go on but an another error appears:

Code: Select all

/usr/bin/ld: src/weston-compositor.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/librt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
as everybody a solution for such problem?
with best regards

Re: compile Weston 1.7

Posted: Wed Jul 22, 2015 5:54 pm
by nut
Hello,

I had the similar problem.

1st CLOCK_BOOTTIME problem:
Can be fixed by editing /usr/include/arm-linux-gnueabihf/bits/time.h file, add the following lines on bold:
# ifdef __USE_POSIX199309
/* Identifier for system-wide realtime clock. */
# define CLOCK_REALTIME 0
# 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

/* Monotonic system-wide clock. */
# define CLOCK_MONOTONIC 1

2nd edit the Makefile of weston and search for line "LIBS = " modify that to "LIBS = -lrt".

After that you can just make and weston compilation finishes nicely.