Unable to build against openpgl:6

Description:

OpenPGL:6 introduces some API-breaking changes, preventing successful blender build.

Additional info:

  • package version(s): blender:17:4.0.2-12, openpgl:0.6.0-1
  • config and/or log files:
  • link to upstream bug report, if any:

Steps to reproduce:

  1. clone blender PKGBUILD
  2. run makepkg
  3. fails on openpgl:6

openpgl changelog: https://github.com/OpenPathGuidingLibrary/openpgl/blob/main/CHANGELOG.md

API breaking commit: https://github.com/OpenPathGuidingLibrary/openpgl/commit/652d8dd3653c5642efc9f9f94c26967e7ca8e621#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed

build error:

[ 50% | 10<10<1 | 1.5bps ] Building CXX object intern/cycles/integrator/CMakeFiles/cycles_integrator.dir/path_trace.cpp.o
FAILED: intern/cycles/integrator/CMakeFiles/cycles_integrator.dir/path_trace.cpp.o
/usr/lib/ccache/bin/c++ -DBOOST_ALL_NO_LIB -DCCL_NAMESPACE_BEGIN="namespace ccl {" -DCCL_NAMESPACE_END=} -DCYCLES_GFLAGS_NAMESPACE=gflags -DEMBREE_MAJOR_VERSION=4 -DGOOGLE_GLOG_DLL_DECL="" -DHAVE_EXECINFO_H -DNDEBUG -DOSL_STATIC_BUILD -DOSL_STATIC_LIBRARY -DPATH_GUIDING_LEVEL=5 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -DWITH_ALEMBIC -DWITH_BLENDER_GUARDEDALLOC -DWITH_CUDA -DWITH_CUDA_DYNLOAD -DWITH_CYCLES_LOGGING -DWITH_EMBREE -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_HIP -DWITH_HIP_DYNLOAD -DWITH_KERNEL_AVX2 -DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE41 -DWITH_OCIO -DWITH_OPENIMAGEDENOISE -DWITH_OPENSUBDIV -DWITH_OPENVDB -DWITH_OPENVDB_BLOSC -DWITH_OPTIX -DWITH_OSL -DWITH_PATH_GUIDING -DWITH_SYSTEM_PUGIXML -DWITH_USD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/build/blender/src/blender/intern/cycles/../../extern/cuew/include -I/build/blender/src/blender/intern/cycles/../../extern/hipew/include -I/build/blender/src/blender/intern/cycles/../atomic -I/build/blender/src/blender/intern/cycles/integrator/.. -isystem /usr/include/OpenEXR -isystem /usr/include/Imath -isystem /build/blender/src -isystem /build/blender/src/blender/extern/glog/include -isystem /build/blender/src/blender/extern/gflags/src -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wcomma-subscript -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wimplicit-fallthrough=5 -Wundef -Wmissing-declarations  -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing  -msse2 -fmacro-prefix-map="/build/blender/src/blender/"="" -fmacro-prefix-map="/build/blender/src/blender/build/"="" -fno-trapping-math -fno-math-errno -fno-signed-zeros -fno-signaling-nans -fno-rounding-math -mfpmath=sse -Wno-error=unused-macros -Wno-maybe-uninitialized -O2 -DNDEBUG -std=c++17 -MD -MT intern/cycles/integrator/CMakeFiles/cycles_integrator.dir/path_trace.cpp.o -MF intern/cycles/integrator/CMakeFiles/cycles_integrator.dir/path_trace.cpp.o.d -o intern/cycles/integrator/CMakeFiles/cycles_integrator.dir/path_trace.cpp.o -c /build/blender/src/blender/intern/cycles/integrator/path_trace.cpp
../intern/cycles/integrator/path_trace.cpp: In member function void ccl::PathTrace::set_guiding_params(const ccl::GuidingParams&, bool):
../intern/cycles/integrator/path_trace.cpp:1286:39: error: too few arguments to function void pglFieldArgumentsSetDefaults(PGLFieldArguments&, PGL_SPATIAL_STRUCTURE_TYPE, PGL_DIRECTIONAL_DISTRIBUTION_TYPE, bool, size_t)
 1286 |           pglFieldArgumentsSetDefaults(
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 1287 |               field_args,
      |               ~~~~~~~~~~~
 1288 |               PGL_SPATIAL_STRUCTURE_TYPE::PGL_SPATIAL_STRUCTURE_KDTREE,
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1289 |               PGL_DIRECTIONAL_DISTRIBUTION_TYPE::PGL_DIRECTIONAL_DISTRIBUTION_PARALLAX_AWARE_VMM);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openpgl/device.h:7,
                 from /usr/include/openpgl/openpgl.h:24,
                 from /usr/include/openpgl/cpp/OpenPGL.h:9,
                 from ../intern/cycles/util/guiding.h:8,
                 from ../intern/cycles/integrator/path_trace.h:16,
                 from ../intern/cycles/integrator/path_trace.cpp:5:
