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

pillow-9.5.0 fails to build #1139

Open
pmiddend opened this issue Apr 26, 2023 · 5 comments
Open

pillow-9.5.0 fails to build #1139

pmiddend opened this issue Apr 26, 2023 · 5 comments

Comments

@pmiddend
Copy link
Contributor

Describe the issue

I have pillow = "9.5.0" in my pyproject.toml, and it fails because:

python3.10-pillow>   The headers or library files could not be found for zlib,
python3.10-pillow>   a required dependency when compiling Pillow from source.

Adding zlib to buildInputs in my overrides as in:

pillow = super.pillow.overrideAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.zlib ]; });

Results in the same error.

I've checked the predefined overrides and saw that pillow is already included, see here.

With 9.4.0 (the previous version) poetry2nix worked fine, so something about their build process must have changed.

@adisbladis
Copy link
Member

This is because of an upstream issue: python-pillow/Pillow#7069.

@adisbladis
Copy link
Member

We should apply that PR as a patch on 9.5.0.

sigprof added a commit to sigprof/nix-devenv-qmk that referenced this issue May 5, 2023
There is a bug in the `pillow` 9.5.0 release that breaks the build:

  nix-community/poetry2nix#1139
  python-pillow/Pillow#7069

Apply the patch with the upstream fix when building version 9.5.0.

The old override is still kept, even though the main part of that
override was included in nix-community/poetry2nix#689 (the problem is
that `buildInputs` in the poetry2nix override does not include all
packages that are in the nixpkgs package for `pillow`, and therefore
`preConfigure` might add references to nonexistent packages).
@asymmetric
Copy link
Contributor

Or have it fixed in nixpkgs, see NixOS/nixpkgs#228493

@adisbladis
Copy link
Member

Or have it fixed in nixpkgs, see NixOS/nixpkgs#228493

This will not fix it in poetry2nix as we're not using nixpkgs definitions.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/different-behavior-of-pil-in-docker-vs-nix/37064/6

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