OCIO 1.1.1 build error on Fedora Rawhide


Richard Shaw
 

I'm working on getting Fedora Rawhide and likely 34 (upcoming release) moved up to 2.0, however Blender only has compatibility in their master branch. That being the case I need some help troubleshooting the below errors. This is mostly likely either a warning that has turned into an error or new checks implemented in gcc 11:

/builddir/build/BUILD/OpenColorIO-1.1.1/src/core/LogOps.cpp
/builddir/build/BUILD/OpenColorIO-1.1.1/src/core/ImageDesc.cpp: In function 'OpenColorIO::v1::operator<<(std::basic_ostream<char, std::char_traits<char> >&, OpenColorIO::v1::ImageDesc const&)':
/builddir/build/BUILD/OpenColorIO-1.1.1/src/core/ImageDesc.cpp:60:51: error: 'this' pointer is null [-Werror=nonnull]
   60 |             os << "width=" << packedImg->getWidth() << ", ";
      |                                                   ^
/builddir/build/BUILD/OpenColorIO-1.1.1/src/core/ImageDesc.cpp:274:10: note: in a call to non-static member function 'OpenColorIO::v1::PackedImageDesc::getWidth() const'
  274 |     long PackedImageDesc::getWidth() const
      |          ^~~~~~~~~~~~~~~
/builddir/build/BUILD/OpenColorIO-1.1.1/src/core/ImageDesc.cpp:61:53: error: 'this' pointer is null [-Werror=nonnull]
   61 |             os << "height=" << packedImg->getHeight() << ", ";
      |                                                     ^
/builddir/build/BUILD/OpenColorIO-1.1.1/src/core/ImageDesc.cpp:279:10: note: in a call to non-static member function 'OpenColorIO::v1::PackedImageDesc::getHeight() const'
  279 |     long PackedImageDesc::getHeight() const
      |          ^~~~~~~~~~~~~~~


Full log here:

Thanks,
Richard


Patrick Hodoul <patrick.hodoul@...>
 

Hi Richard,

Thanks for reporting the problem. You definitively found an error which can easily be fixed.

The problem is that lines 60 and 61 from src/core/ImageDesc.cpp must use planarImg (instead of the faulty packedImg).
As our focus and effort are all on the OpenColorIO version 2, would you mind creating an issue and submitting a pull request?
That would help us to increase the overall library.

Patrick


Richard Shaw
 

On Mon, Mar 8, 2021 at 1:17 PM Patrick Hodoul <patrick.hodoul@...> wrote:

Hi Richard,

Thanks for reporting the problem. You definitively found an error which can easily be fixed.

The problem is that lines 60 and 61 from src/core/ImageDesc.cpp must use planarImg (instead of the faulty packedImg).
As our focus and effort are all on the OpenColorIO version 2, would you mind creating an issue and submitting a pull request?
That would help us to increase the overall library.


I can take hack at it. I have learned some C/C++ over the years but I'm mainly a package maintainer, not a developer. 

Thanks,
Richard