If you build opencolorio with the static-libs use flag, it does not build the shared libraries. This is expected, as opencolorio only supports building state xor shared libraries. However, openimageio then fails the linking stage, as it depends on opencolorio and needs PIC enabled. Reproducible: Always Steps to Reproduce: 1. Add media-libs/opencolorio static-libs to /etc/portage/package.use/ocio 2. Emerge media-libs/openimageio (with USE=-opengl as needed) 3. Observe the linker error. Actual Results: /usr/libexec/gcc/x86_64-pc-linux-gnu/ld: /usr/lib64/libOpenColorIO.a(OCIOYaml.cpp.o): warning: relocation against `_ZTVN4YAML13BadConversionE' in read-only section `.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]' /usr/libexec/gcc/x86_64-pc-linux-gnu/ld: /usr/lib64/libOpenColorIO.a(ColorSpace.cpp.o): relocation R_X86_64_PC32 against symbol `__libc_single_threaded@@GLIBC_2.32' can not be used when making a shared object; recompile with -fPIC /usr/libexec/gcc/x86_64-pc-linux-gnu/ld: final link failed: bad value collect2: error: ld returned 1 exit status Expected Results: Successful emerge. It would be possible to compile the static library with -fPIC, or possibly to add a static-libs use flag to openimageio so that it doesn't need PIC (and make the ebuild require static-libs to match between the two). However, the simplest solution is to change it to simply require [-static-libs] in its dependencies.
(In reply to Logan Perkins from comment #0) > If you build opencolorio with the static-libs use flag, it does not build > the shared libraries. This is expected, as opencolorio only supports > building state xor shared libraries. Setting USE="static-libs" should never disable shared libs. If the build system doesn't support enabling both, the ebuild can/should apply some workaround.
Fixed in https://github.com/gentoo/gentoo/commit/8deb03176e8b38c374b79b7bdb909991ba16936f