Any idea why I get an error compiling Python 3.11-dev? It can't seem to compile at `getrandom`

Viewed 382

I wanted to install Python 3.11-dev on my Android phone, this is my OS (using neofetch): Android 10 aarch64, I'm running Termux. When I tried to install it, it had an error compiling getrandom, do you have any idea how I would fix that?

The full output:

pyenv install 3.11-dev
Cloning https://github.com/python/cpython...
Installing Python-3.11-dev...

BUILD FAILED (Linux 4.9.186-perf-g10af704 using python-build 20180424)

Inspect or clean up the working tree at /data/data/com.termux/files/usr/tmp/python-build.20211103205409.32581
Results logged to /data/data/com.termux/files/usr/tmp/python-build.20211103205409.32581.log

Last 10 log lines:
Python/bootstrap_hash.c:114:17: error: implicit declaration of function 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            n = getrandom(dest, n, flags);
                ^
Python/bootstrap_hash.c:118:17: error: implicit declaration of function 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            n = getrandom(dest, n, flags);
                ^
2 errors generated.
make: *** [Makefile:1960: Python/bootstrap_hash.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.

Thanks for any answers!

0 Answers
Related