Opened 8 months ago

Last modified 5 months ago

#2419 open defect

Fail to build with ffmpeg 7

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

mplayer svn r38458
ffmpeg 7.0 and ffmpeg master
Debian unstable amd64 GCC 13.2.0

cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=x86-64 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wdate-time -D_FORTIFY_SOURCE=2 -fpie -DPIC -D_REENTRANT -I/usr/include/p11-kit-1 -I/usr/include/samba-4.0 -I/usr/include/ -I/usr/include/openjpeg-2.5 -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/libpng16 -DZLIB_CONST -I/usr/include/opus -I/usr/include/bs2b -I/usr/include/libxml2 -c -o libao2/ao_jack.o libao2/ao_jack.c
libao2/ao_jack.c:74:8: error: unknown type name 'AVFifoBuffer'
   74 | static AVFifoBuffer *buffer;
      |        ^~~~~~~~~~~~
libao2/ao_jack.c: In function 'write_buffer':
libao2/ao_jack.c:85:14: error: implicit declaration of function 'av_fifo_space'; did you mean 'av_fifo_peek'? [-Werror=implicit-function-declaration]
   85 |   int free = av_fifo_space(buffer);
      |              ^~~~~~~~~~~~~
      |              av_fifo_peek
libao2/ao_jack.c:87:10: error: implicit declaration of function 'av_fifo_generic_write'; did you mean 'av_fifo_can_write'? [-Werror=implicit-function-declaration]
   87 |   return av_fifo_generic_write(buffer, data, len, NULL);
      |          ^~~~~~~~~~~~~~~~~~~~~
      |          av_fifo_can_write
libao2/ao_jack.c: In function 'read_buffer':
libao2/ao_jack.c:128:18: error: implicit declaration of function 'av_fifo_size'; did you mean 'av_fifo_write'? [-Werror=implicit-function-declaration]
  128 |   int buffered = av_fifo_size(buffer);
      |                  ^~~~~~~~~~~~
      |                  av_fifo_write
libao2/ao_jack.c:133:3: error: implicit declaration of function 'av_fifo_generic_read'; did you mean 'av_fifo_can_read'? [-Werror=implicit-function-declaration]
  133 |   av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave);
      |   ^~~~~~~~~~~~~~~~~~~~
      |   av_fifo_can_read
libao2/ao_jack.c: In function 'init':
libao2/ao_jack.c:245:12: error: implicit declaration of function 'av_fifo_alloc'; did you mean 'av_fifo_alloc2'? [-Werror=implicit-function-declaration]
  245 |   buffer = av_fifo_alloc(BUFFSIZE);
      |            ^~~~~~~~~~~~~
      |            av_fifo_alloc2
libao2/ao_jack.c:245:10: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  245 |   buffer = av_fifo_alloc(BUFFSIZE);
      |          ^
