Bug 439767 - OpenEXR-related compile errors
Summary: OpenEXR-related compile errors
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kimageformats
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.84.0
Platform: Homebrew (macOS) macOS
: NOR critical
Target Milestone: ---
Assignee: Alex Merry
URL: https://invent.kde.org/packaging/home...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-12 04:00 UTC by Yurii Kolesnykov
Modified: 2021-07-13 21:04 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 Yurii Kolesnykov 2021-07-12 04:00:12 UTC
SUMMARY
kimageformats build errors if OpenEXR 3.0.5 installed. Reproducible on stable as well as in the latest master.

STEPS TO REPRODUCE
1. Install OpenEXR
2. Try to build kimageformats

OBSERVED RESULT
../src/imageformats/exr.cpp:47:16: error: virtual function 'tellg' has a different return type ('Imf::Int64' (aka 'unsigned long')) than the function it overrides (which has return type 'uint64_t' (aka 'unsigned long long'))
    Imf::Int64 tellg() override;
<...>
../src/imageformats/exr.cpp:48:32: error: non-virtual member function marked 'override' hides virtual member function
    void seekg(Imf::Int64 pos) override;                               ^
<...>
../src/imageformats/exr.cpp:170:19: error: variable type 'K_IStream' is an abstract class
        K_IStream istr(device(), QByteArray());


More details are here: https://invent.kde.org/packaging/homebrew-kde/-/snippets/1748

EXPECTED RESULT
Should build with recent OpenEXR

SOFTWARE/OS VERSIONS
macOS: 11.4 (Big Sur)
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Comment 1 Bug Janitor Service 2021-07-12 18:16:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kimageformats/-/merge_requests/33
Comment 2 Albert Astals Cid 2021-07-13 21:04:49 UTC
Git commit 5aa03c12add871996aaa865adf32554e4174ed06 by Albert Astals Cid.
Committed on 12/07/2021 at 18:15.
Pushed by aacid into branch 'master'.

exr: Override the actual function signature

For gcc there's a typedef that makes it work, but seems clang in macos is
not so lucky

M  +4    -4    src/imageformats/exr.cpp

https://invent.kde.org/frameworks/kimageformats/commit/5aa03c12add871996aaa865adf32554e4174ed06