DeaDBeeF-Player/deadbeef

Fails to build from AUR

Visentinel opened this issue · 1 comments

I type yay -S deadbeef

It fails to build

yay is an AUR helper and i am on Arch Linux - CachyOS

Deadbeef version: 1.9.6-1
OS: CachyOS

Error

CC prefwin/ddb_gui_GTK3_la-prefwinnetwork.lo
CC prefwin/ddb_gui_GTK3_la-prefwinplayback.lo
CC prefwin/ddb_gui_GTK3_la-prefwinplugins.lo
CC prefwin/ddb_gui_GTK3_la-prefwinsound.lo
CCLD ddb_gui_GTK3.la
make[3]: Leaving directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6/plugins/gtkui'
make[2]: Leaving directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6/plugins/gtkui'
Making all in plugins/alsa
make[2]: Entering directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6/plugins/alsa'
CC alsa_la-alsa.lo
CCLD alsa.la
make[2]: Leaving directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6/plugins/alsa'
Making all in plugins/ffmpeg
make[2]: Entering directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6/plugins/ffmpeg'
CC ffmpeg_la-ffmpeg.lo
ffmpeg.c:118:80: error: no member named 'channels' in 'struct AVCodecContext'
118 | if (!info->buffer || info->buffer_size < frame_size * info->codec_context->channels) {
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:123:61: error: no member named 'channels' in 'struct AVCodecContext'
123 | info->buffer_size = frame_sizeinfo->codec_context->channels;
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:140:14: warning: initializing 'AVCodec ' (aka 'struct AVCodec ') with an expression of type 'const AVCodec ' (aka 'const struct AVCodec ') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
140 | AVCodec codec = avcodec_find_decoder(format_context->streams[stream_index]->codecpar->codec_id);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffmpeg.c:234:42: error: no member named 'channels' in 'struct AVCodecContext'
234 | if (bps <= 0 || info->codec_context->channels <= 0 || samplerate <= 0) {
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:251:48: error: no member named 'channels' in 'struct AVCodecContext'
251 | _info->fmt.channels = info->codec_context->channels;
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:299:9: warning: 'avcodec_close' is deprecated [-Wdeprecated-declarations]
299 | avcodec_close (info->codec_context);
| ^
/usr/include/libavcodec/avcodec.h:2386:1: note: 'avcodec_close' has been explicitly marked deprecated here
2386 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated attribute((deprecated))
| ^
ffmpeg.c:399:54: error: no member named 'channels' in 'struct AVCodecContext'
399 | int chCnt = info->codec_context->channels;
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:466:66: error: no member named 'channels' in 'struct AVCodecContext'
466 | for (int c = 0; c < info->codec_context->channels; c++) {
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:469:73: error: no member named 'channels' in 'struct AVCodecContext'
469 | info->buffer[i
info->codec_context->channels+c] = ((int8_t )info->frame->extended_data[c])[i];
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:474:85: error: no member named 'channels' in 'struct AVCodecContext'
474 | ((int16_t
)info->buffer)[i
info->codec_context->channels+c] = outsample;
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:478:83: error: no member named 'channels' in 'struct AVCodecContext'
478 | memcpy (&info->buffer[(i
info->codec_context->channels+c)3], &((int8_t)info->frame->extended_data[c])[i
3], 3);
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:483:85: error: no member named 'channels' in 'struct AVCodecContext'
483 | ((int32_t
)info->buffer)[i
info->codec_context->channels+c] = sample;
| ~~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:787:41: error: no member named 'channels' in 'struct AVCodecContext'
787 | if (bps <= 0 || info.codec_context->channels <= 0 || samplerate <= 0) {
| ~~~~~~~~~~~~~~~~~~ ^
ffmpeg.c:822:60: error: no member named 'channels' in 'struct AVCodecContext'
822 | snprintf (s, sizeof (s), "%d", info.codec_context->channels);
| ~~~~~~~~~~~~~~~~~~ ^
/usr/include/bits/stdio2.h:61:31: note: expanded from macro 'snprintf'
61 | __glibc_objsize (str), VA_ARGS)
| ^~~~~~~~~~~
ffmpeg.c:921:22: warning: assigning to 'AVInputFormat *' (aka 'struct AVInputFormat *') from 'const AVInputFormat *' (aka 'const struct AVInputFormat *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
921 | while ((ifmt = av_demuxer_iterate(&iter))) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 12 errors generated.
make[2]: *** [Makefile:561: ffmpeg_la-ffmpeg.lo] Error 1
make[2]: Leaving directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6/plugins/ffmpeg'
make[1]: *** [Makefile:675: all-recursive] Error 1
make[1]: Leaving directory '/home/lee/.cache/yay/deadbeef/src/deadbeef-1.9.6'
make: *** [Makefile:540: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
-> error making: deadbeef-exit status 4
-> Failed to install the following packages. Manual intervention is required:
deadbeef - exit status 4

This is caused by the new ffmpeg which changed the API.
You have several options:

  1. Don't build deadbeef manually, download the build from internet
  2. Downgrade ffmpeg to previous version
  3. Configure deadbeef build with --disable-ffmpeg options
  4. Build deadbeef-git, since this issue has been resolved already