olokelo / jxlpy

Cython bindings and Pillow plugin for JPEG XL
MIT License
45 stars 12 forks source link

Not working with recent `libjxl` 0.9 due to API change #20

Closed cmahnke closed 5 months ago

cmahnke commented 5 months ago
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14-arm64-cpython-311
      creating build/lib.macosx-14-arm64-cpython-311/jxlpy
      copying jxlpy/JXLImagePlugin.py -> build/lib.macosx-14-arm64-cpython-311/jxlpy
      copying jxlpy/__init__.py -> build/lib.macosx-14-arm64-cpython-311/jxlpy
      running egg_info
      writing jxlpy.egg-info/PKG-INFO
      writing dependency_links to jxlpy.egg-info/dependency_links.txt
      writing requirements to jxlpy.egg-info/requires.txt
      writing top-level names to jxlpy.egg-info/top_level.txt
      reading manifest file 'jxlpy.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'jxlpy.egg-info/SOURCES.txt'
      copying jxlpy/JXLImagePlugin.py -> build/lib.macosx-14-arm64-cpython-311/jxlpy
      copying jxlpy/__init__.py -> build/lib.macosx-14-arm64-cpython-311/jxlpy
      running build_ext
      building '_jxlpy' extension
      creating build/temp.macosx-14-arm64-cpython-311
      creating build/temp.macosx-14-arm64-cpython-311/_jxlpy
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/opt/homebrew/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c _jxlpy/_jxl.cpp -o build/temp.macosx-14-arm64-cpython-311/_jxlpy/_jxl.o -O2
      _jxlpy/_jxl.cpp:6217:27: error: use of undeclared identifier 'JxlEncoderOptionsCreate'
        __pyx_v_self->options = JxlEncoderOptionsCreate(__pyx_v_self->encoder, NULL);
                                ^
      _jxlpy/_jxl.cpp:6315:26: error: use of undeclared identifier 'JxlEncoderOptionsSetLossless'; did you mean 'JxlEncoderSetFrameLossless'?
        __pyx_v_self->status = JxlEncoderOptionsSetLossless(__pyx_v_self->options, __pyx_t_9);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                               JxlEncoderSetFrameLossless
      /opt/homebrew/include/jxl/encode.h:1392:29: note: 'JxlEncoderSetFrameLossless' declared here
      JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameLossless(
                                  ^
      _jxlpy/_jxl.cpp:6382:26: error: use of undeclared identifier 'JxlEncoderOptionsSetDistance'; did you mean 'JxlEncoderSetFrameDistance'?
        __pyx_v_self->status = JxlEncoderOptionsSetDistance(__pyx_v_self->options, __pyx_t_10);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                               JxlEncoderSetFrameDistance
      /opt/homebrew/include/jxl/encode.h:1409:29: note: 'JxlEncoderSetFrameDistance' declared here
      JXL_EXPORT JxlEncoderStatus JxlEncoderSetFrameDistance(
                                  ^
      _jxlpy/_jxl.cpp:6457:26: error: use of undeclared identifier 'JxlEncoderOptionsSetDecodingSpeed'
        __pyx_v_self->status = JxlEncoderOptionsSetDecodingSpeed(__pyx_v_self->options, __pyx_t_4);
                               ^
      _jxlpy/_jxl.cpp:6532:26: error: use of undeclared identifier 'JxlEncoderOptionsSetEffort'
        __pyx_v_self->status = JxlEncoderOptionsSetEffort(__pyx_v_self->options, __pyx_t_4);
                               ^
      5 errors generated.
      error: command '/usr/bin/clang' 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 jxlpy
Failed to build jxlpy
ERROR: Could not build wheels for jxlpy, which is required to install pyproject.toml-based projects

This has been introduced by current libjxl 0.9, see release notes.

olokelo commented 5 months ago

Fixed in 0.9.3.