Opened 8 years ago

Last modified 7 years ago

#50697 closed defect

VLC @2.1.5: build fails when using recently released ffmpeg-3.0 — at Initial Version

Reported by: dbevans (David B. Evans) Owned by: RJVB (René Bertin)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: VLC VLC-devel

Description

Build fails due to the use of long deprecated API that has finally been dropped in this major release. See FFmpeg doc/APIchanges for the details of FFmpeg API changes/deprecations over time along with suggested alternatives.

Since this port is outdated, updating to the current upstream stable version 2.2.2 may help. The upstream developers may have dealt with the issue or parts of it already.

Build fails as follows. Full build log attached.

../../doltlibtool  --tag=CC   --mode=compile /usr/bin/clang -isysroot / -DHAVE_CONFIG_H -I. -I../..  -DMODULE_NAME=$(p="libavcodec_plugin_la-video.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libavcodec_plugin_la-video.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libavcodec_plugin_la-video.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -I../../include -I../../include -I/opt/local/include -D__unix__=1 -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include  -I/opt/local/include  -I/opt/local/include   -DMERGE_FFMPEG -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -ffast-math -funroll-loops -fomit-frame-pointer -MT libavcodec_plugin_la-video.lo -MD -MP -MF .deps/libavcodec_plugin_la-video.Tpo -c -o libavcodec_plugin_la-video.lo `test -f 'avcodec/video.c' || echo './'`avcodec/video.c
mv -f .deps/libedummy_plugin_la-edummy.Tpo .deps/libedummy_plugin_la-edummy.Plo
../../doltlibtool  --tag=CC   --mode=compile /usr/bin/clang -isysroot / -DHAVE_CONFIG_H -I. -I../..  -DMODULE_NAME=$(p="libavcodec_plugin_la-subtitle.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libavcodec_plugin_la-subtitle.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libavcodec_plugin_la-subtitle.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -I../../include -I../../include -I/opt/local/include -D__unix__=1 -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include  -I/opt/local/include  -I/opt/local/include   -DMERGE_FFMPEG -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -ffast-math -funroll-loops -fomit-frame-pointer -MT libavcodec_plugin_la-subtitle.lo -MD -MP -MF .deps/libavcodec_plugin_la-subtitle.Tpo -c -o libavcodec_plugin_la-subtitle.lo `test -f 'avcodec/subtitle.c' || echo './'`avcodec/subtitle.c
mv -f .deps/libscte27_plugin_la-scte27.Tpo .deps/libscte27_plugin_la-scte27.Plo
../../doltlibtool  --tag=CC   --mode=compile /usr/bin/clang -isysroot / -DHAVE_CONFIG_H -I. -I../..  -DMODULE_NAME=$(p="libavcodec_plugin_la-audio.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libavcodec_plugin_la-audio.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libavcodec_plugin_la-audio.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -I../../include -I../../include -I/opt/local/include -D__unix__=1 -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include  -I/opt/local/include  -I/opt/local/include   -DMERGE_FFMPEG -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -ffast-math -funroll-loops -fomit-frame-pointer -MT libavcodec_plugin_la-audio.lo -MD -MP -MF .deps/libavcodec_plugin_la-audio.Tpo -c -o libavcodec_plugin_la-audio.lo `test -f 'avcodec/audio.c' || echo './'`avcodec/audio.c
In file included from avcodec/video.c:43:
In file included from avcodec/avcodec.h:25:
avcodec/avcommon.h:57:5: warning: 'av_set_cpu_flags_mask' is deprecated [-Wdeprecated-declarations]
    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );
    ^
/opt/local/include/libavutil/cpu.h:91:27: note: 'av_set_cpu_flags_mask' has been explicitly marked deprecated here
attribute_deprecated void av_set_cpu_flags_mask(int mask);
                          ^
avcodec/video.c:203:23: error: implicit declaration of function 'avcodec_alloc_frame' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    p_sys->p_ff_pic = avcodec_alloc_frame();
                      ^
avcodec/video.c:203:21: warning: incompatible integer to pointer conversion assigning to 'AVFrame *' (aka 'struct AVFrame *') from 'int' [-Wint-conversion]
    p_sys->p_ff_pic = avcodec_alloc_frame();
                    ^ ~~~~~~~~~~~~~~~~~~~~~
In file included from avcodec/subtitle.c:39:
In file included from avcodec/avcodec.h:25:
avcodec/avcommon.h:57:5: warning: 'av_set_cpu_flags_mask' is deprecated [-Wdeprecated-declarations]
    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );
    ^
/opt/local/include/libavutil/cpu.h:91:27: note: 'av_set_cpu_flags_mask' has been explicitly marked deprecated here
attribute_deprecated void av_set_cpu_flags_mask(int mask);
                          ^
avcodec/video.c:320:23: error: no member named 'get_buffer' in 'struct AVCodecContext'; did you mean 'get_buffer2'?
    p_sys->p_context->get_buffer = ffmpeg_GetFrameBuf;
                      ^~~~~~~~~~
                      get_buffer2
avcodec/subtitle.c:217:45: warning: 'pict' is deprecated [-Wdeprecated-declarations]
            const uint8_t index = ffregion->pict.data[0][y * ffregion->w+x];
                                            ^
/opt/local/include/libavcodec/avcodec.h:3710:15: note: 'pict' has been explicitly marked deprecated here
    AVPicture pict;
              ^
avcodec/subtitle.c:217:50: warning: 'data' is deprecated [-Wdeprecated-declarations]
            const uint8_t index = ffregion->pict.data[0][y * ffregion->w+x];
                                                 ^
/opt/local/include/libavcodec/avcodec.h:3668:14: note: 'data' has been explicitly marked deprecated here
    uint8_t *data[AV_NUM_DATA_POINTERS];    ///< pointers to the image data planes
             ^
avcodec/subtitle.c:221:39: warning: 'pict' is deprecated [-Wdeprecated-declarations]
            memcpy(&color, &ffregion->pict.data[1][4*index], 4);
                                      ^
/usr/include/secure/_string.h:65:33: note: expanded from macro 'memcpy'
  __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest))
                                ^
