Skip to content

Fails to build on Python 3.11 - longintrepr.h: No such file or directory #6600

Closed

Description

@gaborbernat

Describe the bug

Because of python/cpython#28968, cython fixed it in cython/cython#4428 and is released with 0.29.5

To Reproduce

pip install aiohttp

Expected behavior

To build the wheel.

Logs/tracebacks

Failed to build aiohttp yarl
  error: subprocess-exited-with-error

  × Building wheel for aiohttp (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing aiohttp.egg-info/PKG-INFO
      writing dependency_links to aiohttp.egg-info/dependency_links.txt
      writing requirements to aiohttp.egg-info/requires.txt
      writing top-level names to aiohttp.egg-info/top_level.txt
      reading manifest file 'aiohttp.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'aiohttp' anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '*.lib' found anywhere in distribution
      warning: no previously-included files matching '*.dll' found anywhere in distribution
      warning: no previously-included files matching '*.a' found anywhere in distribution
      warning: no previously-included files matching '*.obj' found anywhere in distribution
      warning: no previously-included files found matching 'aiohttp/*.html'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE.txt'
      running build_ext
      building 'aiohttp._websocket' extension
      aiohttp/_websocket.c:198:12: fatal error: longintrepr.h: No such file or directory
        198 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

Python Version

3.11

aiohttp Version

latest

multidict Version

n/a

yarl Version

latest

OS

Any

Related component

Server, Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Activity

  1. webknjaz commented on Feb 15, 2022

    @webknjaz
    Member

    Thanks! It usually doesn't make sense for us to be working on the next interpreter support until rc are out because the build deps like Cython can't keep up with the ABI changes anyway.

  2. gaborbernat commented on Feb 15, 2022

    @gaborbernat
    Author

    Perhaps RC is a bit too late, IMHO beta should be ok, no? 😊 (this blocks us from testing tox)

  3. webknjaz commented on Feb 15, 2022

    @webknjaz
    Member

    I don't think it's up to us really. We can enable testing in the CI (I would be actually in favor if that was realistic) but Cython having to go through upgrades first is traditionally a blocker that is out of our control. This usually results in this effort being rather pointless until the ABI is stable and Cython supports the respective changes. Also, Cython still isn't able to produce abi3 wheels which I suspect would greatly improve the situation for everyone.

  4. webknjaz commented on Feb 15, 2022

    @webknjaz
    Member

    @gaborbernat you say that it's fixed in Cython that is released already but the problem is building wheels from the published sdist? Are you asking for the release of a new version with C-files generated with newer Cython? If that's an action item right now, I think that it's doable.

  5. gaborbernat commented on Feb 16, 2022

    @gaborbernat
    Author

    Are you asking for the release of a new version with C-files generated with newer Cython? If that's an action item right now, I think that it's doable.

    I think this is the case 🤔

  6. sagar1025 commented on Apr 22, 2022

    @sagar1025

    Are you asking for the release of a new version with C-files generated with newer Cython? If that's an action item right now, I think that it's doable.

    I think this is the case 🤔

    Seems that way.
    cython/cython#4428

  7. droserasprout commented on Jul 13, 2022

    @droserasprout

    Python 3.11.0b4 is out. Should we revisit this one? Citing release notes here:

    Our goal is have no ABI changes after beta 4 and as few code changes as possible after 3.11.0rc1, the first release candidate. To achieve that, it will be extremely important to get as much exposure for 3.11 as possible during the beta phase.

  8. 81 remaining items

  9. ryanpeach commented on Aug 10, 2023

    @ryanpeach
    brew update && brew upgrade pyenv
    pyenv install 3.11.4
    pyenv virtualenv 3.11.4 aiohttp
    pyenv activate aiohttp
    pip install aiohttp
    

    This works.

    I think I'm getting this error from pip install github which requests aiohttp==3.8.1

    Edit: Apparently "github" is not the appropriate thing to pip install even though you "import github". You "pip install pygithub"

  10. bagusk99 commented on Aug 20, 2023

    @bagusk99

    Okay, I was able to fix the problem. It turned out that I depended on some package which depended on an old version of cython

    thank you this solve my problem, i just install it with pip3 install cython

  11. added a commit that references this issue on Sep 28, 2023
  12. TamAIRC commented on Apr 17, 2024

    @TamAIRC

    I errorsame
    pip install fastbpe
    Collecting fastbpe
    Using cached fastBPE-0.1.0.tar.gz (35 kB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Installing backend dependencies ... done
    Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: fastbpe
    Building wheel for fastbpe (pyproject.toml) ... error
    error: subprocess-exited-with-error

    × Building wheel for fastbpe (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [18 lines of output]
    running bdist_wheel
    running build
    running build_py
    running build_ext
    building 'fastBPE' extension
    creating build
    creating build\temp.win-amd64-cpython-311
    creating build\temp.win-amd64-cpython-311\Release
    creating build\temp.win-amd64-cpython-311\Release\fastBPE
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Id:\Product\text_summarizer_bert.venv\include "-Ic:\Program Files\Python311\include" "-Ic:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" /EHsc /TpfastBPE/fastBPE.cpp /Fobuild\temp.win-amd64-cpython-311\Release\fastBPE/fastBPE.obj -std=c++11 -Ofast -pthread
    cl : Command line warning D9025 : overriding '/Os' with '/Ot'
    cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
    cl : Command line warning D9002 : ignoring unknown option '-Of'
    cl : Command line warning D9002 : ignoring unknown option '-Oa'
    cl : Command line warning D9002 : ignoring unknown option '-pthread'
    fastBPE.cpp
    fastBPE/fastBPE.cpp(205): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe' failed with exit code 2
    [end of output]

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

  13. Dreamsorcerer commented on Apr 17, 2024

    @Dreamsorcerer
    Member

    fastbpe is not aiohttp...

  14. TamAIRC commented on Apr 20, 2024

    @TamAIRC

    I see it same bug

  15. Dreamsorcerer commented on Apr 20, 2024

    @Dreamsorcerer
    Member

    fastbpe has not been updated in 5 years, that's your problem. Nothing to do with us...

  16. locked as off topic and limited conversation to collaborators on Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions