Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USD 20.11 release & dev branches build failing with OpenColorIO 2.0 - error: ‘DisplayTransformRcPtr’ is not a member of ‘OCIO’ #1386

Closed
mike-truk opened this issue Nov 7, 2020 · 9 comments

Comments

@mike-truk
Copy link

mike-truk commented Nov 7, 2020

Description of Issue

USD 20.11 release and dev branches failing to build against OCIO 2.0 with the following error:

...
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp: In member function ‘std::string pxrInternal_v0_20__pxrReserved__::HdxColorCorrectionTask::_CreateOpenColorIOResources()’:
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:153:15: error: ‘DisplayTransformRcPtr’ is not a member of ‘OCIO’; did you mean ‘DisplayViewTransformRcPtr’?
  153 |         OCIO::DisplayTransformRcPtr transform = OCIO::DisplayTransform::Create();
      |               ^~~~~~~~~~~~~~~~~~~~~
      |               DisplayViewTransformRcPtr
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:154:9: error: ‘transform’ was not declared in this scope; did you mean ‘std::transform’?
  154 |         transform->setDisplay(display);
      |         ^~~~~~~~~
      |         std::transform
In file included from /usr/include/c++/9/algorithm:62,
                 from /usr/include/c++/9/backward/hashtable.h:64,
                 from /usr/include/c++/9/ext/hash_set:64,
                 from /home/build/source/USD/pxr/base/tf/hashset.h:39,
                 from /home/build/source/USD/pxr/base/tf/token.h:37,
                 from /home/build/source/USD/pxr/base/tf/staticTokens.h:82,
                 from /home/build/source/USD/pxr/usd/sdf/tokens.h:29,
                 from /home/build/source/USD/pxr/usd/sdf/path.h:30,
                 from /home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.h:28,
                 from /home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:24:
