2

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!

Asylum
  • 77
  • 1
  • 7
  • 2
    i **THINK** its your version of the C compiler. try running `gcc –version` (if you are using gcc) – Nullman Nov 03 '21 at 20:10
  • @Nullman This is my output for that: ```sh ❯ gcc -v clang version 13.0.0 Target: aarch64-unknown-linux-android24 Thread model: posix InstalledDir: /data/data/com.termux/files/usr/bin Found candidate GCC installation: /data/data/com.termux/files/usr/bin/../lib/gcc/aarch64-linux-android/11.1.0 Found candidate GCC installation: /data/data/com.termux/files/usr/lib/gcc/aarch64-linux-android/11.1.0``` – Asylum Nov 03 '21 at 20:19
  • Does this answer your question? [getrandom syscall in C not found](https://stackoverflow.com/questions/30800331/getrandom-syscall-in-c-not-found) – alinsoar Nov 03 '21 at 20:23

0 Answers0