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

cld3/pycld3.cpp:250:12: fatal error: 'longintrepr.h' file not found #35

Open
yannis1962 opened this issue Nov 13, 2023 · 9 comments
Open

Comments

@yannis1962
Copy link

When I try to install pycld3 under python3.11, I get

Collecting pycld3
  Using cached pycld3-0.22.tar.gz (726 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycld3
  Building wheel for pycld3 (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      /Users/yannis/.asdf/installs/python/3.11.6/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      running bdist_wheel
      running build
      Running protoc sentence.proto feature_extractor.proto task_spec.proto --cpp_out=/private/var/folders/1n/fvs3dd2d5gqghwcw8khb41_h0000gn/T/pip-install-8vgx__mm/pycld3_edba16f2021b4244a8cab9a9f11eca98/src/cld_3/protos/
      running build_py
      creating build
      creating build/lib.macosx-13.5-x86_64-cpython-311
      creating build/lib.macosx-13.5-x86_64-cpython-311/cld3
      copying cld3/__init__.py -> build/lib.macosx-13.5-x86_64-cpython-311/cld3
      running build_ext
      building 'cld3._cld3' extension
      creating build/temp.macosx-13.5-x86_64-cpython-311
      creating build/temp.macosx-13.5-x86_64-cpython-311/cld3
      creating build/temp.macosx-13.5-x86_64-cpython-311/src
      creating build/temp.macosx-13.5-x86_64-cpython-311/src/cld_3
      creating build/temp.macosx-13.5-x86_64-cpython-311/src/cld_3/protos
      creating build/temp.macosx-13.5-x86_64-cpython-311/src/script_span
      clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include/ -I/private/var/folders/1n/fvs3dd2d5gqghwcw8khb41_h0000gn/T/pip-install-8vgx__mm/pycld3_edba16f2021b4244a8cab9a9f11eca98/src/ -I/private/var/folders/1n/fvs3dd2d5gqghwcw8khb41_h0000gn/T/pip-install-8vgx__mm/pycld3_edba16f2021b4244a8cab9a9f11eca98/src/cld_3/protos/ -I/Users/yannis/.asdf/installs/python/3.11.6/include/python3.11 -c cld3/pycld3.cpp -o build/temp.macosx-13.5-x86_64-cpython-311/cld3/pycld3.o -std=c++11 -stdlib=libc++
      cld3/pycld3.cpp:250:12: fatal error: 'longintrepr.h' file not found
        #include "longintrepr.h"
                 ^~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' 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 pycld3
  Running setup.py clean for pycld3
Failed to build pycld3
ERROR: Could not build wheels for pycld3, which is required to install pyproject.toml-based projects

What am I doing wrong?

@yannis1962
Copy link
Author

I noticed that other packages have the same problem: aio-libs/aiohttp#6600

@SteveClement
Copy link

This is related to Python 3.11, workaround: use Python 3.10

basically #include "longintrepr.h" is not needed anymore as it is provided by Python.h

@mr2dark
Copy link

mr2dark commented Mar 27, 2024

I've migrated to the recommendedgcld3 package after all attempts to work around various Python 3.11 build issues. I've managed to build gcld3 for Python 3.11.

@mr2dark
Copy link

mr2dark commented Mar 27, 2024

For the record, in my case on Debian 12 gcld3 needs the libprotobuf32 package to run. The following packages are needed to build/install gcld3:

  • build_essential
  • libprotobuf_dev
  • protobuf_compiler

miku added a commit to miku/siskin that referenced this issue May 14, 2024
@KIC
Copy link

KIC commented Oct 28, 2024

I've migrated to the recommendedgcld3 package after all attempts to work around various Python 3.11 build issues. I've managed to build gcld3 for Python 3.11.

I still have the longintrepr.h error, how did you manage to get it installed on python 3.11?

@mr2dark
Copy link

mr2dark commented Oct 28, 2024

I still have the longintrepr.h error, how did you manage to get it installed on python 3.11?

Which package do you try to install when you get the longintrepr.h error?

@KIC
Copy link

KIC commented Oct 28, 2024

python --version

Python 3.11.10

python -m pip install -U pycld3

     cld3/pycld3.cpp:250:12: fatal error: longintrepr.h: No such file or directory
        250 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

@mr2dark
Copy link

mr2dark commented Oct 28, 2024

pycld3 won't work with Python 3.11. Please migrate to another package named gcld3.

@KIC
Copy link

KIC commented Oct 29, 2024

Thanks that worked, sorry this was confusing i thought gcld3 is the "old" package. However, thank you very much!!

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

4 participants