Bug 501213 - heif version requirement needs to be updated in CMakeLists.txt
Summary: heif version requirement needs to be updated in CMakeLists.txt
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kimageformats
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Alex Merry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-08 06:21 UTC by Schrijvers Luc
Modified: 2025-03-10 06:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Schrijvers Luc 2025-03-08 06:21:45 UTC
SUMMARY

Build failure on kimageformats 6.12.0-re1 and heif 1.12.0

STEPS TO REPRODUCE
1. Build the framework kimageformats
2. build will fail with heif version 1.12.0 (requirement in kimageformats mention 1.10.0)

OBSERVED RESULT

Build fails with an error:

```
[ 91%] Built target kimg_psd
/sources/kimageformats-v6.12.0-rc1/src/imageformats/heif.cpp: In member function 'bool HEIFHandler::write_helper(const QImage&)':
/sources/kimageformats-v6.12.0-rc1/src/imageformats/heif.cpp:333:94: error: 'heif_metadata_compression_off' was not declared in this scope
  333 |             err = heif_context_add_XMP_metadata2(context, handle, ba.constData(), ba.size(), heif_metadata_compression_off);
      |                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sources/kimageformats-v6.12.0-rc1/src/imageformats/heif.cpp:333:19: error: 'heif_context_add_XMP_metadata2' was not declared in this scope; did you mean 'heif_context_add_XMP_metadata'?
  333 |             err = heif_context_add_XMP_metadata2(context, handle, ba.constData(), ba.size(), heif_metadata_compression_off);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                   heif_context_add_XMP_metadata
```

EXPECTED RESULT

Build completes.

SOFTWARE/OS VERSIONS
Haiku: R1B5
KDE Frameworks Version: 6.12.0-rc1 (was still OK with 6.11.0)
Qt Version: 6.8.2

ADDITIONAL INFORMATION

Build completed fine after updating local package for heif to 1.19.7
Comment 1 Albert Astals Cid 2025-03-08 23:45:00 UTC
Mirco, we need to increase the heif requirement to 1.14 in CMaKeLists (i think it's when heif_context_add_XMP_metadata2 was introduced) or add some version checks.

I'll leave it up to you.
Comment 2 Bug Janitor Service 2025-03-09 09:46:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kimageformats/-/merge_requests/347