Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695674 - >=net-wireless/wpa_supplicant-2.8 fails to build on uclibc(-ng) with GRND_NONBLOCK undefined.
Summary: >=net-wireless/wpa_supplicant-2.8 fails to build on uclibc(-ng) with GRND_NON...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-09-26 14:09 UTC by David Flogeras
Modified: 2022-01-02 10:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proof of concept patch on 2.8-r1 ebuild (wpa_supplicant-compile-on-uclbc.patch,498 bytes, patch)
2019-09-26 14:10 UTC, David Flogeras
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2019-09-26 14:09:57 UTC
Build fails with GRND_NONBLOCK undefined.  It seems that uclibc-ng only supports getrandom if _GNU_SOURCE is defined.  The ebuild is configuring wpa_supplicant with CONFIG_GETRANDOM always turned on.  The patch to follow makes that conditional.  With CONFIG_GETRANDOM turned off, it falls back to using /dev/random the way it worked in prior releases.

Alternatively, we could turn on _GNU_SOURCE, but I feel that disabling getrandom  is more conservative and I don't know what else _GNU_SOURCE adds in.  I assume this would also need to be appliled to 2.9 and 9999 ebuilds.

Reproducible: Always
Comment 1 David Flogeras 2019-09-26 14:10:52 UTC
Created attachment 591116 [details, diff]
Proof of concept patch on 2.8-r1 ebuild
Comment 2 akater 2020-05-05 14:56:07 UTC
I confirm the issue.

FWIW, I've been using the following “fix” since ≈2019-11 to this day (2.9-r2) but I don't know what I'm doing:

> --- a/src/crypto/random.c
> +++ b/src/crypto/random.c
> @@ -25,9 +25,7 @@
>  #include "utils/includes.h"
>  #ifdef __linux__
>  #include <fcntl.h>
> -#ifdef CONFIG_GETRANDOM
> -#include <sys/random.h>
> -#endif /* CONFIG_GETRANDOM */
> +#include <linux/random.h>
>  #endif /* __linux__ */
>  
>  #include "utils/common.h"
Comment 3 David Seifert gentoo-dev 2022-01-02 10:31:09 UTC
uclibc support in Gentoo has been removed.