I'm trying to build Python 3.5.1 on a GCE Ubuntu 14.04 VM and when running ./configure inside the unzipped folder I get:
checking for the Linux getrandom() syscall... no
checking for the getrandom() function... no
The uname -a command returns:
Linux server.mydomain.com 3.19.0-58-generic #64~14.04.1-Ubuntu SMP Fri Mar 18 19:05:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I don't why configure cannot detect getrandom(), on the Python 3.5.1 release documentation it says Python interpreter will detect and use this function/system call in Linux Kernels above 3.17
What am I missing here? Anyone had the same issue?
Thanks in advance for any answers.
Danilo
The test program Python uses to determine whether you have getrandom() is here: https://hg.python.org/cpython/rev/4491bdb6527b/#l3.176
#include <sys/syscall.h>
int main() {
const int flags = 0;
char buffer[1];
int n;
/* ignore the result, Python checks for ENOSYS at runtime */
(void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
return 0;
}
What do you get if you try to build that program on your system? If it works, your Python should use getrandom(), otherwise you should see from the compiler output what the problem is.
Edit: Now that we see that indeed you do not have SYS_getrandom, we can say for certain what the problem is: your kernel is new enough to support getrandom(), but your libc is not. The solution is to upgrade your glibc-dev.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With