Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 877753

Summary: media-libs/openimageio-2.4.4.1: Failing to compile due to media-libs/opencolorio and dev-libs/expat cmake imports
Product: Gentoo Linux Reporter: Ivan J. <parazyd>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: major CC: freedesktop-bugs, negril.nx+gentoo, proxy-maint, sping
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 895714    
Bug Blocks:    
Attachments: emerge.info
build.log

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