FS#77236 - [opencolorio] openshadinglanguage / openimageio - dependency cycle

Attached to Project: Community Packages
Opened by - (xiota) - Monday, 23 January 2023, 00:00 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 07 February 2023, 18:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

`pacman -Syu` reports:

warning: dependency cycle detected:
warning: openshadinglanguage will be installed before its openimageio dependency

`openshadinglanguage` dependencies: boost-libs **openimageio** imath freetype2 libpng libtiff zlib ncurses clang

`openimageio` dependencies: openexr boost-libs openjpeg2 glew libtiff **opencolorio** libpng libraw libwebp pugixml pybind11 libheif hdf5 freetype2

`opencolorio` dependencies: freeglut glew lcms2 tinyxml yaml-cpp imath pystring minizip-ng **openimageio** **openshadinglanguage**
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 07 February 2023, 18:14 GMT
Reason for closing:  Fixed
Comment by Toolybird (Toolybird) - Monday, 23 January 2023, 07:31 GMT
dependency cycles are not a problem per se. It's only a warning afterall and pacman fully supports and copes with them fine. Is there an actual problem here?
Comment by - (xiota) - Monday, 23 January 2023, 21:29 GMT
The problem is inaccurate dependencies. Also, if those dependencies are real, there's a bootstrap problem when building from source.
Comment by Doug Newgard (Scimmia) - Monday, 23 January 2023, 21:39 GMT
How do you know the dependencies are inaccurate?

Bootstrapping happens. If you're trying to build Arch completely from scratch, there are a number of situations like this.
Comment by - (xiota) - Monday, 23 January 2023, 23:25 GMT
As currently built, opencolorio does not appear to reference either openshadinglanguage or openimageio.

````
$ sudo pacman -Runcdd openimageio openshadinglanguage
...

$ namcap /var/cache/pacman/pkg/opencolorio-2.2.0-2-x86_64.pkg.tar.zst
opencolorio W: Unused shared library '/usr/lib/libGLX.so.0' by file ('usr/bin/ociochecklut')
opencolorio W: Unused shared library '/usr/lib/libGLX.so.0' by file ('usr/bin/ocioconvert')
opencolorio W: Unused shared library '/usr/lib/libGLX.so.0' by file ('usr/bin/ociodisplay')
opencolorio E: Dependency openexr detected and not included (libraries ['usr/lib/libOpenEXR-3_1.so.30'] needed in files ['usr/bin/ociolutimage'])
````

opencolorio builds successfully with extra-x86_64-build after replacing openimageio and openshadinglanguage with openexr in the dependencies list.

Grepping the opencolorio source, there are comments that openimageio is optional, not used when openexr is present. openshadinglanguage is used in only some unit tests, but the PKGBUILD doesn't run the unit tests.
Comment by loqs (loqs) - Tuesday, 24 January 2023, 07:17 GMT
I think the change in opencolorio to using OpenEXR was introduced in 2.2.0 [1]. opencolorio's use of OpenShadingLanguage is only in tests when OpenImageIO is being used [2].

[1] https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/8e04da773adfd6ba5bfb31075e963aae26365443
[2] https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/v2.2.0/share/cmake/modules/FindExtPackages.cmake#L149
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 02 February 2023, 01:12 GMT
Alright, I removed the cyclic dependency (and now we also even run the tests). Check out whether this works as intended.
Comment by - (xiota) - Thursday, 02 February 2023, 03:24 GMT
Cyclic dependency still exists between openimageio and opencolorio.

warning: dependency cycle detected:
warning: openimageio will be installed before its opencolorio dependency

To fix, in opencolorio, replace openimageio with openexr (in depends). Then add openimageio to checkdepends.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 02 February 2023, 04:13 GMT
Ah, missed that one! Check now, please.
Comment by - (xiota) - Thursday, 02 February 2023, 22:53 GMT
The cyclic dependency now seems to be fixed. However, according to namcap, dependency on imath is unnecessary. The "Insecure RUNPATH" messages are also new in 2.2.1. (Were not present in 2.2.0 when I first opened this issue.)

opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociobakelut')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociocheck')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociochecklut')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ocioconvert')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociodisplay')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociolutimage')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociomakeclf')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ocioperf')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/bin/ociowrite')
opencolorio E: Insecure RUNPATH '$ORIGIN/../lib' in file ('usr/lib/libOpenColorIO.so.2.2.1')
opencolorio E: Insecure RUNPATH '$ORIGIN/../..' in file ('usr/lib/python3.10/site-packages/PyOpenColorIO.so')
opencolorio W: Unused shared library '/usr/lib/libGLX.so.0' by file ('usr/bin/ociochecklut')
opencolorio W: Unused shared library '/usr/lib/libGLX.so.0' by file ('usr/bin/ocioconvert')
opencolorio W: Unused shared library '/usr/lib/libGLX.so.0' by file ('usr/bin/ociodisplay')
opencolorio W: Dependency imath included but already satisfied

Note: The namcap messages are from the package downloaded from the Arch repository, not a locally built copy.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 07 February 2023, 17:50 GMT
The imath thing will stay as it's a direct dep from opencolorio. We should not depend on transient deps.

Loading...