Re: False positive in skalibs system feature test

From: Jens Rehsack <>
Date: Fri, 25 Oct 2019 09:51:15 +0200

> Am 24.10.2019 um 23:41 schrieb Laurent Bercot <>:
> Excellent analysis, as always. :) Thank you.
>> * If GNU libc is used, a 'choose cl' test is unreliable.
>> * GNU/Hurd and GNU/k*BSD would be 'getrandom: no' OSes, at least until
>> the libc is updated to make a system call on GNU/kFreeBSD [1]
>> * A 'choose clr' test would be reliable.
>> * Any other alternative (passing an LDFLAGS that produces a build
>> failure, overriding the result of tests, or whatever) kind of implies
>> knowledge about what the outcome of the detection is going to be,
>> anyway, doesn't it? It's not really a detection.
> - I will temporarily make it a 'choose clr' test.
> - However, I think this is a misdesign in the glibc, that accomplishes
> nothing else than break autodetection. As such, it should be reported
> to the glibc team.
> - Either this misdesign breaks autoconf too, or autoconf has a way of
> working around it. (Or nobody ever tests for getrandom(), but I doubt
> it - some configure scripts test for strcmp(), so, yeah.)

strcmp is C99 - and it's not "sometimes surprisingly unimplemented".

> - I have no time to take care of the real issue for at least a week.
> Could anyone please:
> * investigate how autoconf deals with it?

I digged a bit for that. As said, generally autoconf doesn't deal with
glibc or Linux specialities (it does in 90s ... - that causes more trouble
than it solves).

Another project using getrandom() does the run test, too:

A hint to LibreSSL in delivered a reasonable
sno_at_beaker:~/prj/libressl-3.0.2$ grep -Rl getrandom *
sno_at_beaker:~/prj/libressl-3.0.2$ less crypto/compat/getentropy_linux.c
#if defined(SYS_getrandom) && defined(GRND_NONBLOCK)
static int getentropy_getrandom(void *buf, size_t len);
sno_at_beaker:~/prj/libressl-3.0.2$ grep -Rl SYS_getrandom *
sno_at_beaker:~/prj/libressl-3.0.2$ grep -Rl SYS_getrandom /usr/include/

Seems, there isn't much need in probing at configure stage ...

> * report the thing to libc-alpha?
> Thanks in advance,

Hope it helps a little bit.

Jens Rehsack -

Received on Fri Oct 25 2019 - 07:51:15 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC