[Solved] OpenColorIO problem when compiling ART

Hello, I did a fresh install of Xubuntu 24.04 last week but now I have a problem compiling ART.

First I configure this way:

cd ~/apps/art && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TCMALLOC="OFF" 


-- searching for library exiv2 in /usr/lib/x86_64-linux-gnu
--   result: /usr/lib/x86_64-linux-gnu/libexiv2.so
-- searching for library lensfun in /usr/lib/x86_64-linux-gnu
--   result: /usr/lib/x86_64-linux-gnu/liblensfun.so
-- using mimalloc library 1.8
-- using libraw library 0.21.2
-- using OpenColorIO library 2.4.0
-- CTL lib found with headers at /usr/local/include/CTL
-- Found CTL interpreter, version 1
-- Configuring done (0.1s)
-- Generating done (0.1s)
-- Build files have been written to: /home/paul/apps/art

OpenColorIO is there as are the CTL lib and interpreter. So everything seems fine.

Now I do a $ sudo make -j5 install and the build process starts, up to 100% but then some errors occur:

[ 99%] Building CXX object rtgui/CMakeFiles/art.dir/thumbimgcache.cc.o
[100%] Building CXX object rtgui/CMakeFiles/art.dir/clutparamspanel.cc.o
[100%] Linking CXX executable ART
/usr/bin/ld: ../rtengine/librtengine.a(clutstore.cc.o): in function `rtengine::CLUTStore::getOCIOLut(Glib::ustring const&) const':
clutstore.cc:(.text+0x6f6d): undefined reference to `OpenColorIO_v2_1::Config::CreateRaw()'
/usr/bin/ld: clutstore.cc:(.text+0x6f7a): undefined reference to `OpenColorIO_v2_1::FileTransform::Create()'
/usr/bin/ld: clutstore.cc:(.text+0x75e6): undefined reference to `OpenColorIO_v2_1::FileTransform::setSrc(char const*)'
/usr/bin/ld: clutstore.cc:(.text+0x75f8): undefined reference to `OpenColorIO_v2_1::FileTransform::setInterpolation(OpenColorIO_v2_1::Interpolation)'
/usr/bin/ld: clutstore.cc:(.text+0x763e): undefined reference to `OpenColorIO_v2_1::Config::getProcessor(std::shared_ptr<OpenColorIO_v2_1::Transform const> const&) const'
/usr/bin/ld: ../rtengine/librtengine.a(clutstore.cc.o): in function `rtengine::CLUTApplication::OCIO_init()':
clutstore.cc:(.text+0x7ee9): undefined reference to `OpenColorIO_v2_1::Processor::getOptimizedCPUProcessor(OpenColorIO_v2_1::BitDepth, OpenColorIO_v2_1::BitDepth, OpenColorIO_v2_1::OptimizationFlags) const'
/usr/bin/ld: ../rtengine/librtengine.a(clutstore.cc.o): in function `rtengine::CLUTApplication::OCIO_apply(int, float*, float*, float*)':
clutstore.cc:(.text._ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_[_ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_]+0x4b9): undefined reference to `OpenColorIO_v2_1::PackedImageDesc::PackedImageDesc(void*, long, long, long)'
/usr/bin/ld: clutstore.cc:(.text._ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_[_ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_]+0x4c9): undefined reference to `OpenColorIO_v2_1::CPUProcessor::apply(OpenColorIO_v2_1::ImageDesc&) const'
/usr/bin/ld: clutstore.cc:(.text._ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_[_ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_]+0x90f): undefined reference to `OpenColorIO_v2_1::PackedImageDesc::~PackedImageDesc()'
/usr/bin/ld: clutstore.cc:(.text._ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_[_ZN8rtengine15CLUTApplication10OCIO_applyEiPfS1_S1_]+0x107a): undefined reference to `OpenColorIO_v2_1::PackedImageDesc::~PackedImageDesc()'
collect2: error: ld returned 1 exit status
make[2]: *** [rtgui/CMakeFiles/art.dir/build.make:2615: rtgui/ART] Fout 1
make[1]: *** [CMakeFiles/Makefile2:191: rtgui/CMakeFiles/art.dir/all] Fout 2
make: *** [Makefile:136: all] Fout 2

I’ve no idea what to do now, any help is much appreciated.

Where did you get 2.4.0 from? The latest version that I see from github is 2.3.2, which works fine for me.

OCIO master reports as 2.4.0

I installed OpenColorIO from Synaptic.

I did that, because I had configure problems when using the github clone.

-- Checking for optional dependencies...
-- Installed lcms2 (version "2.2")
-- Checking if the OpenImageIO found is built with OpenEXR 3+...
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/OpenImageIO/OpenImageIOTargets.cmake:130 (message):
  The imported target "OpenImageIO::iconvert" references the file


  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained


  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/OpenImageIO/OpenImageIOConfig.cmake:105 (include)
  share/cmake/macros/ocio_handle_dependency.cmake:114 (find_package)
  share/cmake/modules/FindExtPackages.cmake:222 (ocio_handle_dependency)
  CMakeLists.txt:449 (include)
-- Configuring incomplete, errors occurred!

Ok, but it seems like a strange choice for a LTS release… Anyway I’ll take a look

BTW, on Xubuntu 23.04 everything ran well.

ubuntu 24.04 does not ship with ocio 2.4.0 Ubuntu – Package Search Results -- opencolorio

@paulmatth did you install that version yourself?

Hello, I first tried to install OpenColorIO using the instructions on Bitbucket:

cd ~/apps
git clone https://github.com/AcademySoftwareFoundation/OpenColorIO.git
mkdir tmp/ociobuild
cd tmp/ociobuild
make -j 4 
sudo make install

But the cmake line ended up with the errors as described in my post #4 above.

Then I decided to use Synaptic to install OpenColorIO. And you’re right, that’s version 2.1.3. So why shows the configure output in my first post v2.4.0??

OK, I’m not a programmer and maybe I made some errors somewhere. But as said, I had this thing running under Xubuntu 23.04…

Hmmm, could it be you have a corrupted installation somehow? Did you try deleting everything ocio-related and installing the package again?

Yes Alberto, several times even.

But I’ll take another look this weekend and delete all the ocio stuff in /usr/bin, /usr/local/bin and /usr/local/share. Perhaps that helps.

OK, problem solved.

In Synaptic I uninstalled four ocio related packages. I manually deleted ocio related files in /usr/bin etc. Then I did a configure, make and install on ocio - without errors this time.

Then I recompiled ART - no errors, and the CTL scripts were there as before!

Thanks @agriggio and @darix for your help.

Great! Just FYI, ocio is not needed for CTL scripts though – you only need it if you use clf luts.

Ah, I didn’t know that, I thought ocio was a base for CTL as well.

So actually, problem double solved ! :grinning: