Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

JPEG not detected when installing Pillow under Cygwin64 #6216

Copy link
Copy link
Closed
@biogberg

Description

@biogberg
Issue body actions

Hello,

Attempting to install the current version of Pillow (9.1.0) fails with Python-3.9.10 under Cygwin64. I attempted installing both via pip3 and via python3 setup.py build. Both fail the same way.

Installation succeeds until the configuration stops with a message that the required headers and/or library files for jpeg were not found.

Jpeg packages (both jpeg and openjpeg) are installed including the developer packages. Both header files and library files are in fact present in the right directories.

I had a hunch that this might be a library file naming issue. In /usr/lib the following jpeg-related files are present:
/usr/lib/libjpeg.dll.a
/usr/lib/libopenjpeg.dll.a

To test, I built and installed a static libjpeg.a and put libjpeg.a file in /usr/local/lib. That done, the build succeeded to the point that the extension was built. However, most other supporting libraries were not detected despite that most of them were in fact installed (including developer packages); the corresponding packages all exclusively install shared libraries (dll's), not static:

The output from the build produced:

--------------------------------------------------------------------
PIL SETUP SUMMARY
--------------------------------------------------------------------
version      Pillow 9.1.0
platform     cygwin 3.9.10 (main, Jan 20 2022, 21:37:52)
             [GCC 11.2.0]
--------------------------------------------------------------------
--- JPEG support available
*** OPENJPEG (JPEG2000) support not available
--- ZLIB (PNG/ZIP) support available
*** LIBIMAGEQUANT support not available
*** LIBTIFF support not available
*** FREETYPE2 support not available
*** RAQM (Text shaping) support not available
*** LITTLECMS2 support not available
*** WEBP support not available
*** WEBPMUX support not available
*** XCB (X protocol) support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library and headers.

There is in fact a zlib static library in /usr/lib and, thus, presence of zlib was detected.

So either:

  1. the build currently only works with static libraries, or
  2. there is a an issue with properly detecting the shared libraries.

Under Cygwin the dll files are located in /usr/bin with names such as cygtiff-6.dll, cygjpeg-8.dll, cygopenjpeg-1.dll, cygimagequant-0.dll etc. The link files have names such as libjpeg.dll.a etc.

  • OS: Cygwin64 under Windows 10 (64 bit) updated
  • Python: 3.9.10 (Cygwin64 version updated)
  • Pillow: 9.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.