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): ----- C:/msys64/home/user/M/mingw-w64-krita/src/krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp:513:20: error: no matching function for call to 'JxlDecoderGetColorAsEncodedProfile' 513 | == JxlDecoderGetColorAsEncodedProfile(dec.get(), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/clang64/include/jxl/decode.h:749:29: note: candidate function not viable: requires 3 arguments, but 4 were provided 749 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsEncodedProfile( | ^ 750 | const JxlDecoder* dec, JxlColorProfileTarget target, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 751 | JxlColorEncoding* color_encoding); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/home/user/M/mingw-w64-krita/src/krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp:638:24: error: no matching function for call to 'JxlDecoderGetICCProfileSize' 638 | != JxlDecoderGetICCProfileSize(dec.get(), nullptr, JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/clang64/include/jxl/decode.h:775:29: note: candidate function not viable: requires 3 arguments, but 4 were provided 775 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetICCProfileSize( | ^ 776 | const JxlDecoder* dec, JxlColorProfileTarget target, size_t* size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/home/user/M/mingw-w64-krita/src/krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp:645:24: error: no matching function for call to 'JxlDecoderGetColorAsICCProfile' 645 | != JxlDecoderGetColorAsICCProfile(dec.get(), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/clang64/include/jxl/decode.h:793:29: note: candidate function not viable: requires 4 arguments, but 5 were provided 793 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsICCProfile( | ^ 794 | const JxlDecoder* dec, JxlColorProfileTarget target, uint8_t* icc_profile, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 795 | size_t size); | ~~~~~~~~~~~ C:/msys64/home/user/M/mingw-w64-krita/src/krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp:659:28: error: no matching function for call to 'JxlDecoderGetICCProfileSize' 659 | != JxlDecoderGetICCProfileSize(dec.get(), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/clang64/include/jxl/decode.h:775:29: note: candidate function not viable: requires 3 arguments, but 4 were provided 775 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetICCProfileSize( | ^ 776 | const JxlDecoder* dec, JxlColorProfileTarget target, size_t* size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/home/user/M/mingw-w64-krita/src/krita-5.2.2/plugins/impex/jxl/JPEGXLImport.cpp:669:28: error: no matching function for call to 'JxlDecoderGetColorAsICCProfile' 669 | != JxlDecoderGetColorAsICCProfile(dec.get(), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/msys64/clang64/include/jxl/decode.h:793:29: note: candidate function not viable: requires 4 arguments, but 5 were provided 793 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsICCProfile( | ^ 794 | const JxlDecoder* dec, JxlColorProfileTarget target, uint8_t* icc_profile, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 795 | size_t size); | ~~~~~~~~~~~ 5 errors generated. ----- Here is how other projects deal with the API differences, as an example: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/970/diffs
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2040
Git commit ace7edcca6ad322581ab39620f21ccf3ffbd3b5a by Dmitry Kazakov, on behalf of Timo Gurr. Committed on 05/01/2024 at 15:04. Pushed by dkazakov into branch 'master'. Fix build with libjxl 0.9.0 Fix build with libjxl 0.9.0 Test Plan --------- * Upgrade to libjxl 0.9.0 * Apply patch from MR and build krita (5.2.2) * Open/Display a sample image e.g. https://jpegxl.info/test-page/red-room.jxl Formalities Checklist --------------------- - [x] I confirmed this builds. - [x] I confirmed Krita ran and the relevant functions work (Could successfully open/display a sample image https://jpegxl.info/test-page/red-room.jxl). - [ ] I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) - [x] I made sure my commits build individually and have good descriptions as per [KDE guidelines](https://community.kde.org/Policies/Commit_Policy). - [x] I made sure my code conforms to the standards set in the HACKING file. - [x] I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per [KDE Licensing Policy](https://community.kde.org/Policies/Licensing_Policy). _**Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build.**_ _**If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.**_ M +14 -1 plugins/impex/jxl/JPEGXLImport.cpp https://invent.kde.org/graphics/krita/-/commit/ace7edcca6ad322581ab39620f21ccf3ffbd3b5a
Git commit 021389637e50638b096c7227cf5c06e6444cef89 by Dmitry Kazakov, on behalf of Timo Gurr. Committed on 28/01/2024 at 10:13. Pushed by dkazakov into branch 'krita/5.2'. Fix build with libjxl 0.9.0 Fix build with libjxl 0.9.0 Test Plan --------- * Upgrade to libjxl 0.9.0 * Apply patch from MR and build krita (5.2.2) * Open/Display a sample image e.g. https://jpegxl.info/test-page/red-room.jxl Formalities Checklist --------------------- - [x] I confirmed this builds. - [x] I confirmed Krita ran and the relevant functions work (Could successfully open/display a sample image https://jpegxl.info/test-page/red-room.jxl). - [ ] I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) - [x] I made sure my commits build individually and have good descriptions as per [KDE guidelines](https://community.kde.org/Policies/Commit_Policy). - [x] I made sure my code conforms to the standards set in the HACKING file. - [x] I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per [KDE Licensing Policy](https://community.kde.org/Policies/Licensing_Policy). _**Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build.**_ _**If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.**_ M +14 -1 plugins/impex/jxl/JPEGXLImport.cpp https://invent.kde.org/graphics/krita/-/commit/021389637e50638b096c7227cf5c06e6444cef89