Opened 13 months ago

Closed 7 months ago

#2337 closed defect (wontfix)

Doesn't build with libopenjpeg 2.3

Reported by: marillat@… Owned by: beastd
Priority: normal Component: undetermined
Version: HEAD Severity: blocker
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

fail to build with openjpeg 2.3.0 from Debian unstable amd64
mplayer svn r38004

libavcodec/libopenjpegdec.c:51:101: warning: "HAVE_OPENJPEG_2_0_OPENJPEG_H" is not defined, evaluates to 0 [-Wundef]
 #if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/libopenjpegdec.c:101:5: error: unknown type name 'opj_event_mgr_t'
     opj_event_mgr_t event_mgr;
     ^~~~~~~~~~~~~~~
libavcodec/libopenjpegdec.c: In function 'libopenjpeg_guess_pix_fmt':
libavcodec/libopenjpegdec.c:224:14: error: 'CLRSPC_SRGB' undeclared (first use in this function); did you mean 'OPJ_CLRSPC_SRGB'?
     case OPJ(CLRSPC_SRGB):
              ^
libavcodec/libopenjpegdec.c:56:18: note: in definition of macro 'OPJ'
 #  define OPJ(x) x
                  ^
libavcodec/libopenjpegdec.c:224:14: note: each undeclared identifier is reported only once for each function it appears in
     case OPJ(CLRSPC_SRGB):
              ^
libavcodec/libopenjpegdec.c:56:18: note: in definition of macro 'OPJ'
 #  define OPJ(x) x
                  ^
libavcodec/libopenjpegdec.c:228:14: error: 'CLRSPC_GRAY' undeclared (first use in this function); did you mean 'CLRSPC_SRGB'?
     case OPJ(CLRSPC_GRAY):
              ^
libavcodec/libopenjpegdec.c:56:18: note: in definition of macro 'OPJ'
 #  define OPJ(x) x
                  ^
libavcodec/libopenjpegdec.c:232:14: error: 'CLRSPC_SYCC' undeclared (first use in this function); did you mean 'CLRSPC_SRGB'?
     case OPJ(CLRSPC_SYCC):
              ^
libavcodec/libopenjpegdec.c:56:18: note: in definition of macro 'OPJ'
 #  define OPJ(x) x
                  ^
libavcodec/libopenjpegdec.c: In function 'libopenjpeg_decode_frame':
libavcodec/libopenjpegdec.c:360:5: error: unknown type name 'opj_dinfo_t'; did you mean 'opj_tp_info_t'?
     opj_dinfo_t *dec = NULL;
     ^~~~~~~~~~~
     opj_tp_info_t
libavcodec/libopenjpegdec.c:361:5: error: unknown type name 'opj_cio_t'; did you mean 'opj_poc_t'?
     opj_cio_t *stream = NULL;
     ^~~~~~~~~
     opj_poc_t
libavcodec/libopenjpegdec.c:374:41: error: 'CODEC_JP2' undeclared (first use in this function); did you mean 'OPJ_CODEC_JP2'?
         dec = opj_create_decompress(OPJ(CODEC_JP2));
                                         ^
libavcodec/libopenjpegdec.c:56:18: note: in definition of macro 'OPJ'
 #  define OPJ(x) x
                  ^
libavcodec/libopenjpegdec.c:380:41: error: 'CODEC_J2K' undeclared (first use in this function); did you mean 'CODEC_JP2'?
         dec = opj_create_decompress(OPJ(CODEC_J2K));
                                         ^
libavcodec/libopenjpegdec.c:56:18: note: in definition of macro 'OPJ'
 #  define OPJ(x) x
                  ^
libavcodec/libopenjpegdec.c:391:19: error: request for member 'info_handler' in something not a structure or union
     ctx->event_mgr.info_handler    = info_callback;
                   ^
libavcodec/libopenjpegdec.c:392:19: error: request for member 'error_handler' in something not a structure or union
     ctx->event_mgr.error_handler   = error_callback;
                   ^
libavcodec/libopenjpegdec.c:393:19: error: request for member 'warning_handler' in something not a structure or union
     ctx->event_mgr.warning_handler = warning_callback;
                   ^
libavcodec/libopenjpegdec.c:394:5: 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) dec, &ctx->event_mgr, avctx);
     ^~~~~~~~~~~~~~~~~
     opj_setup_encoder
libavcodec/libopenjpegdec.c:394:24: error: 'opj_common_ptr' undeclared (first use in this function); did you mean 'opj_codec_t'?
     opj_set_event_mgr((opj_common_ptr) dec, &ctx->event_mgr, avctx);
                        ^~~~~~~~~~~~~~
                        opj_codec_t
libavcodec/libopenjpegdec.c:394:40: error: expected ')' before 'dec'
     opj_set_event_mgr((opj_common_ptr) dec, &ctx->event_mgr, avctx);
                                        ^~~
libavcodec/libopenjpegdec.c:395:20: error: 'opj_dparameters_t {aka struct opj_dparameters}' has no member named 'cp_limit_decoding'
     ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
                    ^
