obs build Debian_10
and obs build Debian_11
failed with The headers or library files could not be found for zlib
#7066
Closed
Description
What did you do?
I am packaging pillow as .deb with OBS service (see https://build.opensuse.org/package/show/home:alvistack/python-pillow-Pillow-9.5.0 and alvistack@61ac84f), but only failed for Debian 10/11 with The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source.
.
After revert setup.py
from 9.4.0, the build passed successfully.
What did you expect to happen?
As like as Debian Testing (https://build.opensuse.org/build/home:alvistack/Debian_Testing/x86_64/python-pillow-Pillow-9.5.0/_log), /usr/include/zlib.h
should be detected and build should be passing.
What actually happened?
https://build.opensuse.org/build/home:alvistack/Debian_10/x86_64/python-pillow-Pillow-9.5.0/_log:
[ 113s] running build_ext
[ 113s]
[ 113s]
[ 113s] The headers or library files could not be found for zlib,
[ 113s] a required dependency when compiling Pillow from source.
[ 113s]
[ 113s] Please see the install instructions at:
[ 113s] https://pillow.readthedocs.io/en/latest/installation.html
[ 113s]
[ 113s] Traceback (most recent call last):
[ 113s] File "setup.py", line 997, in <module>
[ 113s] zip_safe=not (debug_build() or PLATFORM_MINGW),
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 108, in setup
[ 113s] return distutils.core.setup(**attrs)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
[ 113s] return run_commands(dist)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
[ 113s] dist.run_commands()
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
[ 113s] self.run_command(cmd)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1221, in run_command
[ 113s] super().run_command(command)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
[ 113s] cmd_obj.run()
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build.py", line 131, in run
[ 113s] self.run_command(cmd_name)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
[ 113s] self.distribution.run_command(command)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1221, in run_command
[ 113s] super().run_command(command)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
[ 113s] cmd_obj.run()
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 84, in run
[ 113s] _build_ext.run(self)
[ 113s] File "/usr/lib/python3/dist-packages/Cython/Distutils/old_build_ext.py", line 186, in run
[ 113s] _build_ext.build_ext.run(self)
[ 113s] File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
[ 113s] self.build_extensions()
[ 113s] File "setup.py", line 809, in build_extensions
[ 113s] raise RequiredDependencyException(f)
[ 113s] __main__.RequiredDependencyException: zlib
[ 113s]
[ 113s] During handling of the above exception, another exception occurred:
[ 113s]
[ 113s] Traceback (most recent call last):
[ 113s] File "setup.py", line 1010, in <module>
[ 113s] raise RequiredDependencyException(msg)
[ 113s] __main__.RequiredDependencyException:
[ 113s]
[ 113s] The headers or library files could not be found for zlib,
[ 113s] a required dependency when compiling Pillow from source.
[ 113s]
[ 113s] Please see the install instructions at:
[ 113s] https://pillow.readthedocs.io/en/latest/installation.html
What are your OS, Python and Pillow versions?
- OS: Debian 10/11
- Python: 3.7/3.9
- Pillow: 9.5.0
$ sudo find /var/tmp/build-root/Debian*-x86_64/.mount/ -type f -name zlib.h
/var/tmp/build-root/Debian_10-x86_64/.mount/usr/include/zlib.h
/var/tmp/build-root/Debian_11-x86_64/.mount/usr/include/zlib.h
/var/tmp/build-root/Debian_Testing-x86_64/.mount/usr/include/zlib.h