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

"lzomodule.c:38:10: fatal error: lzo/lzo1.h: No such file or directory" on Ubuntu / missing wheels #85

Open
mxmlnkn opened this issue Apr 20, 2024 · 2 comments

Comments

@mxmlnkn
Copy link

mxmlnkn commented Apr 20, 2024

It seems that only wheels for MacOS and Windows are available on PyPI. This results in the following error on pip install python-lzo:

Defaulting to user installation because normal site-packages is not writeable
Collecting python-lzo
  Downloading python-lzo-1.15.tar.gz (17 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: python-lzo
  Building wheel for python-lzo (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for python-lzo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      lzomodule.c:38:10: fatal error: lzo/lzo1.h: No such file or directory
         38 | #include <lzo/lzo1.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 python-lzo
Failed to build python-lzo
ERROR: Could not build wheels for python-lzo, which is required to install pyproject.toml-based projects

After installing the missing dependencies with sudo apt install liblzo2-dev, it builds fine.

@jd-boyd
Copy link
Owner

jd-boyd commented Apr 20, 2024

I thought the apt install part was mentioned in the readme, but I just double checked before saying that and I'm wrong. So I guess that will need to be fixed. Unless I'm behind on the times, binary wheels for Linux are not particularly portable across all versions of Linux. Those I believe The goal is to have binary wheels for windows and Mac OS, but only source for Linux.

@mxmlnkn
Copy link
Author

mxmlnkn commented Apr 20, 2024

As far as I know, manylinux solved the wheels-for-Linux problem. Most Python packages publish manylinux wheels to avoid additional manual user installation steps such as the one I had to do. I saw cibuildwheel mentioned, which I am also using for my packages. Normally, it should build all (manylinux) wheels automatically.

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

2 participants