libavcodec/libopenjpegdec.c:395:41: error: 'LIMIT_TO_MAIN_HEADER' undeclared (first use in this function)
     ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
                                         ^~~~~~~~~~~~~~~~~~~~
libavcodec/libopenjpegdec.c:411:23: warning: passing argument 1 of 'opj_setup_decoder' from incompatible pointer type [-Wincompatible-pointer-types]
     opj_setup_decoder(dec, &ctx->dec_params);
                       ^~~
In file included from libavcodec/libopenjpegdec.c:48: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,
                               ^~~~~~~~~~~~~~~~~
libavcodec/libopenjpegdec.c:414:14: error: implicit declaration of function 'opj_cio_open'; did you mean 'opj_encode'? [-Werror=implicit-function-declaration]
     stream = opj_cio_open((opj_common_ptr) dec, buf, buf_size);
              ^~~~~~~~~~~~
              opj_encode
libavcodec/libopenjpegdec.c:414:44: error: expected ')' before 'dec'
     stream = opj_cio_open((opj_common_ptr) dec, buf, buf_size);
                                            ^~~
libavcodec/libopenjpegdec.c:428:13: error: implicit declaration of function 'opj_decode_with_info'; did you mean 'opj_decode_tile_data'? [-Werror=implicit-function-declaration]
     image = opj_decode_with_info(dec, stream, NULL);
             ^~~~~~~~~~~~~~~~~~~~
             opj_decode_tile_data
libavcodec/libopenjpegdec.c:428:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     image = opj_decode_with_info(dec, stream, NULL);
           ^
libavcodec/libopenjpegdec.c:429:5: error: implicit declaration of function 'opj_cio_close'; did you mean 'opj_encode'? [-Werror=implicit-function-declaration]
     opj_cio_close(stream);
     ^~~~~~~~~~~~~
     opj_encode
libavcodec/libopenjpegdec.c:481:20: error: 'opj_dparameters_t {aka struct opj_dparameters}' has no member named 'cp_limit_decoding'
     ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
                    ^
libavcodec/libopenjpegdec.c:481:41: error: 'NO_LIMITATION' undeclared (first use in this function); did you mean 'CONFIGURATION'?
     ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
                                         ^~~~~~~~~~~~~
                                         CONFIGURATION
libavcodec/libopenjpegdec.c:484:23: warning: passing argument 1 of 'opj_setup_decoder' from incompatible pointer type [-Wincompatible-pointer-types]
     opj_setup_decoder(dec, &ctx->dec_params);
                       ^~~
In file included from libavcodec/libopenjpegdec.c:48: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,
                               ^~~~~~~~~~~~~~~~~
libavcodec/libopenjpegdec.c:485:44: error: expected ')' before 'dec'
     stream = opj_cio_open((opj_common_ptr) dec, buf, buf_size);
                                            ^~~
libavcodec/libopenjpegdec.c:494:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     image = opj_decode_with_info(dec, stream, NULL);
           ^
libavcodec/libopenjpegdec.c:564:5: error: implicit declaration of function 'opj_destroy_decompress'; did you mean 'opj_end_decompress'? [-Werror=implicit-function-declaration]
     opj_destroy_decompress(dec);
     ^~~~~~~~~~~~~~~~~~~~~~
     opj_end_decompress
cc1: some warnings being treated as errors

Change History (3)

comment:1 follow-up: Changed 13 months ago by beastd

Hi,

thank you for opening the bug report!

Are you building current MPlayer SVN with internal FFmpeg 3.4 or similar?

If that's the case, the build failure is unfortunately expected.

You should be able to build against external FFmpeg in any current version just fine.

It would be possible to fix it for internal FFmpeg, by updating MPlayer's configure to detect the headers and set the corresponding HAVE_OPENJPEG_x_y_OPENJPEG_H #defines. I personally would rather like to avoid that at the moment.

Do you really need to build against 3.4 and other current releases internally?

Or would building against newer FFmpeg master internally or other versions externally work out good enough for you?

comment:2 in reply to: ↑ 1 Changed 13 months ago by marillat@…

Replying to beastd:

Hi,

Hi,

thank you for opening the bug report!

Are you building current MPlayer SVN with internal FFmpeg 3.4 or similar?

Yes, with 3.4

Do you really need to build against 3.4 and other current releases internally?

I build with an internal ffmpeg because some filters are only enabled with that.

Or would building against newer FFmpeg master internally or other versions externally work out good enough for you?

For now I build mplayer with and internal ffmpeg 3.3.5 and I'm happy with that. I'll move to a more recent mplayer when this issue will be fixed.

comment:3 Changed 7 months ago by beastd

  • Resolution set to wontfix
  • Status changed from new to closed

Closing as "wontfix".

If I'm not missing something, you should be able to use the newer FFmpeg releases now instead.

OTOH if this issue in particular is still causing trouble for you, please re-open.

Note: See TracTickets for help on using tickets.