/opt/local/include/libavcodec/avcodec.h:3710:15: note: 'pict' has been explicitly marked deprecated here
    AVPicture pict;
              ^
avcodec/subtitle.c:221:44: warning: 'data' is deprecated [-Wdeprecated-declarations]
            memcpy(&color, &ffregion->pict.data[1][4*index], 4);
                                           ^
/usr/include/secure/_string.h:65:33: note: expanded from macro 'memcpy'
  __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest))
                                ^
/opt/local/include/libavcodec/avcodec.h:3668:14: note: 'data' has been explicitly marked deprecated here
    uint8_t *data[AV_NUM_DATA_POINTERS];    ///< pointers to the image data planes
             ^
/opt/local/include/libavcodec/avcodec.h:2442:11: note: 'get_buffer2' declared here
avcodec/subtitle.c:284:9: warning: 'avpicture_free' is deprecated [-Wdeprecated-declarations]
    int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
        avpicture_free(&rec->pict);          ^

        ^
/opt/local/include/libavcodec/avcodec.h:4877:6: note: 'avpicture_free' has been explicitly marked deprecated here
void avpicture_free(AVPicture *picture);
     ^
avcodec/subtitle.c:284:30: warning: 'pict' is deprecated [-Wdeprecated-declarations]
        avpicture_free(&rec->pict);
                             ^
/opt/local/include/libavcodec/avcodec.h:3710:15: note: 'pict' has been explicitly marked deprecated here
    AVPicture pict;
              ^
avcodec/video.c:320:34: warning: incompatible pointer types assigning to 'int (*)(struct AVCodecContext *, AVFrame *, int)' from 'int (struct AVCodecContext *, AVFrame *)' [-Wincompatible-pointer-types]
    p_sys->p_context->get_buffer = ffmpeg_GetFrameBuf;
                                 ^ ~~~~~~~~~~~~~~~~~~
avcodec/video.c:321:23: error: no member named 'reget_buffer' in 'struct AVCodecContext'; did you mean 'get_buffer2'?
    p_sys->p_context->reget_buffer = avcodec_default_reget_buffer;
                      ^~~~~~~~~~~~
                      get_buffer2
