Opened 8 years ago

Closed 8 years ago

#50693 closed defect (fixed)

libre, librem, baresip: update to latest versions, baresip 0.4.11 build fails with ffmpeg 3.0

Reported by: dbevans (David B. Evans) Owned by: alfredh (Alfred E. Heggestad)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libre librem baresip

Description

Please update to latest versions

  • libre 0.4.15
  • libre 0.4.7
  • baresip 0.4.15

Current baresip 0.4.11 build fails when using recently released ffmpeg 3.0 due to removal of deprecated symbols

  CC [M]  build-x86_64/modules/avcodec/avcodec.o
  CC [M]  build-x86_64/modules/avcodec/h263.o
  CC [M]  build-x86_64/modules/avcodec/h264.o
  CC [M]  build-x86_64/modules/avcodec/encode.o
  CC [M]  build-x86_64/modules/avcodec/decode.o
modules/avcodec/avcodec.c:20:10: error: use of undeclared identifier 'CODEC_ID_H263'; did you mean 'AV_CODEC_ID_H263'?
                return CODEC_ID_H263;
                       ^~~~~~~~~~~~~
                       AV_CODEC_ID_H263
/opt/local/include/libavcodec/avcodec.h:111:5: note: 'AV_CODEC_ID_H263' declared here
    AV_CODEC_ID_H263,
    ^
modules/avcodec/avcodec.c:22:10: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
                return CODEC_ID_H264;
                       ^~~~~~~~~~~~~
                       AV_CODEC_ID_H264
/opt/local/include/libavcodec/avcodec.h:134:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
modules/avcodec/avcodec.c:24:10: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
                return CODEC_ID_MPEG4;
                       ^~~~~~~~~~~~~~
                       AV_CODEC_ID_MPEG4
/opt/local/include/libavcodec/avcodec.h:119:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
modules/avcodec/avcodec.c:26:10: error: use of undeclared identifier 'CODEC_ID_NONE'; did you mean 'AV_CODEC_ID_NONE'?
                return CODEC_ID_NONE;
                       ^~~~~~~~~~~~~
                       AV_CODEC_ID_NONE
/opt/local/include/libavcodec/avcodec.h:102:5: note: 'AV_CODEC_ID_NONE' declared here
    AV_CODEC_ID_NONE,
    ^
modules/avcodec/avcodec.c:148:27: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
        if (avcodec_find_decoder(CODEC_ID_H264))
                                 ^~~~~~~~~~~~~
                                 AV_CODEC_ID_H264
/opt/local/include/libavcodec/avcodec.h:134:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
modules/avcodec/avcodec.c:151:27: error: use of undeclared identifier 'CODEC_ID_H263'; did you mean 'AV_CODEC_ID_H263'?
        if (avcodec_find_decoder(CODEC_ID_H263))
                                 ^~~~~~~~~~~~~
                                 AV_CODEC_ID_H263
/opt/local/include/libavcodec/avcodec.h:111:5: note: 'AV_CODEC_ID_H263' declared here
    AV_CODEC_ID_H263,
    ^
modules/avcodec/avcodec.c:154:27: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
        if (avcodec_find_decoder(CODEC_ID_MPEG4))
                                 ^~~~~~~~~~~~~~
                                 AV_CODEC_ID_MPEG4
/opt/local/include/libavcodec/avcodec.h:119:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
modules/avcodec/decode.c:46:18: error: use of undeclared identifier 'CODEC_ID_NONE'; did you mean 'AV_CODEC_ID_NONE'?
        if (codec_id == CODEC_ID_NONE)
                        ^~~~~~~~~~~~~
                        AV_CODEC_ID_NONE
/opt/local/include/libavcodec/avcodec.h:102:5: note: 'AV_CODEC_ID_NONE' declared here
    AV_CODEC_ID_NONE,
    ^
7 errors generated.
1 error generated.
modules/avcodec/encode.c:172:23: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you mean 'VID_FMT_YUV420P'?
        st->ctx->pix_fmt   = PIX_FMT_YUV420P;
                             ^~~~~~~~~~~~~~~
                             VID_FMT_YUV420P
/opt/local/include/rem/rem_vid.h:10:2: note: 'VID_FMT_YUV420P' declared here
        VID_FMT_YUV420P =  0, /* planar YUV  4:2:0   12bpp                 */
        ^
make: *** [build-x86_64/modules/avcodec/decode.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build-x86_64/modules/avcodec/avcodec.o] Error 1
modules/avcodec/encode.c:172:23: warning: implicit conversion from enumeration type 'enum vidfmt' to different enumeration type 'enum AVPixelFormat' [-Wenum-conversion]
        st->ctx->pix_fmt   = PIX_FMT_YUV420P;
                           ~ ^~~~~~~~~~~~~~~