/usr/include/openpgl/config.h:120:29: note: declared here
  120 | OPENPGL_CORE_INTERFACE void pglFieldArgumentsSetDefaults(PGLFieldArguments &fieldArguments, const PGL_SPATIAL_STRUCTURE_TYPE spatialType, const PGL_DIRECTIONAL_DISTRIBUTION_TYPE directionalType, const bool deterministic, const size_t maxSamplesPerLeaf);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../intern/cycles/integrator/path_trace.cpp:1294:39: error: too few arguments to function void pglFieldArgumentsSetDefaults(PGLFieldArguments&, PGL_SPATIAL_STRUCTURE_TYPE, PGL_DIRECTIONAL_DISTRIBUTION_TYPE, bool, size_t)
 1294 |           pglFieldArgumentsSetDefaults(
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 1295 |               field_args,
      |               ~~~~~~~~~~~
 1296 |               PGL_SPATIAL_STRUCTURE_TYPE::PGL_SPATIAL_STRUCTURE_KDTREE,
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1297 |               PGL_DIRECTIONAL_DISTRIBUTION_TYPE::PGL_DIRECTIONAL_DISTRIBUTION_QUADTREE);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openpgl/config.h:120:29: note: declared here
  120 | OPENPGL_CORE_INTERFACE void pglFieldArgumentsSetDefaults(PGLFieldArguments &fieldArguments, const PGL_SPATIAL_STRUCTURE_TYPE spatialType, const PGL_DIRECTIONAL_DISTRIBUTION_TYPE directionalType, const bool deterministic, const size_t maxSamplesPerLeaf);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../intern/cycles/integrator/path_trace.cpp:1302:39: error: too few arguments to function void pglFieldArgumentsSetDefaults(PGLFieldArguments&, PGL_SPATIAL_STRUCTURE_TYPE, PGL_DIRECTIONAL_DISTRIBUTION_TYPE, bool, size_t)
 1302 |           pglFieldArgumentsSetDefaults(
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 1303 |               field_args,
      |               ~~~~~~~~~~~
 1304 |               PGL_SPATIAL_STRUCTURE_TYPE::PGL_SPATIAL_STRUCTURE_KDTREE,
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1305 |               PGL_DIRECTIONAL_DISTRIBUTION_TYPE::PGL_DIRECTIONAL_DISTRIBUTION_VMM);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openpgl/config.h:120:29: note: declared here
  120 | OPENPGL_CORE_INTERFACE void pglFieldArgumentsSetDefaults(PGLFieldArguments &fieldArguments, const PGL_SPATIAL_STRUCTURE_TYPE spatialType, const PGL_DIRECTIONAL_DISTRIBUTION_TYPE directionalType, const bool deterministic, const size_t maxSamplesPerLeaf);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13.2.1/memory:78,
                 from ../intern/cycles/util/guarded_allocator.h:10,
                 from ../intern/cycles/util/array.h:12,
                 from ../intern/cycles/device/memory.h:12,
                 from ../intern/cycles/device/denoise.h:7,
                 from ../intern/cycles/integrator/denoiser.h:10,
                 from ../intern/cycles/integrator/path_trace.h:7:
/usr/include/c++/13.2.1/bits/unique_ptr.h: In instantiation of std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = openpgl::cpp::Field; _Args = {openpgl::cpp::Device*&, PGLFieldArguments&}; __detail::__unique_ptr_t<_Tp> = __detail::__unique_ptr_t<openpgl::cpp::Field>]:
../intern/cycles/integrator/path_trace.cpp:1315:58:   required from here
/usr/include/c++/13.2.1/bits/unique_ptr.h:1070:30: error: no matching function for call to openpgl::cpp::Field::Field(openpgl::cpp::Device*&, PGLFieldArguments&)
 1070 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openpgl/cpp/OpenPGL.h:15:
/usr/include/openpgl/cpp/Field.h:148:16: note: candidate: openpgl::cpp::Field::Field(openpgl::cpp::Device*, const std::string&)
  148 | OPENPGL_INLINE Field::Field(Device *device, const std::string& fieldFileName)
      |                ^~~~~
/usr/include/openpgl/cpp/Field.h:148:64: note:   no known conversion for argument 2 from PGLFieldArguments to const std::string& {aka const std::__cxx11::basic_string<char>&}
  148 | OPENPGL_INLINE Field::Field(Device *device, const std::string& fieldFileName)
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/usr/include/openpgl/cpp/Field.h:141:16: note: candidate: openpgl::cpp::Field::Field(openpgl::cpp::Device*, const openpgl::cpp::FieldConfig&)
  141 | OPENPGL_INLINE Field::Field(Device *device, const FieldConfig& cfg)
      |                ^~~~~
/usr/include/openpgl/cpp/Field.h:141:64: note:   no known conversion for argument 2 from PGLFieldArguments to const openpgl::cpp::FieldConfig&
  141 | OPENPGL_INLINE Field::Field(Device *device, const FieldConfig& cfg)
      |                                             ~~~~~~~~~~~~~~~~~~~^~~
[ 55% | 11<9<1 | 1.5bps ] Building CXX object intern/cycles/integrator/CMakeFiles/cycles_integrator.dir/path_trace_display.cpp.o
Edited by bartus