xbrianh / xbgzip

Fast streams for block gzip files.
MIT License
6 stars 2 forks source link

Python3.11 fails to install due to: "longintrepr.h: No such file or directory" #9

Closed davmlaw closed 3 months ago

davmlaw commented 1 year ago
python3.11 -m pip install bgzip

Fails with:

Collecting bgzip
  Using cached bgzip-0.4.0.tar.gz (62 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: bgzip
  Building wheel for bgzip (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/bgzip
      copying bgzip/version.py -> build/lib.linux-x86_64-cpython-311/bgzip
      copying bgzip/__init__.py -> build/lib.linux-x86_64-cpython-311/bgzip
      running build_ext
      INFO: Disabling color, you really want to install colorlog.
      Disabling color, you really want to install colorlog.
      building 'bgzip.bgzip_utils' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/bgzip_utils
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c bgzip_utils/bgzip_utils.c -o build/temp.linux-x86_64-cpython-311/bgzip_utils/bgzip_utils.o -O3 -fopenmp
      bgzip_utils/bgzip_utils.c:198:12: fatal error: longintrepr.h: No such file or directory
        198 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-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 bgzip
  Running setup.py clean for bgzip
Failed to build bgzip
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy
$ uname -m
x86_64
davmlaw commented 1 year ago

This works as a workaround:

python3.11 -m pip install --upgrade cython
git clone https://github.com/xbrianh/xbgzip
cd xbgzip
make bgzip_utils.c
python3.11 -m pip install .
clintval commented 3 months ago

Same issue here making it tough to use this library in a downstream package.

If native 3.11 and 3.12 support was included, that would be excellent!

xbrianh commented 3 months ago

Hi All,

I've rolled a new release of bgzip. Hopefully your install experiences are improved with pip install "bgzip==0.5.0"

btw this is an experimental copy of bgzip. Further issues, complaints, or denunciations should be raises on the main repo found here.