/opt/local/include/libavcodec/avcodec.h:2442:11: note: 'get_buffer2' declared here
    int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
          ^
avcodec/video.c:321:38: error: use of undeclared identifier 'avcodec_default_reget_buffer'; did you mean 'avcodec_default_get_buffer2'?
    p_sys->p_context->reget_buffer = avcodec_default_reget_buffer;
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     avcodec_default_get_buffer2
/opt/local/include/libavcodec/avcodec.h:4219:5: note: 'avcodec_default_get_buffer2' declared here
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
    ^
avcodec/video.c:322:23: error: no member named 'release_buffer' in 'struct AVCodecContext'
    p_sys->p_context->release_buffer = ffmpeg_ReleaseFrameBuf;
    ~~~~~~~~~~~~~~~~  ^
avcodec/video.c:367:38: warning: incompatible pointer types assigning to 'enum AVPixelFormat (*)(struct AVCodecContext *, const enum AVPixelFormat *)' from 'enum PixelFormat (AVCodecContext *, const enum PixelFormat *)' [-Wincompatible-pointer-types]
        p_sys->p_context->get_format = ffmpeg_GetFormat;
                                     ^ ~~~~~~~~~~~~~~~~
avcodec/video.c:639:25: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        else if( i_used > p_block->i_buffer ||
                 ~~~~~~ ^ ~~~~~~~~~~~~~~~~~
avcodec/video.c:938:15: error: no member named 'type' in 'struct AVFrame'
    p_ff_pic->type = FF_BUFFER_TYPE_USER;
    ~~~~~~~~  ^
avcodec/video.c:938:22: error: use of undeclared identifier 'FF_BUFFER_TYPE_USER'
    p_ff_pic->type = FF_BUFFER_TYPE_USER;
                     ^
avcodec/video.c:955:31: error: use of undeclared identifier 'PIX_FMT_PAL8'; did you mean 'AV_PIX_FMT_PAL8'?
    if (p_context->pix_fmt == PIX_FMT_PAL8)
                              ^~~~~~~~~~~~
                              AV_PIX_FMT_PAL8
/opt/local/include/libavutil/pixfmt.h:74:5: note: 'AV_PIX_FMT_PAL8' declared here
    AV_PIX_FMT_PAL8,      ///< 8 bit with AV_PIX_FMT_RGB32 palette
    ^
avcodec/video.c:990:31: error: use of undeclared identifier 'PIX_FMT_YUV422P'; did you mean 'AV_PIX_FMT_YUV422P'?
    if( p_context->pix_fmt == PIX_FMT_YUV422P )
                              ^~~~~~~~~~~~~~~
                              AV_PIX_FMT_YUV422P
/opt/local/include/libavutil/pixfmt.h:67:5: note: 'AV_PIX_FMT_YUV422P' declared here
    AV_PIX_FMT_YUV422P,   ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
    ^
avcodec/video.c:1031:16: error: implicit declaration of function 'avcodec_default_get_buffer' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        return avcodec_default_get_buffer( p_context, p_ff_pic );
               ^
avcodec/video.c:1031:16: note: did you mean 'avcodec_default_get_buffer2'?
/opt/local/include/libavcodec/avcodec.h:4219:5: note: 'avcodec_default_get_buffer2' declared here
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
    ^
avcodec/video.c:1058:15: error: no member named 'type' in 'struct AVFrame'
    p_ff_pic->type = FF_BUFFER_TYPE_USER;
    ~~~~~~~~  ^
avcodec/video.c:1058:22: error: use of undeclared identifier 'FF_BUFFER_TYPE_USER'
    p_ff_pic->type = FF_BUFFER_TYPE_USER;
                     ^
avcodec/video.c:1082:24: error: no member named 'type' in 'struct AVFrame'
    else if( p_ff_pic->type == FF_BUFFER_TYPE_INTERNAL )
             ~~~~~~~~  ^
avcodec/audio.c:42:10: fatal error: 'libavutil/audioconvert.h' file not found
#include <libavutil/audioconvert.h>
         ^
7 warnings generated.
avcodec/video.c:1082:32: error: use of undeclared identifier 'FF_BUFFER_TYPE_INTERNAL'
    else if( p_ff_pic->type == FF_BUFFER_TYPE_INTERNAL )
                               ^
avcodec/video.c:1087:9: error: implicit declaration of function 'avcodec_default_release_buffer' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        avcodec_default_release_buffer( p_context, p_ff_pic );
        ^
mv -f .deps/libavcodec_plugin_la-subtitle.Tpo .deps/libavcodec_plugin_la-subtitle.Plo
../../doltlibtool  --tag=CC   --mode=compile /usr/bin/clang -isysroot / -DHAVE_CONFIG_H -I. -I../..  -DMODULE_NAME=$(p="libavcodec_plugin_la-cpu.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_NAME_IS_$(p="libavcodec_plugin_la-cpu.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}") -DMODULE_STRING=\"$(p="libavcodec_plugin_la-cpu.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}")\" -D__PLUGIN__ -I../../include -I../../include -I/opt/local/include -D__unix__=1 -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include  -I/opt/local/include  -I/opt/local/include   -DMERGE_FFMPEG -pipe -Os -arch x86_64 -D_INTL_REDIRECT_MACROS -I/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/contrib/include -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -ffast-math -funroll-loops -fomit-frame-pointer -MT libavcodec_plugin_la-cpu.lo -MD -MP -MF .deps/libavcodec_plugin_la-cpu.Tpo -c -o libavcodec_plugin_la-cpu.lo `test -f 'avcodec/cpu.c' || echo './'`avcodec/cpu.c
1 error generated.
avcodec/video.c:1087:9: note: did you mean 'avcodec_default_get_buffer'?
avcodec/video.c:1031:16: note: 'avcodec_default_get_buffer' declared here
        return avcodec_default_get_buffer( p_context, p_ff_pic );
               ^
make[4]: *** [libavcodec_plugin_la-audio.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
avcodec/video.c:1135:25: error: incomplete result type 'enum PixelFormat' in function definition
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
                        ^
avcodec/video.c:108:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
avcodec/video.c:1157:30: error: subscript of pointer to incomplete type 'const enum PixelFormat'
    for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
                       ~~~~~~^
avcodec/video.c:108:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
avcodec/video.c:1157:37: error: use of undeclared identifier 'PIX_FMT_NONE'; did you mean 'AV_PIX_FMT_NONE'?
    for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
                                    ^~~~~~~~~~~~
                                    AV_PIX_FMT_NONE
/opt/local/include/libavutil/pixfmt.h:62:5: note: 'AV_PIX_FMT_NONE' declared here
    AV_PIX_FMT_NONE = -1,
    ^
avcodec/video.c:1159:54: error: subscript of pointer to incomplete type 'const enum PixelFormat'
        const char *name = av_get_pix_fmt_name(pi_fmt[i]);
                                               ~~~~~~^
avcodec/video.c:108:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
5 warnings and 20 errors generated.
make[4]: *** [libavcodec_plugin_la-video.lo] Error 1
In file included from avcodec/cpu.c:30:
avcodec/avcommon.h:57:5: warning: 'av_set_cpu_flags_mask' is deprecated [-Wdeprecated-declarations]
    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );
    ^
/opt/local/include/libavutil/cpu.h:91:27: note: 'av_set_cpu_flags_mask' has been explicitly marked deprecated here
attribute_deprecated void av_set_cpu_flags_mask(int mask);
                          ^
1 warning generated.
mv -f .deps/libavcodec_plugin_la-cpu.Tpo .deps/libavcodec_plugin_la-cpu.Plo
mv -f .deps/libdvbsub_plugin_la-dvbsub.Tpo .deps/libdvbsub_plugin_la-dvbsub.Plo
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/modules/codec'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/modules/codec'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5'
Command failed:  cd "/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5" && /usr/bin/make -j4 -w all DESTDIR=/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_VLC/VLC/work/vlc-2.1.5/dest_ignore V=1 

Change History (1)

Changed 8 years ago by dbevans (David B. Evans)

Attachment: main.log added

Build log showing build failure when using ffmpeg 3.0

Note: See TracTickets for help on using tickets.