/usr/include/c++/9/bits/stl_algo.h:4363:5: note: ‘std::transform’ declared here
 4363 |     transform(_InputIterator1 __first1, _InputIterator1 __last1,
      |     ^~~~~~~~~
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:167:29: error: ‘OpenColorIO_v2_0dev::GpuShaderDesc::GpuShaderDesc()’ is protected within this context
  167 |         OCIO::GpuShaderDesc shaderDesc;
      |                             ^~~~~~~~~~
In file included from /home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:42:
/usr/local/include/OpenColorIO/OpenColorIO.h:2987:5: note: declared protected here
 2987 |     GpuShaderDesc();
      |     ^~~~~~~~~~~~~
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:167:29: error: cannot declare variable ‘shaderDesc’ to be of abstract type ‘OpenColorIO_v2_0dev::GpuShaderDesc’
  167 |         OCIO::GpuShaderDesc shaderDesc;
      |                             ^~~~~~~~~~
In file included from /home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:42:
/usr/local/include/OpenColorIO/OpenColorIO.h:2913:18: note:   because the following virtual functions are pure within ‘OpenColorIO_v2_0dev::GpuShaderDesc’:
 2913 | class OCIOEXPORT GpuShaderDesc : public GpuShaderCreator
      |                  ^~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2598:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderCreator::setTextureMaxWidth(unsigned int)’
 2598 |     virtual void setTextureMaxWidth(unsigned maxWidth) = 0;
      |                  ^~~~~~~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2599:22: note: 	‘virtual unsigned int OpenColorIO_v2_0dev::GpuShaderCreator::getTextureMaxWidth() const’
 2599 |     virtual unsigned getTextureMaxWidth() const noexcept = 0;
      |                      ^~~~~~~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2620:18: note: 	‘virtual bool OpenColorIO_v2_0dev::GpuShaderCreator::addUniform(const char*, const DoubleGetter&)’
 2620 |     virtual bool addUniform(const char * name,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2623:18: note: 	‘virtual bool OpenColorIO_v2_0dev::GpuShaderCreator::addUniform(const char*, const BoolGetter&)’
 2623 |     virtual bool addUniform(const char * name,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2626:18: note: 	‘virtual bool OpenColorIO_v2_0dev::GpuShaderCreator::addUniform(const char*, const Float3Getter&)’
 2626 |     virtual bool addUniform(const char * name,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2629:18: note: 	‘virtual bool OpenColorIO_v2_0dev::GpuShaderCreator::addUniform(const char*, const SizeGetter&, const VectorFloatGetter&)’
 2629 |     virtual bool addUniform(const char * name,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2633:18: note: 	‘virtual bool OpenColorIO_v2_0dev::GpuShaderCreator::addUniform(const char*, const SizeGetter&, const VectorIntGetter&)’
 2633 |     virtual bool addUniform(const char * name,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2657:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderCreator::addTexture(const char*, const char*, unsigned int, unsigned int, OpenColorIO_v2_0dev::GpuShaderCreator::TextureType, OpenColorIO_v2_0dev::Interpolation, const float*)’
 2657 |     virtual void addTexture(const char * textureName,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2664:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderCreator::add3DTexture(const char*, const char*, unsigned int, OpenColorIO_v2_0dev::Interpolation, const float*)’
 2664 |     virtual void add3DTexture(const char * textureName,
      |                  ^~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2953:22: note: 	‘virtual unsigned int OpenColorIO_v2_0dev::GpuShaderDesc::getNumUniforms() const’
 2953 |     virtual unsigned getNumUniforms() const noexcept = 0;
      |                      ^~~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2955:26: note: 	‘virtual const char* OpenColorIO_v2_0dev::GpuShaderDesc::getUniform(unsigned int, OpenColorIO_v2_0dev::GpuShaderDesc::UniformData&) const’
 2955 |     virtual const char * getUniform(unsigned index, UniformData & data) const = 0;
      |                          ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2958:22: note: 	‘virtual unsigned int OpenColorIO_v2_0dev::GpuShaderDesc::getNumTextures() const’
 2958 |     virtual unsigned getNumTextures() const noexcept = 0;
      |                      ^~~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2959:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderDesc::getTexture(unsigned int, const char*&, const char*&, unsigned int&, unsigned int&, OpenColorIO_v2_0dev::GpuShaderCreator::TextureType&, OpenColorIO_v2_0dev::Interpolation&) const’
 2959 |     virtual void getTexture(unsigned index,
      |                  ^~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2966:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderDesc::getTextureValues(unsigned int, const float*&) const’
 2966 |     virtual void getTextureValues(unsigned index, const float *& values) const = 0;
      |                  ^~~~~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2969:22: note: 	‘virtual unsigned int OpenColorIO_v2_0dev::GpuShaderDesc::getNum3DTextures() const’
 2969 |     virtual unsigned getNum3DTextures() const noexcept = 0;
      |                      ^~~~~~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2970:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderDesc::get3DTexture(unsigned int, const char*&, const char*&, unsigned int&, OpenColorIO_v2_0dev::Interpolation&) const’
 2970 |     virtual void get3DTexture(unsigned index,
      |                  ^~~~~~~~~~~~
/usr/local/include/OpenColorIO/OpenColorIO.h:2975:18: note: 	‘virtual void OpenColorIO_v2_0dev::GpuShaderDesc::get3DTextureValues(unsigned int, const float*&) const’
 2975 |     virtual void get3DTextureValues(unsigned index, const float *& values) const = 0;
      |                  ^~~~~~~~~~~~~~~~~~
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:170:20: error: ‘class OpenColorIO_v2_0dev::GpuShaderDesc’ has no member named ‘setLut3DEdgeLen’
  170 |         shaderDesc.setLut3DEdgeLen(_lut3dSizeOCIO);
      |                    ^~~~~~~~~~~~~~~
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:176:20: error: ‘using element_type = const class OpenColorIO_v2_0dev::Processor’ {aka ‘const class OpenColorIO_v2_0dev::Processor’} has no member named ‘getGpuLut3D’
  176 |         processor->getGpuLut3D(lut3d.data(), shaderDesc);
      |                    ^~~~~~~~~~~
/home/build/source/USD/pxr/imaging/hdx/colorCorrectionTask.cpp:196:48: error: ‘using element_type = const class OpenColorIO_v2_0dev::Processor’ {aka ‘const class OpenColorIO_v2_0dev::Processor’} has no member named ‘getGpuShaderText’
  196 |         const char* gpuShaderText = processor->getGpuShaderText(shaderDesc);
      |                                                ^~~~~~~~~~~~~~~~
make[2]: *** [pxr/imaging/hdx/CMakeFiles/hdx.dir/build.make:283: pxr/imaging/hdx/CMakeFiles/hdx.dir/colorCorrectionTask.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:9794: pxr/imaging/hdx/CMakeFiles/hdx.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Please let me know if there is any other info that would be helpful - thank you for having a look.

System Information (OS, Hardware)

OS: Ubuntu 20.04 focal
Kernel: x86_64 Linux 5.4.0-52-generic
CPU: Intel Core i5-5250U @ 4x 2.7GHz

Package Versions

  • cmake 3.16.3
  • gcc (Ubuntu 9.3.0-17ubuntu1~20.04)
  • Boost 1.73.0
  • Intel TBB 2020 Update 3
  • Python 3.7.9
  • QT 5.15.1
  • PyQT 5.15.1
  • PySide 5.15.1
  • NumPy 1.19.1
  • OpenEXR 2.5.3
  • OpenVDB 7.1.0
  • OpenSubdiv 3.4.3
  • OpenImageIO 2.2.7
  • OpenColorIO 2.0.0
  • MaterialX 1.37.2
  • Alembic 1.7.15

Build Flags

cmake
-D CMAKE_INSTALL_PREFIX=/usr/local
-D PXR_USE_PYTHON_3=ON
-D PYTHON_LIBRARY=$HOME/.pyenv/versions/3.7.9/lib/libpython3.7m.so
-D PYSIDEUICBINARY=$HOME/.pyenv/versions/3.7.9/lib/python3.7/site-packages/PySide2/uic
-D PXR_BUILD_MONOLITHIC=ON
-D PXR_ENABLE_OSL_SUPPORT=ON
-D PXR_ENABLE_OPENVDB_SUPPORT=ON
-D PXR_BUILD_OPENIMAGEIO_PLUGIN=ON
-D PXR_BUILD_OPENCOLORIO_PLUGIN=ON
-D PXR_BUILD_MATERIALX_PLUGIN=ON
-D PXR_BUILD_ALEMBIC_PLUGIN=ON
-D PXR_BUILD_EMBREE_PLUGIN=ON
..

@jilliene
Copy link

Filed as internal issue #USD-6478

@hobbes1069
Copy link

I'm working on upgrading Fedora Linux to OpenColorIO 2.0 and ran into this as well. Any update?

@fnaum
Copy link

fnaum commented Oct 27, 2021

Also trying to get usd Imaging to build against OpenColorIO 2.0
I fixed some of the issues, but still don't know what will be the equivalent of getGpuLut3D and getGpuShaderText, I can not find much info about that

@efleurant
Copy link

Any news on this one? Any plan on fixing this/supporting OCIO 2.x in an upcoming release?
Thanks in advance

@spiffmon
Copy link
Member

Pixar is currently still working on moving to vfx2020 for our internal codebase, i.e. python 3, which is a large undertaking. Once that is completed, we will start working towards 2021 or 2022; currently we do not even build OCIO 2.0.

In advance of that (which I would not expect to be ready till late this year or early next), if someone wanted to work on a PR that supported both 1.1.x and 2.x, we would certainly consider it!

@hobbes1069
Copy link

Checking in on current status. USD is the only consumer of my opencolorio1 compat package on Fedora.

@spiffmon
Copy link
Member

Hi @hobbes1069 , we will be working on VFX CY2022 adoption starting in the new year, and that will bring us to OCIO 2.1 . We think this should land for USD 23.05 or 23.08

@hobbes1069
Copy link

On a whim I tried building with 22.05b in Fedora and the build completed. I don't know if this is a good thing or not but it fixed my immediate problem.

@sunyab
Copy link
Contributor

sunyab commented Feb 4, 2023

I believe this issue was addressed by b08e77f in the 22.05 release as @hobbes1069 mentioned. Closing this out.

@sunyab sunyab closed this as completed Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants