Page MenuHome

Broken build in denoising.cpp with OpenImage 2.0.5
Closed, ResolvedPublic

Description

Latest denoising changes don't build in Linux GCC 8 with OpenImage 2.0.5.

intern/cycles/render/denoising.cpp: In member function ‘bool ccl::DenoiseImage::load(const string&, std::__cxx11::string&)’:
intern/cycles/render/denoising.cpp:678:35: error: cannot convert ‘OpenImageIO_v2_0::ImageInput::unique_ptr {aka std::unique_ptr<OpenImageIO_v2_0::ImageInput>}’ to ‘OpenImageIO_v2_0::ImageInput*’ in assignment
  in = ImageInput::open(in_filepath);
                                   ^
intern/cycles/render/denoising.cpp: In member function ‘bool ccl::DenoiseImage::load_neighbors(const ccl::vector<std::__cxx11::basic_string<char> >&, const ccl::vector<int>&, std::__cxx11::string&)’:
intern/cycles/render/denoising.cpp:727:54: error: cannot convert ‘OpenImageIO_v2_0::ImageInput::unique_ptr {aka std::unique_ptr<OpenImageIO_v2_0::ImageInput>}’ to ‘OpenImageIO_v2_0::ImageInput*’ in initialization
   ImageInput *in_neighbor = ImageInput::open(filepath);
                                                      ^
intern/cycles/render/denoising.cpp: In member function ‘bool ccl::DenoiseImage::save_output(const string&, std::__cxx11::string&)’:
intern/cycles/render/denoising.cpp:779:53: error: cannot convert ‘OpenImageIO_v2_0::ImageOutput::unique_ptr {aka std::unique_ptr<OpenImageIO_v2_0::ImageOutput>}’ to ‘OpenImageIO_v2_0::ImageOutput*’ in initialization
  ImageOutput *out = ImageOutput::create(tmp_filepath);

@Lukas Stockner (lukasstockner97) may want to have a look.

Event Timeline

Should I open a new task? Reopen this one? Because now:

intern/cycles/render/denoising.cpp: In member function ‘bool ccl::DenoiseImage::load(const string&, std::__cxx11::string&)’:
intern/cycles/render/denoising.cpp:665:40: error: no matching function for call to ‘std::unique_ptr<OpenImageIO_v2_0::ImageInput>::reset(OpenImageIO_v2_0::ImageInput::unique_ptr)’
  in.reset(ImageInput::open(in_filepath));
                                        ^
In file included from /usr/include/c++/7/memory:80:0,
                 from intern/cycles/render/../util/util_guarded_allocator.h:21,
                 from intern/cycles/render/../util/util_vector.h:25,
                 from intern/cycles/render/../util/util_string.h:24,
                 from intern/cycles/render/../util/util_boundbox.h:24,
                 from intern/cycles/render/../bvh/bvh_params.h:21,
                 from intern/cycles/render/../device/device.h:22,
                 from intern/cycles/render/../render/denoising.h:20,
                 from intern/cycles/render/denoising.cpp:17:
/usr/include/c++/7/bits/unique_ptr.h:371:7: note: candidate: void std::unique_ptr<_Tp, _Dp>::reset(std::unique_ptr<_Tp, _Dp>::pointer) [with _Tp = OpenImageIO_v2_0::ImageInput; _Dp = std::default_delete<OpenImageIO_v2_0::ImageInput>; std::unique_ptr<_Tp, _Dp>::pointer = OpenImageIO_v2_0::ImageInput*]
       reset(pointer __p = pointer()) noexcept
       ^~~~~
/usr/include/c++/7/bits/unique_ptr.h:371:7: note:   no known conversion for argument 1 from ‘OpenImageIO_v2_0::ImageInput::unique_ptr {aka std::unique_ptr<OpenImageIO_v2_0::ImageInput>}’ to ‘std::unique_ptr<OpenImageIO_v2_0::ImageInput>::pointer {aka OpenImageIO_v2_0::ImageInput*}’