libao2/ao_jack.c:284:3: warning: 'jack_port_get_total_latency' is deprecated [-Wdeprecated-declarations]
  284 |   jack_latency = (float)(jack_port_get_total_latency(client, ports[0]) +
      |   ^~~~~~~~~~~~
In file included from libao2/ao_jack.c:41:
/usr/include/jack/jack.h:1243:16: note: declared here
 1243 | jack_nframes_t jack_port_get_total_latency (jack_client_t *client,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
libao2/ao_jack.c:305:3: error: implicit declaration of function 'av_fifo_free'; did you mean 'av_fifo_freep2'? [-Werror=implicit-function-declaration]
  305 |   av_fifo_free(buffer);
      |   ^~~~~~~~~~~~
      |   av_fifo_freep2
libao2/ao_jack.c: In function 'reset':
libao2/ao_jack.c:327:3: error: implicit declaration of function 'av_fifo_reset'; did you mean 'av_fifo_reset2'? [-Werror=implicit-function-declaration]
  327 |   av_fifo_reset(buffer);
      |   ^~~~~~~~~~~~~
      |   av_fifo_reset2
cc1: some warnings being treated as errors

Change History (6)

comment:1 by beastd, 7 months ago

Status: newopen

There is a patch[1] from me on the development mailing list. Beware the quoted one is from a different person, mine is the one in the attachment.

From what I could hear on my machine, it worked fine. Wanted to check if it's technically correct before committing.

1: https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-April/074171.html

comment:2 by marillat@…, 7 months ago

For me the build fail because libavcodec/xvmc.h has been removed in ffmpeg 7.0

cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=x86-64 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wdate-time -D_FORTIFY_SOURCE=2 -fpie -DPIC -D_REENTRANT -I/usr/include/p11-kit-1 -I/usr/include/samba-4.0 -I/usr/include/ -I/usr/include/openjpeg-2.5 -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/libpng16 -DZLIB_CONST -I/usr/include/opus -I/usr/include/bs2b -I/usr/include/libxml2 -c -o libvo/vo_xvmc.o libvo/vo_xvmc.c
libvo/vo_xvmc.c:48:10: fatal error: libavcodec/xvmc.h: No such file or directory
   48 | #include "libavcodec/xvmc.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

comment:3 by marillat@…, 7 months ago

OK, I see that XvMC has been relmoved in ffmpeg 7.0

I'll do a new build with --disable-xvmc

Changelog:- dropped obsolete XvMC hwaccel

in reply to:  1 ; comment:4 by marillat@…, 7 months ago

Replying to beastd:

There is a patch[1] from me on the development mailing list. Beware the quoted one is from a different person, mine is the one in the attachment.

Work fine for me. I did a simple test

mencoder foo.avi -oac copy -ovc copy -o foo.mkv

in reply to:  4 comment:5 by beastd, 7 months ago

Replying to marillat@…:

Replying to beastd:

There is a patch[1] from me on the development mailing list. Beware the quoted one is from a different person, mine is the one in the attachment.

Work fine for me. I did a simple test

mencoder foo.avi -oac copy -ovc copy -o foo.mkv

This doesn't involve ao jack though. Build works for me as well.

I actually tested with playback via ao jack and that sounded fine too.

I need to check if it is technically correct and doesn't introduce concurrency problems. That's why I added locking back into ao sdl.

comment:6 by Yury, 5 months ago

With your patch the compilations goes much further, but for me error occurs on linking stage of mplayer, not sure if it is new bug:

/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(mxfenc.o): in function `mxf_write_packet':
mxfenc.c:(.text+0x83ae): undefined reference to `ff_avc_find_startcode'
/usr/local/bin/ld: mxfenc.c:(.text+0x83cf): undefined reference to `ff_avc_decode_sps'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(dashenc.o): in function `set_codec_str.constprop.0':
dashenc.c:(.text+0x84e): undefined reference to `ff_isom_write_avcc'
/usr/local/bin/ld: dashenc.c:(.text+0x960): undefined reference to `ff_isom_get_vpcc_features'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(flvenc.o): in function `flv_write_codec_header':
flvenc.c:(.text+0x7f6): undefined reference to `ff_isom_write_avcc'
/usr/local/bin/ld: flvenc.c:(.text+0xa27): undefined reference to `ff_isom_write_vpcc'
/usr/local/bin/ld: flvenc.c:(.text+0xa5e): undefined reference to `ff_isom_write_hvcc'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(flvenc.o): in function `flv_write_packet':
flvenc.c:(.text+0x29cf): undefined reference to `ff_avc_parse_nal_units_buf'
/usr/local/bin/ld: flvenc.c:(.text+0x2b3c): undefined reference to `ff_hevc_annexb2mp4_buf'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(hlsenc.o): in function `write_codec_attr':
hlsenc.c:(.text+0x6c8): undefined reference to `ff_nal_unit_extract_rbsp'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(matroskaenc.o): in function `mkv_reformat_h2645':
matroskaenc.c:(.text+0x1d5): undefined reference to `ff_nal_units_write_list'
/usr/local/bin/ld: matroskaenc.c:(.text+0x1f1): undefined reference to `ff_nal_units_create_list'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(matroskaenc.o): in function `mkv_assemble_native_codecprivate.constprop.0':
matroskaenc.c:(.text+0xab7): undefined reference to `ff_isom_write_avcc'
/usr/local/bin/ld: matroskaenc.c:(.text+0xc03): undefined reference to `ff_isom_write_hvcc'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(movenc.o): in function `mov_write_video_tag':
movenc.c:(.text+0x9c0b): undefined reference to `ff_isom_write_avcc'
/usr/local/bin/ld: movenc.c:(.text+0xa206): undefined reference to `ff_isom_write_hvcc'
/usr/local/bin/ld: movenc.c:(.text+0xa31a): undefined reference to `ff_isom_write_vvcc'
/usr/local/bin/ld: movenc.c:(.text+0xa4a9): undefined reference to `ff_isom_write_hvcc'
/usr/local/bin/ld: movenc.c:(.text+0xa4d9): undefined reference to `ff_isom_write_vvcc'
/usr/local/bin/ld: movenc.c:(.text+0xa75d): undefined reference to `ff_isom_write_vpcc'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(movenc.o): in function `ff_mov_write_packet':
movenc.c:(.text+0x10ae0): undefined reference to `ff_vvc_annexb2mp4'
/usr/local/bin/ld: movenc.c:(.text+0x10c11): undefined reference to `ff_vvc_annexb2mp4_buf'
/usr/local/bin/ld: movenc.c:(.text+0x10c94): undefined reference to `ff_hevc_annexb2mp4_buf'
/usr/local/bin/ld: movenc.c:(.text+0x1118b): undefined reference to `ff_hevc_annexb2mp4'
/usr/local/bin/ld: movenc.c:(.text+0x114a6): undefined reference to `ff_avc_parse_nal_units'
/usr/local/bin/ld: movenc.c:(.text+0x114c3): undefined reference to `ff_avc_parse_nal_units_buf'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(movenc.o): in function `mov_write_header':
movenc.c:(.text+0x15540): undefined reference to `ff_avc_write_annexb_extradata'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(movenccenc.o): in function `ff_mov_cenc_avc_parse_nal_units':
movenccenc.c:(.text+0x2e0): undefined reference to `ff_avc_find_startcode'
/usr/local/bin/ld: movenccenc.c:(.text+0x311): undefined reference to `ff_avc_find_startcode'
/usr/local/bin/ld: ffmpeg/libavformat/libavformat.a(smoothstreamingenc.o): in function `ism_write_header':
smoothstreamingenc.c:(.text+0xbcb): undefined reference to `ff_avc_write_annexb_extradata'
collect2: error: ld returned 1 exit status
gmake: * [Makefile:750: mplayer] Error 1

Note: See TracTickets for help on using tickets.