modules/avcodec/encode.c:177:22: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
        if (st->codec_id == CODEC_ID_H264) {
                            ^~~~~~~~~~~~~
                            AV_CODEC_ID_H264
/opt/local/include/libavcodec/avcodec.h:134:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
modules/avcodec/encode.c:178:12: warning: 'me_method' is deprecated [-Wdeprecated-declarations]
                st->ctx->me_method = ME_UMH;
                         ^
/opt/local/include/libavcodec/avcodec.h:1759:30: note: 'me_method' has been explicitly marked deprecated here
    attribute_deprecated int me_method;
                             ^
modules/avcodec/encode.c:259:22: error: use of undeclared identifier 'CODEC_ID_H263'; did you mean 'AV_CODEC_ID_H263'?
        if (st->codec_id == CODEC_ID_H263)
                            ^~~~~~~~~~~~~
                            AV_CODEC_ID_H263
/opt/local/include/libavcodec/avcodec.h:111:5: note: 'AV_CODEC_ID_H263' declared here
    AV_CODEC_ID_H263,
    ^
modules/avcodec/encode.c:261:27: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
        else if (st->codec_id == CODEC_ID_H264)
                                 ^~~~~~~~~~~~~
                                 AV_CODEC_ID_H264
/opt/local/include/libavcodec/avcodec.h:134:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
modules/avcodec/encode.c:429:22: error: use of undeclared identifier 'CODEC_ID_NONE'; did you mean 'AV_CODEC_ID_NONE'?
        if (st->codec_id == CODEC_ID_NONE) {
                            ^~~~~~~~~~~~~
                            AV_CODEC_ID_NONE
/opt/local/include/libavcodec/avcodec.h:102:5: note: 'AV_CODEC_ID_NONE' declared here
    AV_CODEC_ID_NONE,
    ^
modules/avcodec/encode.c:443:22: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
        if (st->codec_id == CODEC_ID_H264) {
                            ^~~~~~~~~~~~~
                            AV_CODEC_ID_H264
/opt/local/include/libavcodec/avcodec.h:134:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
modules/avcodec/encode.c:628:7: error: use of undeclared identifier 'CODEC_ID_H263'; did you mean 'AV_CODEC_ID_H263'?
        case CODEC_ID_H263:
             ^~~~~~~~~~~~~
             AV_CODEC_ID_H263
/opt/local/include/libavcodec/avcodec.h:111:5: note: 'AV_CODEC_ID_H263' declared here
    AV_CODEC_ID_H263,
    ^
modules/avcodec/encode.c:632:7: error: use of undeclared identifier 'CODEC_ID_H264'; did you mean 'AV_CODEC_ID_H264'?
        case CODEC_ID_H264:
             ^~~~~~~~~~~~~
             AV_CODEC_ID_H264
/opt/local/include/libavcodec/avcodec.h:134:5: note: 'AV_CODEC_ID_H264' declared here
    AV_CODEC_ID_H264,
    ^
modules/avcodec/encode.c:636:7: error: use of undeclared identifier 'CODEC_ID_MPEG4'; did you mean 'AV_CODEC_ID_MPEG4'?
        case CODEC_ID_MPEG4:
             ^~~~~~~~~~~~~~
             AV_CODEC_ID_MPEG4
/opt/local/include/libavcodec/avcodec.h:119:5: note: 'AV_CODEC_ID_MPEG4' declared here
    AV_CODEC_ID_MPEG4,
    ^
2 warnings and 9 errors generated.
make: *** [build-x86_64/modules/avcodec/encode.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_net_baresip/baresip/work/baresip-0.4.11'

For compatibility with both ffmpeg 2.0 and 3.0

  • CODEC_ID_* -> AV_CODEC_ID_*
  • PIX_FMT_* -> AV_PIX_FMT_*

See FFmpeg doc/APIchanges for details.

Full build log attached.

Attachments (5)

baresip-0.4.11-main.log (94.4 KB) - added by dbevans (David B. Evans) 8 years ago.
Build log showing build failure of baresip 0.4.11 with ffmpeg 3.0
Portfile-libre.patch (890 bytes) - added by alfredh (Alfred E. Heggestad) 8 years ago.
Portfile-librem.patch (842 bytes) - added by alfredh (Alfred E. Heggestad) 8 years ago.
Portfile-baresip.patch (1.5 KB) - added by alfredh (Alfred E. Heggestad) 8 years ago.
Portfile-baresip-with-patch.diff (2.3 KB) - added by dbevans (David B. Evans) 8 years ago.
Updated patch for baresip

Download all attachments as: .zip

Change History (9)

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

Attachment: baresip-0.4.11-main.log added

Build log showing build failure of baresip 0.4.11 with ffmpeg 3.0

Changed 8 years ago by alfredh (Alfred E. Heggestad)

Attachment: Portfile-libre.patch added

Changed 8 years ago by alfredh (Alfred E. Heggestad)

Attachment: Portfile-librem.patch added

Changed 8 years ago by alfredh (Alfred E. Heggestad)

Attachment: Portfile-baresip.patch added

comment:1 Changed 8 years ago by alfredh (Alfred E. Heggestad)

the 3 patches upgrade libre, librem and baresip to latest releases.

please review and commit them all at the same time.

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

Just one error when compiling baresip with ffmpeg 3.0

  CC [M]  build-x86_64/modules/cons/cons.o
modules/avcodec/encode.c:174:23: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you mean 'VID_FMT_YUV420P'?
        st->ctx->pix_fmt   = PIX_FMT_YUV420P;
                             ^~~~~~~~~~~~~~~
                             VID_FMT_YUV420P
/opt/local/include/rem/rem_vid.h:10:2: note: 'VID_FMT_YUV420P' declared here
        VID_FMT_YUV420P =  0, /* planar YUV  4:2:0   12bpp                 */
        ^
modules/avcodec/encode.c:174:23: warning: implicit conversion from enumeration type 'enum vidfmt' to different enumeration type 'enum AVPixelFormat' [-Wenum-conversion]
        st->ctx->pix_fmt   = PIX_FMT_YUV420P;
                           ~ ^~~~~~~~~~~~~~~
1 warning and 1 error generated.
make: *** [build-x86_64/modules/avcodec/encode.o] Error 1

After patching this one instance of PIX_FMT_YUV420P to AV_PIX_FMT_YUV420P, baresip builds without error using either current ffmpeg 2.8.6 or 3.0.

See modified patch attached. Let me know if this is OK to commit.

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

Updated patch for baresip

comment:3 Changed 8 years ago by alfredh (Alfred E. Heggestad)

this looks very good :)

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

Resolution: fixed
Status: newclosed

Updates committed in r146152, r146153, r146154. Thanks for the updates.

Note: See TracTickets for help on using tickets.