MagicStack / MagicStack/uvloop

Error installing uvloop via pip for PyPy3.9

オープン
#537 コメント 15 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Cython
スター
11.9k
フォーク
616
PR マージ指標
30日以内にマージされた PR はありません

説明

  • uvloop version: 0.17.0
  • Python version: Python 3.9.16(PyPy 7.3.11)
  • Platform: MacOS 12.01
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: y
> pip install uvloop
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting uvloop
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ba/86/6dda1760481abf244cbd3908b79a4520d757040ca9ec37a79fc0fd01e2a0/uvloop-0.17.0.tar.gz (2.3 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: uvloop
  Building wheel for uvloop (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [276 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-3.9
      creating build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/_version.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/_noop.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/_testbase.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      running egg_info
      writing uvloop.egg-info/PKG-INFO
      writing dependency_links to uvloop.egg-info/dependency_links.txt
      writing requirements to uvloop.egg-info/requires.txt
      writing top-level names to uvloop.egg-info/top_level.txt
      reading manifest file 'uvloop.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
      adding license file 'LICENSE-APACHE'
      adding license file 'LICENSE-MIT'
      writing manifest file 'uvloop.egg-info/SOURCES.txt'
      copying uvloop/cbhandles.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/cbhandles.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/dns.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/errors.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/loop.c -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/loop.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/loop.pyi -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/loop.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/lru.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/pseudosock.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/py.typed -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/request.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/request.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/server.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/server.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/sslproto.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      copying uvloop/sslproto.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop
      creating build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/async_.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/async_.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/basetransport.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/basetransport.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/check.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/check.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/fsevent.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/fsevent.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/handle.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/handle.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/idle.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/idle.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/pipe.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/pipe.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/poll.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/poll.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/process.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/process.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/stream.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/stream.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/streamserver.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/streamserver.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/tcp.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/tcp.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/timer.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/timer.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/udp.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      copying uvloop/handles/udp.pyx -> build/lib.macosx-10.9-x86_64-3.9/uvloop/handles
      creating build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/compat.h -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/consts.pxi -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/debug.h -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/debug.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/flowcontrol.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/fork_handler.h -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/python.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/stdlib.pxi -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/system.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      copying uvloop/includes/uv.pxd -> build/lib.macosx-10.9-x86_64-3.9/uvloop/includes
      running build_ext
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether build environment is sane... yes
      checking for a race-free mkdir -p... ./install-sh -c -d
      checking for gawk... no
      checking for mawk... no
      checking for nawk... no
      checking for awk... awk
      checking whether make sets $(MAKE)... yes
      checking whether make supports nested variables... yes
      checking build system type... x86_64-apple-darwin21.1.0
      checking host system type... x86_64-apple-darwin21.1.0
      checking for gcc... gcc
      checking whether the C compiler works... yes
      checking for C compiler default output file name... a.out
      checking for suffix of executables...
      checking whether we are cross compiling... no
      checking for suffix of object files... o
      checking whether the compiler supports GNU C... yes
      checking whether gcc accepts -g... yes
      checking for gcc option to enable C11 features... none needed
      checking whether gcc understands -c and -o together... yes
      checking whether make supports the include directive... yes (GNU style)
      checking dependency style of gcc... gcc3
      checking for gcc way to treat warnings as errors... -Werror
      checking if gcc supports __attribute__(( visibility("default") ))... yes
      checking if gcc supports -fvisibility=hidden... yes
      checking if gcc supports -fno-strict-aliasing flag... yes
      checking if gcc supports -g flag... yes
      checking if gcc supports -std=gnu89 flag... yes
      checking if gcc supports -Wall flag... yes
      checking if gcc supports -Wextra flag... yes
      checking if gcc supports -Wno-long-long flag... yes
      checking if gcc supports -Wno-unused-parameter flag... yes
      checking if gcc supports -Wstrict-prototypes flag... yes
      checking for ar... ar
      checking the archiver (ar) interface... ar
      checking how to print strings... printf
      checking for a sed that does not truncate output... /usr/bin/sed
      checking for grep that handles long lines and -e... /usr/bin/grep
      checking for egrep... /usr/bin/grep -E
      checking for fgrep... /usr/bin/grep -F
      checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
      checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
      checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
      checking the name lister (/usr/bin/nm -B) interface... BSD nm
      checking whether ln -s works... yes
      checking the maximum length of command line arguments... 786432
      checking how to convert x86_64-apple-darwin21.1.0 file names to x86_64-apple-darwin21.1.0 format... func_convert_file_noop
      checking how to convert x86_64-apple-darwin21.1.0 file names to toolchain format... func_convert_file_noop
      checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
      checking for objdump... objdump
      checking how to recognize dependent libraries... pass_all
      checking for dlltool... no
      checking how to associate runtime and link libraries... printf %s\n
      checking for archiver @FILE support... no
      checking for strip... strip
      checking for ranlib... ranlib
      checking command to parse /usr/bin/nm -B output from gcc object... ok
      checking for sysroot... no
      checking for a working dd... /bin/dd
      checking how to truncate binary pipes... /bin/dd bs=4096 count=1
      checking for mt... no
      checking if : is a manifest tool... no
      checking for dsymutil... dsymutil
      checking for nmedit... nmedit
      checking for lipo... lipo
      checking for otool... otool
      checking for otool64... no
      checking for -single_module linker flag... yes
      checking for -exported_symbols_list linker flag... yes
      checking for -force_load linker flag... yes
      checking for stdio.h... yes
      checking for stdlib.h... yes
      checking for string.h... yes
      checking for inttypes.h... yes
      checking for stdint.h... yes
      checking for strings.h... yes
      checking for sys/stat.h... yes
      checking for sys/types.h... yes
      checking for unistd.h... yes
      checking for dlfcn.h... yes
      checking for objdir... .libs
      checking if gcc supports -fno-rtti -fno-exceptions... yes
      checking for gcc option to produce PIC... -fno-common -DPIC
      checking if gcc PIC flag -fno-common -DPIC works... yes
      checking if gcc static flag -static works... no
      checking if gcc supports -c -o file.o... yes
      checking if gcc supports -c -o file.o... (cached) yes
      checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
      checking dynamic linker characteristics... darwin21.1.0 dyld
      checking how to hardcode library paths into programs... immediate
      checking whether stripping libraries is possible... yes
      checking if libtool supports shared libraries... yes
      checking whether to build shared libraries... yes
      checking whether to build static libraries... yes
      checking whether make supports nested variables... (cached) yes
      checking how to run the C preprocessor... gcc -E
      checking whether gcc is Clang... yes
      checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
      checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
      checking whether more special flags are required for pthreads... no
      checking for PTHREAD_PRIO_INHERIT... yes
      checking for library containing dlopen... none required
      checking for library containing kstat_lookup... no
      checking for library containing gethostbyname... none required
      checking for library containing perfstat_cpu... no
      checking for library containing clock_gettime... none required
      checking for library containing sendfile... none required
      checking for library containing socket... none required
      checking for special C compiler options needed for large files... no
      checking for _FILE_OFFSET_BITS value needed for large files... no
      checking for sys/ahafs_evProds.h... no
      checking that generated files are newer than configure... done
      configure: creating ./config.status
      config.status: creating Makefile
      config.status: creating libuv.pc
      config.status: executing depfiles commands
      config.status: executing libtool commands
        CC       src/libuv_la-fs-poll.lo
        CC       src/libuv_la-idna.lo
        CC       src/libuv_la-random.lo
        CC       src/libuv_la-inet.lo
        CC       src/libuv_la-strscpy.lo
        CC       src/libuv_la-threadpool.lo
        CC       src/libuv_la-timer.lo
        CC       src/libuv_la-uv-data-getter-setters.lo
        CC       src/libuv_la-uv-common.lo
        CC       src/libuv_la-version.lo
        CC       src/unix/libuv_la-async.lo
        CC       src/unix/libuv_la-core.lo
        CC       src/unix/libuv_la-dl.lo
        CC       src/unix/libuv_la-fs.lo
        CC       src/unix/libuv_la-getaddrinfo.lo
        CC       src/unix/libuv_la-getnameinfo.lo
        CC       src/unix/libuv_la-loop-watcher.lo
        CC       src/unix/libuv_la-loop.lo
        CC       src/unix/libuv_la-pipe.lo
        CC       src/unix/libuv_la-poll.lo
        CC       src/unix/libuv_la-process.lo
        CC       src/unix/libuv_la-random-devurandom.lo
        CC       src/unix/libuv_la-signal.lo
        CC       src/unix/libuv_la-stream.lo
        CC       src/unix/libuv_la-tcp.lo
        CC       src/unix/libuv_la-thread.lo
        CC       src/unix/libuv_la-tty.lo
        CC       src/unix/libuv_la-udp.lo
        CC       src/unix/libuv_la-bsd-ifaddrs.lo
        CC       src/unix/libuv_la-darwin-proctitle.lo
        CC       src/unix/libuv_la-darwin.lo
        CC       src/unix/libuv_la-fsevents.lo
        CC       src/unix/libuv_la-kqueue.lo
        CC       src/unix/libuv_la-proctitle.lo
        CC       src/unix/libuv_la-random-getentropy.lo
        CCLD     libuv.la
      building 'uvloop.loop' extension
      creating build/temp.macosx-10.9-x86_64-3.9
      creating build/temp.macosx-10.9-x86_64-3.9/uvloop
      gcc -pthread -arch x86_64 -DNDEBUG -O2 -I/usr/local/opt/tcl-tk/include -fPIC -I/Volumes/Code/tools/.pyenv/versions/test/include -I/Volumes/Code/tools/.pyenv/versions/pypy3.9-7.3.11/include/pypy3.9 -I/private/var/folders/x2/9b8bb0x56snggt3fkr20xpz00000gn/T/pip-install-nmv0eyux/uvloop_e70d8699b89b4c91a3986f81626a876f/vendor/libuv/include -c uvloop/loop.c -o build/temp.macosx-10.9-x86_64-3.9/uvloop/loop.o -O2
      In file included from uvloop/loop.c:767:
      uvloop/includes/compat.h:74:12: error: implicit declaration of function 'PyContext_CopyCurrent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          return PyContext_CopyCurrent();
                 ^
      uvloop/includes/compat.h:74:12: note: did you mean 'Context_CopyCurrent'?
      uvloop/includes/compat.h:73:12: note: 'Context_CopyCurrent' declared here
      PyObject * Context_CopyCurrent(void) {
                 ^
      uvloop/includes/compat.h:74:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
          return PyContext_CopyCurrent();
                 ^~~~~~~~~~~~~~~~~~~~~~~
      uvloop/includes/compat.h:78:12: error: implicit declaration of function 'PyContext_Enter' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          return PyContext_Enter(ctx);
                 ^
      uvloop/includes/compat.h:78:12: note: did you mean 'Context_Enter'?
      uvloop/includes/compat.h:77:5: note: 'Context_Enter' declared here
      int Context_Enter(PyObject *ctx) {
          ^
      uvloop/includes/compat.h:82:12: error: implicit declaration of function 'PyContext_Exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          return PyContext_Exit(ctx);
                 ^
      uvloop/includes/compat.h:82:12: note: did you mean 'Context_Exit'?
      uvloop/includes/compat.h:81:5: note: 'Context_Exit' declared here
      int Context_Exit(PyObject *ctx) {
          ^
      uvloop/loop.c:108454:5: error: implicit declaration of function 'PyOS_BeforeFork' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          PyOS_BeforeFork();
          ^
      uvloop/loop.c:108515:5: error: implicit declaration of function 'PyOS_AfterFork_Parent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          PyOS_AfterFork_Parent();
          ^
      uvloop/loop.c:109630:3: error: implicit declaration of function 'PyOS_AfterFork_Child' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        PyOS_AfterFork_Child();
        ^
      1 warning and 6 errors generated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for uvloop
  Running setup.py clean for uvloop
Failed to build uvloop
ERROR: Could not build wheels for uvloop, which is required to install pyproject.toml-based projects`

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

macOS 12.01 の PyPy 3.9 で uvloop 0.17.0 を使用して、報告された pip install uvloop の失敗を再現し、その後 setup.pyMANIFEST.in、および build_ext 周辺のビルド出力を調査します。報告された環境でパッケージのインストールが成功し、関連するテストスイートがパスすれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。