Hello everyone,
I’m trying to build Blender as a python module on Ubuntu 22.04. First of all, the command suggested in the wiki for installing dependencies does not work properly (apt complains about not finding libshaderc-dev).
I resorted to running the make command multiple times and installing manually all the dependencies that came up, but now the build fails around 50% with the following compiler error:
blender/imbuf/intern/oiio/openimageio_support.cc:297:95: error: no matching function for call to ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(const OpenImageIO_v2_2::ImageSpec&, uchar* const&, const stride_t&, long int, const stride_t&)’
297 | ImageBuf orig_buf(ctx.mem_spec, ctx.mem_start, ctx.mem_xstride, -ctx.mem_ystride, AutoStride);
| ^
In file included from /home/filippo/Downloads/blender-with-libraries-3.6.0/blender-3.6.0/source/blender/imbuf/intern/oiio/openimageio_support.cc:4:
/usr/include/OpenImageIO/imagebuf.h:199:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(OpenImageIO_v2_2::ImageBuf&&)’
199 | ImageBuf(ImageBuf&& src);
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:199:5: note: candidate expects 1 argument, 5 provided
/usr/include/OpenImageIO/imagebuf.h:196:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(const OpenImageIO_v2_2::ImageBuf&)’
196 | ImageBuf(const ImageBuf& src);
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:196:5: note: candidate expects 1 argument, 5 provided
/usr/include/OpenImageIO/imagebuf.h:193:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(OpenImageIO_v2_2::string_view, const OpenImageIO_v2_2::ImageSpec&, void*)’
193 | ImageBuf(string_view name, const ImageSpec& spec, void* buffer);
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:193:5: note: candidate expects 3 arguments, 5 provided
/usr/include/OpenImageIO/imagebuf.h:189:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(const OpenImageIO_v2_2::ImageSpec&, void*)’
189 | ImageBuf(const ImageSpec& spec, void* buffer);
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:189:5: note: candidate expects 2 arguments, 5 provided
/usr/include/OpenImageIO/imagebuf.h:168:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(OpenImageIO_v2_2::string_view, const OpenImageIO_v2_2::ImageSpec&, OpenImageIO_v2_2::InitializePixels)’
168 | ImageBuf(string_view name, const ImageSpec& spec,
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:168:5: note: candidate expects 3 arguments, 5 provided
/usr/include/OpenImageIO/imagebuf.h:163:14: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(const OpenImageIO_v2_2::ImageSpec&, OpenImageIO_v2_2::InitializePixels)’
163 | explicit ImageBuf(const ImageSpec& spec,
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:163:14: note: candidate expects 2 arguments, 5 provided
/usr/include/OpenImageIO/imagebuf.h:138:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(OpenImageIO_v2_2::string_view, OpenImageIO_v2_2::ImageCache*)’
138 | ImageBuf(string_view name, ImageCache* imagecache);
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:138:5: note: candidate expects 2 arguments, 5 provided
/usr/include/OpenImageIO/imagebuf.h:132:14: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf(OpenImageIO_v2_2::string_view, int, int, OpenImageIO_v2_2::ImageCache*, const OpenImageIO_v2_2::ImageSpec*, OpenImageIO_v2_2::Filesystem::IOProxy*)’
132 | explicit ImageBuf(string_view name, int subimage = 0, int miplevel = 0,
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:132:35: note: no known conversion for argument 1 from ‘const OpenImageIO_v2_2::ImageSpec’ to ‘OpenImageIO_v2_2::string_view’
132 | explicit ImageBuf(string_view name, int subimage = 0, int miplevel = 0,
| ~~~~~~~~~~~~^~~~
/usr/include/OpenImageIO/imagebuf.h:95:5: note: candidate: ‘OpenImageIO_v2_2::ImageBuf::ImageBuf()’
95 | ImageBuf();
| ^~~~~~~~
/usr/include/OpenImageIO/imagebuf.h:95:5: note: candidate expects 0 arguments, 5 provided
make[3]: *** [source/blender/imbuf/intern/oiio/CMakeFiles/bf_imbuf_openimageio.dir/build.make:90: source/blender/imbuf/intern/oiio/CMakeFiles/bf_imbuf_openimageio.dir/openimageio_support.cc.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:5717: source/blender/imbuf/intern/oiio/CMakeFiles/bf_imbuf_openimageio.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
Any suggestion about what might be wrong? I only found a similar topic on the forum: it mentions the issue might be with Wayland, but the fix they propose is not applicable to 3.6.0
EDIT I forgot to mention that I also modified the CMakeLists.txt turning OFF precompiled libraries but the result has been similar