Building Blender 2.8 same build error that previously infected master [2.79]

It seems the team has yet to baseline OpenJPEG 2.3 with Blender 2.8, though they did over a month prior inside Master [2.79 trunk].

Anyone else building 2.80 from git?

I don’t want to file another bug on this one if someone else has already done so.


[ 66%] Building C object source/blender/imbuf/CMakeFiles/bf_imbuf.dir/intern/jp2.c.o
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c: In function ‘imb_jp2_decode’:
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:140:2: error: unknown type name ‘opj_event_mgr_t’
  opj_event_mgr_t event_mgr;      /* event manager */
  ^~~~~~~~~~~~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:143:2: error: unknown type name ‘opj_dinfo_t’; did you mean ‘opj_tp_info_t’?
  opj_dinfo_t *dinfo = NULL;  /* handle to a decompressor */
  ^~~~~~~~~~~
  opj_tp_info_t
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:144:2: error: unknown type name ‘opj_cio_t’; did you mean ‘opj_poc_t’?
  opj_cio_t *cio = NULL;
  ^~~~~~~~~
  opj_poc_t
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:156:31: error: ‘opj_event_mgr_t’ undeclared (first use in this function); did you mean ‘event_mgr’?
  memset(&event_mgr, 0, sizeof(opj_event_mgr_t));
                               ^~~~~~~~~~~~~~~
                               event_mgr
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:156:31: note: each undeclared identifier is reported only once for each function it appears in
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:157:11: error: request for member ‘error_handler’ in something not a structure or union
  event_mgr.error_handler = error_callback;
           ^
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:158:11: error: request for member ‘warning_handler’ in something not a structure or union
  event_mgr.warning_handler = warning_callback;
           ^
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:159:11: error: request for member ‘info_handler’ in something not a structure or union
  event_mgr.info_handler = info_callback;
           ^
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:169:41: error: ‘CODEC_JP2’ undeclared (first use in this function); did you mean ‘OPJ_CODEC_JP2’?
  dinfo = opj_create_decompress(is_jp2 ? CODEC_JP2 : CODEC_J2K);
                                         ^~~~~~~~~
                                         OPJ_CODEC_JP2
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:169:53: error: ‘CODEC_J2K’ undeclared (first use in this function); did you mean ‘CODEC_JP2’?
  dinfo = opj_create_decompress(is_jp2 ? CODEC_JP2 : CODEC_J2K);
                                                     ^~~~~~~~~
                                                     CODEC_JP2
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:172:2: error: implicit declaration of function ‘opj_set_event_mgr’; did you mean ‘opj_setup_encoder’? [-Werror=implicit-function-declaration]
  opj_set_event_mgr((opj_common_ptr)dinfo, &event_mgr, stderr);
  ^~~~~~~~~~~~~~~~~
  opj_setup_encoder
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:172:21: error: ‘opj_common_ptr’ undeclared (first use in this function); did you mean ‘opj_codec_t’?
  opj_set_event_mgr((opj_common_ptr)dinfo, &event_mgr, stderr);
                     ^~~~~~~~~~~~~~
                     opj_codec_t
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:172:36: error: expected ‘)’ before ‘dinfo’
  opj_set_event_mgr((opj_common_ptr)dinfo, &event_mgr, stderr);
                                    ^~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:175:20: warning: passing argument 1 of ‘opj_setup_decoder’ from incompatible pointer type [-Wincompatible-pointer-types]
  opj_setup_decoder(dinfo, &parameters);
                    ^~~~~
In file included from /home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:39:0:
/usr/include/openjpeg-2.3/openjpeg.h:1304:31: note: expected ‘void **’ but argument is of type ‘int *’
 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
                               ^~~~~~~~~~~~~~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:179:8: error: implicit declaration of function ‘opj_cio_open’; did you mean ‘opj_encode’? [-Werror=implicit-function-declaration]
  cio = opj_cio_open((opj_common_ptr)dinfo, (unsigned char *)mem, size);
        ^~~~~~~~~~~~
        opj_encode
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:179:37: error: expected ‘)’ before ‘dinfo’
  cio = opj_cio_open((opj_common_ptr)dinfo, (unsigned char *)mem, size);
                                     ^~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:182:21: warning: passing argument 1 of ‘opj_decode’ from incompatible pointer type [-Wincompatible-pointer-types]
  image = opj_decode(dinfo, cio);
                     ^~~~~
In file included from /home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:39:0:
/usr/include/openjpeg-2.3/openjpeg.h:1405:31: note: expected ‘void **’ but argument is of type ‘int *’
 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor,
                               ^~~~~~~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:182:28: warning: passing argument 2 of ‘opj_decode’ from incompatible pointer type [-Wincompatible-pointer-types]
  image = opj_decode(dinfo, cio);
                            ^~~
In file included from /home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:39:0:
/usr/include/openjpeg-2.3/openjpeg.h:1405:31: note: expected ‘void **’ but argument is of type ‘int *’
 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor,
                               ^~~~~~~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:182:10: error: too few arguments to function ‘opj_decode’
  image = opj_decode(dinfo, cio);
          ^~~~~~~~~~
In file included from /home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:39:0:
/usr/include/openjpeg-2.3/openjpeg.h:1405:31: note: declared here
 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor,
                               ^~~~~~~~~~
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:186:3: error: implicit declaration of function ‘opj_destroy_decompress’; did you mean ‘opj_end_decompress’? [-Werror=implicit-function-declaration]
   opj_destroy_decompress(dinfo);
   ^~~~~~~~~~~~~~~~~~~~~~
   opj_end_decompress
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:187:3: error: implicit declaration of function ‘opj_cio_close’; did you mean ‘opj_encode’? [-Werror=implicit-function-declaration]
   opj_cio_close(cio);
   ^~~~~~~~~~~~~
   opj_encode
/home/mdriftmeyer/Blender/Developer/blender-git/blender2.8/source/blender/imbuf/intern/jp2.c:124:63: warning: unused parameter ‘size’ [-Wunused-parameter]
 struct ImBuf *imb_jp2_decode(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])