Fix the OpenEXR >= 2.4 detection
AbandonedPublic

Authored by krop on Nov 14 2019, 1:42 PM.

Details

Reviewers
None
Summary

Newer OpenEXR versions add a suffix to the libraries file names.
ECM can now detect OpenEXR 2.3 and newer versions.

Test Plan

kimageformats detects OpenEXR 2.3 and 2.4

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18791
Build 18809: arc lint + arc unit
krop created this revision.Nov 14 2019, 1:42 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptNov 14 2019, 1:42 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
krop requested review of this revision.Nov 14 2019, 1:42 PM
krop added a comment.Nov 14 2019, 1:53 PM

Note: openEXR >= 2.4 provides CMake configuration modules (OpenEXRConfig.cmake and IlmBaseConfig.cmake). We could also look for those and use the current code as a fallback if the modules can't be found

arojas added a subscriber: arojas.EditedNov 14 2019, 4:53 PM

This is a bug in openexr. It does actually try to install the unsuffixed symlinks, but it doesn't take DESTDIR into account, so it tries to install them to the root filesystem instead of doing so inside DESTDIR as it should. It is fixed in https://github.com/openexr/openexr/commit/4e54bde78f65c0fef8a9f794aaacea07813fba09

krop added a comment.Nov 14 2019, 5:19 PM

This is a bug in openexr. It does actually try to install the unsuffixed symlinks, but it doesn't take DESTDIR into account, so it tries to install them to the root filesystem instead of doing so inside DESTDIR as it should. It is fixed in https://github.com/openexr/openexr/commit/4e54bde78f65c0fef8a9f794aaacea07813fba09

I don't see how that commit is related.
openEXR 2.3 installs libXXX.so and 2.4 installs libXXX-2_4.so

This is expected afaics.

I don't see how that commit is related.
openEXR 2.3 installs libXXX.so and 2.4 installs libXXX-2_4.so

This is expected afaics.

No, it's not. That line in openexr is supposed to link libXXX-2_4.so (${verlibname}) to libXXX.so (${baselibname}) but it does so in the wrong dir

krop added a comment.EditedNov 14 2019, 5:26 PM

I don't see how that commit is related.
openEXR 2.3 installs libXXX.so and 2.4 installs libXXX-2_4.so

This is expected afaics.

No, it's not. That line in openexr is supposed to link libXXX-2_4.so (${verlibname}) to libXXX.so (${baselibname}) but it does so in the wrong dir

The pkgconfig file disagrees:
it contains libsuffix=-2_4 and later Libs: -L${libdir} -lIlmImf${libsuffix}
For me, that library name is correct

The pkgconfig file disagrees:
it contains libsuffix=-2_4 and later Libs: -L${libdir} -lIlmImf${libsuffix}
For me, that library name is correct

I didn't say that the suffixed .so shouldn't exist. They are *both* supposed to be installed: the suffixed one and the unsuffixed one which is a symlink to the suffixed one. IOW, your patch is not wrong, it just wouldn't be necessary if it weren't for the openexr bug which is fixed in the linked commit

krop abandoned this revision.Nov 14 2019, 7:57 PM

I applied the patch to our openexr package instead.