Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Bebert98 opened this issue Jul 5, 2023 · 2 comments

Comments

@Bebert98
Copy link

Bebert98 commented Jul 5, 2023

Similar issue as here

To reproduce

pip install fastdameraulevenshtein

Logs

Collecting fastdameraulevenshtein
  Using cached fastDamerauLevenshtein-1.0.7.tar.gz (36 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: fastdameraulevenshtein
  Building wheel for fastdameraulevenshtein (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for fastdameraulevenshtein (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      /tmp/pip-build-env-3upkms0f/overlay/lib/python3.11/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
      
              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.
      
              By 2023-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_ext
      building 'fastDamerauLevenshtein' extension
      creating build
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/fastDamerauLevenshtein
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/asl-env/include -I/usr/local/include/python3.11 -c fastDamerauLevenshtein/fastDamerauLevenshtein.c -o build/temp.linux-x86_64-cpython-311/fastDamerauLevenshtein/fastDamerauLevenshtein.o
      fastDamerauLevenshtein/fastDamerauLevenshtein.c:209:12: fatal error: longintrepr.h: No such file or directory
        209 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      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 fastdameraulevenshtein
Failed to build fastdameraulevenshtein

Python version

3.11.4

@liudonghua123
Copy link

longintrepr.h is inclued in python-dev package. You need to install it before build cpython or some python packages.

Execute sudo apt-get install python-dev or yum install python3-devel.

@undera
Copy link

undera commented Aug 22, 2023

@liudonghua123 That does not help. I reproduce it with following Dockerfile:

FROM python:3.11-bullseye                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                             
RUN apt update && apt install -y python-dev

RUN pip install fastdameraulevenshtein

Possibly this relates to cython/cython#4428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants