概要
表題の通りです。
$ pyenv install 3.4.3
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.4.3.tar.xz...
-> https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
Installing Python-3.4.3...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
〜略〜
Last 10 log lines:
Python/random.c:81:19: error: implicit declaration of function 'getentropy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int res = getentropy(buffer, len);
^
Python/random.c:81:19: note: did you mean 'py_getentropy'?
Python/random.c:77:1: note: 'py_getentropy' declared here
py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
^
1 error generated.
make: *** [Python/random.o] Error 1
make: *** Waiting for unfinished jobs....
error: implicit declaration of function 'getentropy' is invalid in C99
というエラーが出ています。
解決方法
かなり前に同一のエラーに対してissueが立てられていました。
- パッチをダウンロード
-
--patch
パッチを当ててpyenv install
する
$ pyenv install 3.4.3 --patch < Python-3.4.3-macos.patch