[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1072440: ocaml-ffmpeg: FTBFS with ffmpeg 7.0: swresample_stubs.c:249:10: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?



Source: ocaml-ffmpeg
Version: 1.1.11-1
Severity: important
Tags: trixie sid ftbfs
Usertags: ffmpeg-7.0

Hi,

during a rebuild of the reverse dependencies for the transition to
ffmpeg 7.0, your package failed to build


Relevant part (hopefully):
>  debian/rules binary-arch
> dh binary-arch --with ocaml --buildsystem ocaml_dune
>    dh_update_autotools_config -a -O--buildsystem=ocaml_dune
>    dh_autoreconf -a -O--buildsystem=ocaml_dune
>    dh_ocamlinit -a -O--buildsystem=ocaml_dune
>    dh_auto_configure -a -O--buildsystem=ocaml_dune
>    dh_auto_build -a -O--buildsystem=ocaml_dune
> 	dune build -j 2 -p ffmpeg-avcodec,ffmpeg-avdevice,ffmpeg-avfilter,ffmpeg-av,ffmpeg-avutil,ffmpeg-swresample,ffmpeg-swscale,ffmpeg
> File "swresample/dune", line 7, characters 9-25:
> 7 |   (names swresample_stubs)
>              ^^^^^^^^^^^^^^^^
> (cd _build/default/swresample && /usr/bin/aarch64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/aarch64-linux-gnu -g -I /usr/lib/ocaml -I /usr/lib/ocaml/threads -I ../avcodec -I ../avutil -o swresample_stubs.o -c swresample_stubs.c)
> swresample_stubs.c: In function ‘alloc_out_frame’:
> swresample_stubs.c:249:10: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>   249 |   frame->channel_layout = swr->out_channel_layout;
>       |          ^~~~~~~~~~~~~~
>       |          ch_layout
> swresample_stubs.c: In function ‘swresample_set_context’:
> swresample_stubs.c:552:5: warning: implicit declaration of function ‘av_opt_set_channel_layout’; did you mean ‘av_opt_set_chlayout’? [-Wimplicit-function-declaration]
>   552 |     av_opt_set_channel_layout(ctx, "in_channel_layout", in_channel_layout, 0);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~
>       |     av_opt_set_chlayout
> swresample_stubs.c:554:27: warning: implicit declaration of function ‘av_get_channel_layout_nb_channels’ [-Wimplicit-function-declaration]
>   554 |     swr->in.nb_channels = av_get_channel_layout_nb_channels(in_channel_layout);
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> File "avutil/dune", line 7, characters 9-21:
> 7 |   (names avutil_stubs)
>              ^^^^^^^^^^^^
> (cd _build/default/avutil && /usr/bin/aarch64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/aarch64-linux-gnu -g -I /usr/lib/ocaml -I /usr/lib/ocaml/threads -o avutil_stubs.o -c avutil_stubs.c)
> avutil_stubs.c: In function ‘ocaml_avutil_get_channel_layout_description’:
> avutil_stubs.c:335:3: warning: implicit declaration of function ‘av_get_channel_layout_string’; did you mean ‘av_channel_layout_subset’? [-Wimplicit-function-declaration]
>   335 |   av_get_channel_layout_string(buf, sizeof(buf), Int_val(channels),
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |   av_channel_layout_subset
> In file included from avutil_stubs.c:12:
> avutil_stubs.c: In function ‘ocaml_avutil_get_channel_layout_nb_channels’:
> avutil_stubs.c:345:7: warning: implicit declaration of function ‘av_get_channel_layout_nb_channels’; did you mean ‘ocaml_avutil_get_channel_layout_nb_channels’? [-Wimplicit-function-declaration]
>   345 |       av_get_channel_layout_nb_channels(ChannelLayout_val(_channel_layout))));
>       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/lib/ocaml/caml/memory.h:462:29: note: in definition of macro ‘CAMLreturnT’
>   462 |   type caml__temp_result = (result); \
>       |                             ^~~~~~
> avutil_stubs.c:344:3: note: in expansion of macro ‘CAMLreturn’
>   344 |   CAMLreturn(Val_int(
>       |   ^~~~~~~~~~
> /usr/lib/ocaml/caml/mlvalues.h:79:20: note: in expansion of macro ‘Val_long’
>    79 | #define Val_int(x) Val_long(x)
>       |                    ^~~~~~~~
> avutil_stubs.c:344:14: note: in expansion of macro ‘Val_int’
>   344 |   CAMLreturn(Val_int(
>       |              ^~~~~~~
> avutil_stubs.c: In function ‘ocaml_avutil_get_default_channel_layout’:
> avutil_stubs.c:351:17: warning: implicit declaration of function ‘av_get_default_channel_layout’; did you mean ‘ocaml_avutil_get_default_channel_layout’? [-Wimplicit-function-declaration]
>   351 |   int64_t ret = av_get_default_channel_layout(Int_val(_nb_channels));
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                 ocaml_avutil_get_default_channel_layout
> avutil_stubs.c: In function ‘ocaml_avutil_get_channel_layout’:
> avutil_stubs.c:366:17: warning: implicit declaration of function ‘av_get_channel_layout’; did you mean ‘PVV_Channel_layout’? [-Wimplicit-function-declaration]
>   366 |   int64_t ret = av_get_channel_layout(name);
>       |                 ^~~~~~~~~~~~~~~~~~~~~
>       |                 PVV_Channel_layout
> avutil_stubs.c: In function ‘ocaml_avutil_frame_pkt_duration’:
> avutil_stubs.c:614:14: error: ‘AVFrame’ has no member named ‘pkt_duration’; did you mean ‘duration’?
>   614 |   if (frame->pkt_duration == 0)
>       |              ^~~~~~~~~~~~
>       |              duration
> avutil_stubs.c:618:46: error: ‘AVFrame’ has no member named ‘pkt_duration’; did you mean ‘duration’?
>   618 |   Store_field(ret, 0, caml_copy_int64(frame->pkt_duration));
>       |                                              ^~~~~~~~~~~~
> /usr/lib/ocaml/caml/memory.h:475:27: note: in definition of macro ‘Store_field’
>   475 |   value caml__temp_val = (val); \
>       |                           ^~~
> avutil_stubs.c: In function ‘ocaml_avutil_audio_create_frame’:
> avutil_stubs.c:818:10: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>   818 |   frame->channel_layout = channel_layout;
>       |          ^~~~~~~~~~~~~~
>       |          ch_layout
> avutil_stubs.c: In function ‘ocaml_avutil_audio_frame_get_channels’:
> avutil_stubs.c:851:27: error: ‘AVFrame’ has no member named ‘channels’
>   851 |   CAMLreturn(Val_int(frame->channels));
>       |                           ^~
> /usr/lib/ocaml/caml/memory.h:462:29: note: in definition of macro ‘CAMLreturnT’
>   462 |   type caml__temp_result = (result); \
>       |                             ^~~~~~
> avutil_stubs.c:851:3: note: in expansion of macro ‘CAMLreturn’
>   851 |   CAMLreturn(Val_int(frame->channels));
>       |   ^~~~~~~~~~
> /usr/lib/ocaml/caml/mlvalues.h:79:20: note: in expansion of macro ‘Val_long’
>    79 | #define Val_int(x) Val_long(x)
>       |                    ^~~~~~~~
> avutil_stubs.c:851:14: note: in expansion of macro ‘Val_int’
>   851 |   CAMLreturn(Val_int(frame->channels));
>       |              ^~~~~~~
> avutil_stubs.c: In function ‘ocaml_avutil_audio_frame_get_channel_layout’:
> avutil_stubs.c:861:40: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>   861 |   CAMLreturn(Val_ChannelLayout((frame->channel_layout)));
>       |                                        ^~~~~~~~~~~~~~
> /usr/lib/ocaml/caml/memory.h:462:29: note: in definition of macro ‘CAMLreturnT’
>   462 |   type caml__temp_result = (result); \
>       |                             ^~~~~~
> avutil_stubs.c:861:3: note: in expansion of macro ‘CAMLreturn’
>   861 |   CAMLreturn(Val_ChannelLayout((frame->channel_layout)));
>       |   ^~~~~~~~~~
> avutil_stubs.c: In function ‘ocaml_avutil_audio_frame_copy_samples’:
> avutil_stubs.c:883:21: error: ‘AVFrame’ has no member named ‘channels’
>   883 |   int channels = dst->channels;
>       |                     ^~
> avutil_stubs.c:888:10: error: ‘AVFrame’ has no member named ‘channels’
>   888 |       dst->channels != src->channels ||
>       |          ^~
> avutil_stubs.c:888:27: error: ‘AVFrame’ has no member named ‘channels’
>   888 |       dst->channels != src->channels ||
>       |                           ^~
> avutil_stubs.c:889:12: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>   889 |       dst->channel_layout != src->channel_layout)
>       |            ^~~~~~~~~~~~~~
>       |            ch_layout
> avutil_stubs.c:889:35: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>   889 |       dst->channel_layout != src->channel_layout)
>       |                                   ^~~~~~~~~~~~~~
>       |                                   ch_layout
> avutil_stubs.c: In function ‘ocaml_avutil_get_opt’:
> avutil_stubs.c:1207:11: warning: implicit declaration of function ‘av_opt_get_channel_layout’; did you mean ‘av_opt_get_chlayout’? [-Wimplicit-function-declaration]
>  1207 |     err = av_opt_get_channel_layout((void *)obj, (const char *)String_val(name),
>       |           ^~~~~~~~~~~~~~~~~~~~~~~~~
>       |           av_opt_get_chlayout
> avutil_stubs.c: In function ‘ocaml_avutil_av_opt_iter’:
> avutil_stubs.c:1322:8: error: ‘AV_OPT_TYPE_CHANNEL_LAYOUT’ undeclared (first use in this function); did you mean ‘AV_OPT_TYPE_CHLAYOUT’?
>  1322 |   case AV_OPT_TYPE_CHANNEL_LAYOUT:
>       |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
>       |        AV_OPT_TYPE_CHLAYOUT
> avutil_stubs.c:1322:8: note: each undeclared identifier is reported only once for each function it appears in
> avutil_stubs.c:1324:9: warning: implicit declaration of function ‘av_get_channel_name’; did you mean ‘av_channel_name’? [-Wimplicit-function-declaration]
>  1324 |     if (av_get_channel_name(option->default_val.i64)) {
>       |         ^~~~~~~~~~~~~~~~~~~
>       |         av_channel_name
> File "av/dune", line 7, characters 9-17:
> 7 |   (names av_stubs)
>              ^^^^^^^^
> (cd _build/default/av && /usr/bin/aarch64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/aarch64-linux-gnu -g -I /usr/lib/ocaml -I /usr/lib/ocaml/threads -I ../avcodec -I ../avutil -o av_stubs.o -c av_stubs.c)
> av_stubs.c: In function ‘ocaml_av_create_io’:
> av_stubs.c:538:26: warning: passing argument 6 of ‘avio_alloc_context’ from incompatible pointer type [-Wincompatible-pointer-types]
>   538 |                          write_cb, seek_cb);
>       |                          ^~~~~~~~
>       |                          |
>       |                          int (*)(void *, uint8_t *, int) {aka int (*)(void *, unsigned char *, int)}
> In file included from /usr/include/aarch64-linux-gnu/libavformat/avformat.h:319,
>                  from av_stubs.c:20:
> /usr/include/aarch64-linux-gnu/libavformat/avio.h:404:25: note: expected ‘int (*)(void *, const uint8_t *, int)’ {aka ‘int (*)(void *, const unsigned char *, int)’} but argument is of type ‘int (*)(void *, uint8_t *, int)’ {aka ‘int (*)(void *, unsigned char *, int)’}
>   404 |                   int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size),
>       |                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> av_stubs.c: In function ‘new_audio_stream’:
> av_stubs.c:1786:10: error: ‘AVCodecContext’ has no member named ‘channels’
>  1786 |   enc_ctx->channels = channels;
>       |          ^~
> av_stubs.c: In function ‘ocaml_av_stream_bitrate’:
> av_stubs.c:2543:3: warning: ‘av_stream_get_side_data’ is deprecated [-Wdeprecated-declarations]
>  2543 |   AVCPBProperties *props = (AVCPBProperties *)av_stream_get_side_data(
>       |   ^~~~~~~~~~~~~~~
> /usr/include/aarch64-linux-gnu/libavformat/avformat.h:2122:10: note: declared here
>  2122 | uint8_t *av_stream_get_side_data(const AVStream *stream,
>       |          ^~~~~~~~~~~~~~~~~~~~~~~
> File "avcodec/dune", line 7, characters 9-22:
> 7 |   (names avcodec_stubs)
>              ^^^^^^^^^^^^^
> (cd _build/default/avcodec && /usr/bin/aarch64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/aarch64-linux-gnu -g -I /usr/lib/ocaml -I /usr/lib/ocaml/threads -I ../avutil -o avcodec_stubs.o -c avcodec_stubs.c)
> avcodec_stubs.c: In function ‘ocaml_avcodec_create_audio_encoder’:
> avcodec_stubs.c:703:21: error: ‘AVCodecContext’ has no member named ‘channels’
>   703 |   ctx->codec_context->channels = Int_val(_channels);
>       |                     ^~
> avcodec_stubs.c: In function ‘ocaml_avcodec_get_supported_channel_layouts’:
> avcodec_stubs.c:1293:14: error: ‘AVCodec’ has no member named ‘channel_layouts’; did you mean ‘ch_layouts’?
>  1293 |   if (codec->channel_layouts) {
>       |              ^~~~~~~~~~~~~~~
>       |              ch_layouts
> avcodec_stubs.c:1294:24: error: ‘AVCodec’ has no member named ‘channel_layouts’; did you mean ‘ch_layouts’?
>  1294 |     for (i = 0; codec->channel_layouts[i] != 0; i++)
>       |                        ^~~~~~~~~~~~~~~
>       |                        ch_layouts
> In file included from avcodec_stubs.c:8:
> avcodec_stubs.c:1295:53: error: ‘AVCodec’ has no member named ‘channel_layouts’; did you mean ‘ch_layouts’?
>  1295 |       List_add(list, cons, Val_ChannelLayout(codec->channel_layouts[i]));
>       |                                                     ^~~~~~~~~~~~~~~
> /usr/lib/ocaml/caml/memory.h:475:27: note: in definition of macro ‘Store_field’
>   475 |   value caml__temp_val = (val); \
>       |                           ^~~
> avcodec_stubs.c:1295:7: note: in expansion of macro ‘List_add’
>  1295 |       List_add(list, cons, Val_ChannelLayout(codec->channel_layouts[i]));
>       |       ^~~~~~~~
> avcodec_stubs.c: In function ‘ocaml_avcodec_parameters_get_channel_layout’:
> avcodec_stubs.c:1341:11: error: ‘AVCodecParameters’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>  1341 |   if (cp->channel_layout == 0) {
>       |           ^~~~~~~~~~~~~~
>       |           ch_layout
> avcodec_stubs.c:1342:9: error: ‘AVCodecParameters’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>  1342 |     cp->channel_layout = av_get_default_channel_layout(cp->channels);
>       |         ^~~~~~~~~~~~~~
>       |         ch_layout
> avcodec_stubs.c:1342:26: warning: implicit declaration of function ‘av_get_default_channel_layout’ [-Wimplicit-function-declaration]
>  1342 |     cp->channel_layout = av_get_default_channel_layout(cp->channels);
>       |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> avcodec_stubs.c:1342:58: error: ‘AVCodecParameters’ has no member named ‘channels’
>  1342 |     cp->channel_layout = av_get_default_channel_layout(cp->channels);
>       |                                                          ^~
> avcodec_stubs.c:1345:36: error: ‘AVCodecParameters’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>  1345 |   CAMLreturn(Val_ChannelLayout(cp->channel_layout));
>       |                                    ^~~~~~~~~~~~~~
> /usr/lib/ocaml/caml/memory.h:462:29: note: in definition of macro ‘CAMLreturnT’
>   462 |   type caml__temp_result = (result); \
>       |                             ^~~~~~
> avcodec_stubs.c:1345:3: note: in expansion of macro ‘CAMLreturn’
>  1345 |   CAMLreturn(Val_ChannelLayout(cp->channel_layout));
>       |   ^~~~~~~~~~
> avcodec_stubs.c: In function ‘ocaml_avcodec_parameters_get_nb_channels’:
> avcodec_stubs.c:1350:46: error: ‘struct AVCodecParameters’ has no member named ‘channels’
>  1350 |   CAMLreturn(Val_int(CodecParameters_val(_cp)->channels));
>       |                                              ^~
> /usr/lib/ocaml/caml/memory.h:462:29: note: in definition of macro ‘CAMLreturnT’
>   462 |   type caml__temp_result = (result); \
>       |                             ^~~~~~
> avcodec_stubs.c:1350:3: note: in expansion of macro ‘CAMLreturn’
>  1350 |   CAMLreturn(Val_int(CodecParameters_val(_cp)->channels));
>       |   ^~~~~~~~~~
> /usr/lib/ocaml/caml/mlvalues.h:79:20: note: in expansion of macro ‘Val_long’
>    79 | #define Val_int(x) Val_long(x)
>       |                    ^~~~~~~~
> avcodec_stubs.c:1350:14: note: in expansion of macro ‘Val_int’
>  1350 |   CAMLreturn(Val_int(CodecParameters_val(_cp)->channels));
>       |              ^~~~~~~
> avcodec_stubs.c: In function ‘ocaml_avcodec_parameters_audio_copy’:
> avcodec_stubs.c:1377:8: error: ‘AVCodecParameters’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>  1377 |   dst->channel_layout = ChannelLayout_val(_channel_layout);
>       |        ^~~~~~~~~~~~~~
>       |        ch_layout
> avcodec_stubs.c:1378:6: error: ‘AVCodecParameters’ has no member named ‘channels’
>  1378 |   dst->channels = av_get_channel_layout_nb_channels(dst->channel_layout);
>       |      ^~
> avcodec_stubs.c:1378:19: warning: implicit declaration of function ‘av_get_channel_layout_nb_channels’ [-Wimplicit-function-declaration]
>  1378 |   dst->channels = av_get_channel_layout_nb_channels(dst->channel_layout);
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> avcodec_stubs.c:1378:58: error: ‘AVCodecParameters’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
>  1378 |   dst->channels = av_get_channel_layout_nb_channels(dst->channel_layout);
>       |                                                          ^~~~~~~~~~~~~~
>       |                                                          ch_layout
> (cd _build/default/avfilter && /usr/bin/aarch64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/aarch64-linux-gnu -g -I /usr/lib/ocaml -I /usr/lib/ocaml/threads -I ../avutil -o avfilter_stubs.o -c avfilter_stubs.c)
> avfilter_stubs.c: In function ‘ocaml_avfilter_buffersink_get_channel_layout’:
> avfilter_stubs.c:470:21: warning: implicit declaration of function ‘av_buffersink_get_channel_layout’; did you mean ‘av_buffersink_get_ch_layout’? [-Wimplicit-function-declaration]
>   470 |   uint64_t layout = av_buffersink_get_channel_layout(filter_ctx);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                     av_buffersink_get_ch_layout
> dh_auto_build: error: dune build -j 2 -p ffmpeg-avcodec,ffmpeg-avdevice,ffmpeg-avfilter,ffmpeg-av,ffmpeg-avutil,ffmpeg-swresample,ffmpeg-swscale,ffmpeg returned exit code 1
> make: *** [debian/rules:7: binary-arch] Error 25


The full build log is available from:
https://people.debian.org/~sramacher/ffmpeg-7.0/ocaml-ffmpeg_arm64.build

ffmpeg 7.0 is available in experimental.

Cheers

-- 
Sebastian Ramacher


Reply to: