Skip to content

Python 3.6-3.8 cannot be installed on Mac OS 11.0.1: "implicit declaration of function 'sendfile' is invalid in C99" #1737

@nightzjp

Description

@nightzjp

Hi,Morning:
First of all, thank you very much for thinking about and maintaining pyenv. We found problems installing pypypy3 via pyenv, but we were also able to find solutions we would like to share with you.

Cordial greetings
jianping zhang

environment

  • macOS 11.0.1
  • pyenv 1.2.20

describe

  • Error in installing Python on MacOS and pyenv

`BUILD FAILED (OS X 11.0.1 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20201120091233.71993
Results logged to /tmp/python-build.20201120091233.71993.log

Last 10 log lines:
./Modules/posixmodule.c:8210:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(in, out, offset, &sbytes, &sf, flags);
^
./Modules/posixmodule.c:10432:5: warning: code will never be executed [-Wunreachable-code]
Py_FatalError("abort() called from Python code didn't abort!");
^~~~~~~~~~~~~
1 warning and 1 error generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated`

Metadata

Metadata

Assignees

No one assigned

    Labels

    by-designthe reported behavior is as intendedthird-partythe problem is in third-party software

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions