[vlc-devel] [#10696] Build fails on GNU/Hurd

Gabriele Giacone 1o5g4r8o at gmail.com
Tue Feb 18 19:57:01 CET 2014


On Tue, Feb 18, 2014 at 6:02 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le mardi 18 février 2014, 17:28:00 Gabriele Giacone a écrit :
>> posix/thread.c: In function 'vlc_cond_init':
>> posix/thread.c:332:39: error: 'vlc_clock_id' undeclared (first use in
>> this function)
>>      pthread_condattr_setclock (&attr, vlc_clock_id);
>
> Your C library header files are screwed up. This implies that _POSIX_TIMER is
> negative and _POSIX_CLOCK_SELECTION is positive. This is *impossible* to
> support since we need a clock ID (CLOCK_REALTIME in this case) which comes
> with _POSIX_TIMER. Indeed, this option combination is explicitly *forbidden*
> by the specification.

Not negative, it equals to 0. As already wrote, from [1]

/* We do not have POSIX timers, but could in future without ABI change.  */
#define _POSIX_TIMERS 0
[...]
/* The monotonic clock might be available.  */
#define _POSIX_MONOTONIC_CLOCK 0
[...]
/* The clock selection interfaces are available.  */
#define _POSIX_CLOCK_SELECTION 200809L

[1] http://sources.debian.net/src/eglibc/2.17-93/sysdeps/mach/hurd/bits/posix_opt.h?hl=154#L153

Thread patch fixes it by just adding _POSIX_TIMERS>0 check to not
refer to vlc_clock_id, vlc_clock_prec which are defined only if
_POSIX_TIMERS>0 at the beginning of the file. Would that break
anything?

> I hate to state the obvious, but you need a working C environment to build and
> run VLC. You may need to fix your libc or whatever here.


-- 
G..e



More information about the vlc-devel mailing list