Problem to compile OSL (v1.11.14.2) on ubuntu


Patrick Hodoul
 

Hi,

For the OCIOv2 project, I developed a unit test framework to compile and excecute an OSL shader code.
And, I now need to run the OSL unit tests on a Linux platform (I did all my tests on macOS for now).

First of all, I was not able to find the package in apt-get (using the apt-cache search  command). Does the package exists?

Second, I tried to compile OSL on Linux in a docker as it was quite simple on macOS.
Below are my tries to compile OSL:
  • ubuntu 18.04
    • tons of packages to install or manually compile
    • issue with OIIO
      • The installed OIIO is too old i.e. 1.7
      • The OIIO script from OSL fails
      • Manual compilation of OIIO RB-2.0 fails because install pybind11 is too old
      • I stopped my investigations :-(
  • ubuntu 20.04
    • tons of packages to install
    • installed OIIO detected :-)
    • issue with Clang+LLVM
      • the Clang+LLVM script from OSL fails
        • the script is built to run on CI only.
      • apt-get install llvm clang
        • clang is 10.0.0, gcc version 9.3.0
      • cmake -DCMAKE_CXX_STANDARD=14 -DUSE_PYTHON=OFF ../. fails.  :-(
        • /home/devel/osl_1/src/liboslcomp/oslcomp.cpp:24:10: fatal error: clang/Basic/TargetInfo.h: No such file or directory


I'm open to any suggestions, existing docker images, etc.

Thanks,
Patrick


Patrick Hodoul
 
Edited

I found a solution by using the ASWF CI build image for OSL.
Refer here for details.