UPBGE / upbge

UPBGE, the best integrated game engine in Blender
https://upbge.org
Other
1.39k stars 177 forks source link

How to Build UPBGE on Ubuntu #1812

Closed nutti closed 1 year ago

nutti commented 1 year ago

Commit ID: f84ba65475d99331b51cf8b71198b72b6fb0ea87

I tried to build UPBGE on Ubuntu 22.04 by following the build process. But, it got error when I execute a command make -C build.

...
/home/runner/work/upbge-daily-build/upbge-daily-build/upbge/source/blender/imbuf/intern/oiio/openimageio_support.cc: In function ‘bool blender::imbuf::imb_oiio_write(const blender::imbuf::WriteContext&, const char*, const OpenImageIO_v2_2::ImageSpec&)’:
/home/runner/work/upbge-daily-build/upbge-daily-build/upbge/source/blender/imbuf/intern/oiio/openimageio_support.cc:299: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&)’
  299 |   ImageBuf orig_buf(ctx.mem_spec, ctx.mem_start, ctx.mem_xstride, -ctx.mem_ystride, AutoStride);
      |                                                                                               ^
In file included from /home/runner/work/upbge-daily-build/upbge-daily-build/upbge/source/blender/imbuf/intern/oiio/openimageio_support.cc:6:
/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
...

It seems that the error message comes from the mismatch of the OpenImageIO version. UPBGE expects OpenImageIO v2.3, but only v2.2 is supported on Ubuntu 22.04.

This makes us change the installation process on Ubuntu 22.04. Could you show me the installation process on Ubuntu 22.04?

youle31 commented 1 year ago

Hello, I advise you to follow blender guide instead: https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu which is more complete and maybe more up to date. Instead of cloning blender sources, you can clone upbge sources:

git clone https://github.com/UPBGE/upbge.git

for libs, the address seems a bit different:

https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_x86_64_glibc_228

But i'm guessing it should work on an ubuntu LTS version...? I'm not sure though because I think svn has openimageio 2.4 now, but you can try anyway.

youle31 commented 1 year ago

updated linux guide hjere: https://github.com/UPBGE/upbge/wiki/Build-UPBGE-on-Linux

nutti commented 1 year ago

@youle31

Thanks. Now, I can build UPBGE without any error by following the instruction.