Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 877753 - media-libs/openimageio-2.4.4.1: Failing to compile due to media-libs/opencolorio and dev-libs/expat cmake imports
Summary: media-libs/openimageio-2.4.4.1: Failing to compile due to media-libs/opencolo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major with 1 vote (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on: 895714
Blocks:
  Show dependency tree
 
Reported: 2022-10-20 11:39 UTC by Ivan J.
Modified: 2023-09-26 20:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge.info (file_877753.txt,18.36 KB, text/plain)
2022-10-20 11:40 UTC, Ivan J.
Details
build.log (file_877753.txt,13.69 KB, text/plain)
2022-10-20 11:41 UTC, Ivan J.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan J. 2022-10-20 11:39:52 UTC
When trying to compile openimageio, the ebuild fails during cmake configuration by looking for expat, like so:

```
CMake Error at /usr/lib64/cmake/OpenColorIO/OpenColorIOTargets.cmake:70 (set_target_properties):
  The link interface of target "OpenColorIO::OpenColorIO" contains:

    expat::expat

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/lib64/cmake/OpenColorIO/OpenColorIOConfig.cmake:22 (include)
  src/cmake/modules/FindOpenColorIO.cmake:31 (find_package)
  src/cmake/checked_find_package.cmake:127 (find_package)
  src/cmake/externalpackages.cmake:177 (checked_find_package)
  CMakeLists.txt:151 (include)
```

It seems that it's connected with opencolorio, and in turn - expat.

Reproducible: Always

Steps to Reproduce:
1. emerge '=media-libs/openimageio-2.4.4.1'
Actual Results:  
The ebuild fails during the cmake configure step, as described.


emerge --info and build.log attached.
Comment 1 Ivan J. 2022-10-20 11:40:47 UTC
Created attachment 824849 [details]
emerge.info
Comment 2 Ivan J. 2022-10-20 11:41:28 UTC
Created attachment 824851 [details]
build.log
Comment 3 Sebastian Pipping gentoo-dev 2022-10-20 14:53:31 UTC
I run into the same build error locally.  When playing with things a bit, I find that file /usr/lib64/cmake/OpenColorIO/OpenColorIOTargets.cmake has this block of code:

>> set_target_properties(OpenColorIO::OpenColorIO PROPERTIES
>>   INTERFACE_COMPILE_FEATURES "cxx_std_11"
>>   INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
>>   INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:expat::expat>;\$<LINK_ONLY:Imath::Imath>;\$<LINK_ONLY:pystring::pystring>;\$<LINK_ONLY:sampleicc::sampleicc>;\$<LINK_ONLY:utils::from_chars>;\$<LINK_ONLY:utils::strings>;\$<LINK_ONLY:yaml-cpp>"
>> )
>> 

My understanding is that OpenColorIO is pulling in Expat (and others) as a public link time dependency while it seems more like a private one.

Even if we were to add "find_package(expat CONFIG REQUIRED)" somewhere to defined target "expat::expat", we would hit Imath next, and so on, I tried.  There is no way to satisfy sampleicc defined at https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/main/ext/sampleicc/CMakeLists.txt that I could think of.

PS: There was this known candidate bug https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1415 but it seems less related than I expected.
Comment 4 Ivan J. 2023-06-29 08:39:10 UTC
Any updates on this one? It's still happening.
Comment 5 Paul Zander 2023-07-15 17:59:37 UTC
This should be fixed in opencolorio-2.2.1 -> https://bugs.gentoo.org/895714