Bug#1013460: synfig: FTBFS with ffmpeg 5.0
Source: synfig
Version: 1.5.1+dfsg-2
Severity: serious
Tags: ftbfs sid bookworm
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramacher@debian.org
https://buildd.debian.org/status/fetch.php?pkg=synfig&arch=amd64&ver=1.5.1%2Bdfsg-2%2Bb1&stamp=1656018432&raw=0
libtool: compile: g++ -DHAVE_CONFIG_H -I../../.. -I../../../src -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/libxml++-2.6 -I/usr/lib/x86_64-linux-gnu/libxml++-2.6/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/mlt-7/mlt++ -I/usr/include/mlt-7 -I/usr/include/ETL -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\"/usr/share/locale\" -I/usr/include/x86_64-linux-gnu -D__STDC_CONSTANT_MACROS -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -DNDEBUG -W -Wall -c trgt_av.cpp -fPIC -DPIC -o .libs/libmod_libavcodec_la-trgt_av.o
In file included from main.cpp:35:
main.cpp: In function ‘synfig::Module* mod_libavcodec_LTX_new_instance(synfig::ProgressCallback*)’:
../../../src/synfig/module.h:85:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
85 | if(cb)cb->error(#x": Unable to load module due to version mismatch."); return nullptr; } \
| ^~
main.cpp:53:1: note: in expansion of macro ‘MODULE_INVENTORY_BEGIN’
53 | MODULE_INVENTORY_BEGIN(mod_libavcodec)
| ^~~~~~~~~~~~~~~~~~~~~~
../../../src/synfig/module.h:85:80: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
85 | if(cb)cb->error(#x": Unable to load module due to version mismatch."); return nullptr; } \
| ^~~~~~
main.cpp:53:1: note: in expansion of macro ‘MODULE_INVENTORY_BEGIN’
53 | MODULE_INVENTORY_BEGIN(mod_libavcodec)
| ^~~~~~~~~~~~~~~~~~~~~~
trgt_av.cpp: In member function ‘bool Target_LibAVCodec::Internal::add_video_stream(AVCodecID, const synfig::RendDesc&)’:
trgt_av.cpp:127:33: error: ‘avcodec_alloc_context3’ was not declared in this scope; did you mean ‘avio_alloc_context’?
127 | video_context = avcodec_alloc_context3(video_codec);
| ^~~~~~~~~~~~~~~~~~~~~~
| avio_alloc_context
trgt_av.cpp:136:30: error: invalid use of incomplete type ‘struct AVCodecContext’
136 | video_context->bit_rate = 400*1024*1024/3600; // 400Mb per hour
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:137:30: error: invalid use of incomplete type ‘struct AVCodecContext’
137 | video_context->width = desc.get_w(); // in most cases resolution must be multiple of two
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:138:30: error: invalid use of incomplete type ‘struct AVCodecContext’
138 | video_context->height = desc.get_h();
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:139:30: error: invalid use of incomplete type ‘struct AVCodecContext’
139 | video_context->coded_width = video_context->width;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:139:60: error: invalid use of incomplete type ‘struct AVCodecContext’
139 | video_context->coded_width = video_context->width;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:140:30: error: invalid use of incomplete type ‘struct AVCodecContext’
140 | video_context->coded_height = video_context->height;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:140:60: error: invalid use of incomplete type ‘struct AVCodecContext’
140 | video_context->coded_height = video_context->height;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:141:30: error: invalid use of incomplete type ‘struct AVCodecContext’
141 | video_context->pix_fmt = AV_PIX_FMT_YUV420P;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:142:30: error: invalid use of incomplete type ‘struct AVCodecContext’
142 | video_context->gop_size = fps; // emit one intra frame every second
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:143:30: error: invalid use of incomplete type ‘struct AVCodecContext’
143 | video_context->mb_decision = FF_MB_DECISION_RD; // use best acroblock decision algorithm
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:143:47: error: ‘FF_MB_DECISION_RD’ was not declared in this scope
143 | video_context->mb_decision = FF_MB_DECISION_RD; // use best acroblock decision algorithm
| ^~~~~~~~~~~~~~~~~
trgt_av.cpp:144:30: error: invalid use of incomplete type ‘struct AVCodecContext’
144 | video_context->framerate = (AVRational){ fps, 1 };
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:145:30: error: invalid use of incomplete type ‘struct AVCodecContext’
145 | video_context->time_base = (AVRational){ 1, fps };
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:146:60: error: invalid use of incomplete type ‘struct AVCodecContext’
146 | video_stream->time_base = video_context->time_base;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:150:38: error: invalid use of incomplete type ‘struct AVCodecContext’
150 | video_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:150:49: error: ‘AV_CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope
150 | video_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
trgt_av.cpp: In member function ‘bool Target_LibAVCodec::Internal::open_video_stream()’:
trgt_av.cpp:156:21: error: ‘avcodec_open2’ was not declared in this scope; did you mean ‘avio_open2’?
156 | if (avcodec_open2(video_context, NULL, NULL) < 0) {
| ^~~~~~~~~~~~~
| avio_open2
trgt_av.cpp:168:52: error: invalid use of incomplete type ‘struct AVCodecContext’
168 | video_frame->format = video_context->pix_fmt;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:169:52: error: invalid use of incomplete type ‘struct AVCodecContext’
169 | video_frame->width = video_context->width;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:170:52: error: invalid use of incomplete type ‘struct AVCodecContext’
170 | video_frame->height = video_context->height;
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp:207:21: error: ‘avcodec_parameters_from_context’ was not declared in this scope; did you mean ‘avcodec_parameters_free’?
207 | if (avcodec_parameters_from_context(video_stream->codecpar, video_context) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| avcodec_parameters_free
trgt_av.cpp: In member function ‘bool Target_LibAVCodec::Internal::open(const String&, const synfig::RendDesc&)’:
trgt_av.cpp:235:25: error: ‘av_register_all’ was not declared in this scope; did you mean ‘av_registered’?
235 | av_register_all();
| ^~~~~~~~~~~~~~~
| av_registered
trgt_av.cpp:240:57: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
240 | AVOutputFormat *format = av_guess_format(NULL, filename.c_str(), NULL);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const AVOutputFormat*
trgt_av.cpp:243:49: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
243 | format = av_guess_format("mpeg", NULL, NULL);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
| |
| const AVOutputFormat*
trgt_av.cpp:255:59: error: ‘AVFormatContext’ {aka ‘struct AVFormatContext’} has no member named ‘filename’
255 | if (filename.size() + 1 > sizeof(context->filename)) {
| ^~~~~~~~
trgt_av.cpp:258:49: error: ‘AVFormatContext’ {aka ‘struct AVFormatContext’} has no member named ‘filename’
258 | sizeof(context->filename) - 1,
| ^~~~~~~~
trgt_av.cpp:263:33: error: ‘AVFormatContext’ {aka ‘struct AVFormatContext’} has no member named ‘filename’
263 | memcpy(context->filename, filename.c_str(), filename.size() + 1);
| ^~~~~~~~
trgt_av.cpp: In member function ‘bool Target_LibAVCodec::Internal::encode_frame(const synfig::Surface&, bool)’:
trgt_av.cpp:346:21: error: ‘avcodec_send_frame’ was not declared in this scope; did you mean ‘avcodec_get_name’?
346 | if (avcodec_send_frame(video_context, video_frame) < 0) {
| ^~~~~~~~~~~~~~~~~~
| avcodec_get_name
trgt_av.cpp:352:35: error: ‘avcodec_receive_packet’ was not declared in this scope
352 | int res = avcodec_receive_packet(video_context, packet);
| ^~~~~~~~~~~~~~~~~~~~~~
trgt_av.cpp:361:67: error: invalid use of incomplete type ‘struct AVCodecContext’
361 | av_packet_rescale_ts(packet, video_context->time_base, video_stream->time_base);
| ^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from trgt_av.cpp:41:
/usr/include/x86_64-linux-gnu/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
195 | struct AVCodecContext;
| ^~~~~~~~~~~~~~
trgt_av.cpp: In member function ‘void Target_LibAVCodec::Internal::close()’:
trgt_av.cpp:390:36: error: ‘avcodec_free_context’ was not declared in this scope; did you mean ‘avformat_free_context’?
390 | if (video_context) avcodec_free_context(&video_context);
| ^~~~~~~~~~~~~~~~~~~~
| avformat_free_context
make[5]: *** [Makefile:620: libmod_libavcodec_la-trgt_av.lo] Error 1
Cheers
--
Sebastian Ramacher
Reply to: