cgohlke / imagecodecs

Image transformation, compression, and decompression codecs
https://pypi.org/project/imagecodecs
BSD 3-Clause "New" or "Revised" License
117 stars 23 forks source link

Fails to build with libjxl v0.9: use of undeclared identifier 'JXL_DEC_EXTENSIONS' #90

Closed lazka closed 9 months ago

lazka commented 9 months ago

The last libjxl release removed some deprecated things and changed API/ABI in some places: https://github.com/libjxl/libjxl/releases/tag/v0.9.0

The build currently fails like this (there might be more issues):

imagecodecs/_jpegxl.c:20938:51: error: use of undeclared identifier 'JXL_DEC_EXTENSIONS'
 20938 |     __pyx_t_3 = __Pyx_PyInt_From_JxlDecoderStatus(JXL_DEC_EXTENSIONS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __py...
       |                                                   ^
1 warning and 1 error generated.
error: command 'C:\\msys64\\clang64\\bin/clang.exe' failed with exit code 1

Here is how other projects deal with the API differences, as an example: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/970/diffs

cgohlke commented 9 months ago

That's already fixed in the development version. The next release will require libjxl 0.9.x.

cgohlke commented 9 months ago

Should be fixed in v2024.1.1.