Bug 502474

Summary: kimageformats fails to build with OpenEXR 3.3.3
Product: [Frameworks and Libraries] frameworks-kimageformats Reporter: Kyle Devir <kyle.devir>
Component: generalAssignee: Alex Merry <alex.merry>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aacid, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kyle Devir 2025-04-06 05:42:56 UTC
FAILED: bin/imageformats/kimg_exr.so 
: && /usr/bin/c++ -fPIC -pipe -fno-operator-names -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Werror=undef -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -pedantic -Wzero-as-null-pointer-constant -Wmissing-include-dirs -fdiagnostics-color=always -fexceptions -g  -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--enable-new-dtags  -Wl,-Bsymbolic-functions -shared  -o bin/imageformats/kimg_exr.so src/imageformats/CMakeFiles/kimg_exr.dir/kimg_exr_autogen/mocs_compilation.cpp.o src/imageformats/CMakeFiles/kimg_exr.dir/exr.cpp.o src/imageformats/CMakeFiles/kimg_exr.dir/scanlineconverter.cpp.o  -Wl,-rpath,:::::::::::::::::::::::::::::::::::::::::::::::::::  /usr/lib/libQt6Gui.so.6.9.0  /usr/lib/libOpenEXR-3_3.so.32.3.3.3  /usr/lib/libGLX.so  /usr/lib/libOpenGL.so  /usr/lib/libQt6Core.so.6.9.0  /usr/lib/libIlmThread-3_3.so.32.3.3.3  /usr/lib/libIex-3_3.so.32.3.3.3  /usr/lib/libOpenEXRCore-3_3.so.32.3.3.3  /run/media/valmar/DataSSD/KDE/usr/lib/libImath-3_2_d.a  -lm && :
/usr/bin/ld: src/imageformats/CMakeFiles/kimg_exr.dir/exr.cpp.o: in function `EXRHandler::write(QImage const&)':
/run/media/valmar/DataSSD/KDE/Sources/kimageformats/src/imageformats/exr.cpp:561:(.text+0x3d67): undefined reference to `Imf_3_3::Header::Header(int, int, float, Imath_3_2::Vec2<float> const&, float, Imf_3_3::LineOrder, Imf_3_3::Compression)'
collect2: error: ld returned 1 exit status
Comment 1 Antonio Rojas 2025-04-06 07:52:02 UTC
This looks like a mismatch bewteen the openexr and imath versions used at build time (ie. you're building against system openexr, which I assume links to a system imath, yet you are using with a custom imath), rather than a problem in kimageformats. FWIW it builds fine here using openexr 3.3.
Comment 2 Kyle Devir 2025-04-12 05:21:00 UTC
@Antonio Rojas

I did a naive rebuild with the Arch imath PKGBUILD, along with openexr, and it seems that the issue is that imath was simply forgotten. Maybe it was never reported as broken, or something.

Shall report.
Comment 3 Antonio Rojas 2025-04-12 08:05:15 UTC
No, as I said, the problem is that you were mixing a local build of imath with a system openexr