Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834374 - games-emulation/mgba-0.9.3 with ffmpeg-5.0: src/feature/ffmpeg/ffmpeg-decoder.c:44:42: error: implicit declaration of function ‘avcodec_alloc_context3’; did you mean ‘avio_alloc_context’? [-Werror=implicit-function-declaration]
Summary: games-emulation/mgba-0.9.3 with ffmpeg-5.0: src/feature/ffmpeg/ffmpeg-decoder...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL: https://github.com/mgba-emu/mgba/pull...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: ffmpeg-5.0
  Show dependency tree
 
Reported: 2022-02-28 17:36 UTC by Kobboi
Modified: 2022-03-01 08:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,8.63 KB, application/gzip)
2022-02-28 17:37 UTC, Kobboi
Details
emerge-info.txt (emerge-info.txt,8.00 KB, text/plain)
2022-02-28 17:37 UTC, Kobboi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2022-02-28 17:36:26 UTC
[94/257] /usr/bin/x86_64-pc-linux-gnu-gcc -DBUILD_GL -DBUILD_GLES2 -DENABLE_SCRIPTING -DHAVE_CHMOD -DHAVE_CRC32 -DHAVE_LOCALE -DHAVE_LOCALTIME_R -DHAVE_PTHREAD_SETNAME_NP -DHAVE_SETLOCALE -DHAVE_STRDUP -DHAVE_STRNDUP -DHAVE_UMASK -DHAVE_VASPRINTF -DMGBA_DLL -DM_CORE_G
B -DM_CORE_GBA -DUSE_FFMPEG -DUSE_LIBSWRESAMPLE -DUSE_MINIZIP -DUSE_PNG -DUSE_PTHREADS -DUSE_ZLIB -D_GNU_SOURCE -Dmgba_EXPORTS -I/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/include -I/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3_build/inc
lude -I/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src -I/usr/include/minizip  -O2 -march=znver3 -pipe -g -ggdb3 -Wall -Wextra -Wno-missing-field-initializers -Werror=implicit-function-declaration -pthread -O3 -DNDEBUG -gdwarf -fPIC -std=c99 -MD -MT CM
akeFiles/mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o -MF CMakeFiles/mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o.d -o CMakeFiles/mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o -c /var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpe
g-decoder.c
FAILED: CMakeFiles/mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -DBUILD_GL -DBUILD_GLES2 -DENABLE_SCRIPTING -DHAVE_CHMOD -DHAVE_CRC32 -DHAVE_LOCALE -DHAVE_LOCALTIME_R -DHAVE_PTHREAD_SETNAME_NP -DHAVE_SETLOCALE -DHAVE_STRDUP -DHAVE_STRNDUP -DHAVE_UMASK -DHAVE_VASPRINTF -DMGBA_DLL -DM_CORE_GB -DM_COR
E_GBA -DUSE_FFMPEG -DUSE_LIBSWRESAMPLE -DUSE_MINIZIP -DUSE_PNG -DUSE_PTHREADS -DUSE_ZLIB -D_GNU_SOURCE -Dmgba_EXPORTS -I/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/include -I/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3_build/include -I/v
ar/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src -I/usr/include/minizip  -O2 -march=znver3 -pipe -g -ggdb3 -Wall -Wextra -Wno-missing-field-initializers -Werror=implicit-function-declaration -pthread -O3 -DNDEBUG -gdwarf -fPIC -std=c99 -MD -MT CMakeFiles/
mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o -MF CMakeFiles/mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o.d -o CMakeFiles/mgba.dir/src/feature/ffmpeg/ffmpeg-decoder.c.o -c /var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder
.c
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c: In function ‘FFmpegDecoderOpen’:
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:44:42: error: implicit declaration of function ‘avcodec_alloc_context3’; did you mean ‘avio_alloc_context’? [-Werror=implicit-function-declaration]
   44 |                         decoder->video = avcodec_alloc_context3(NULL);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~
      |                                          avio_alloc_context
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:44:40: warning: assignment to ‘struct AVCodecContext *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   44 |                         decoder->video = avcodec_alloc_context3(NULL);
      |                                        ^
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:53:40: warning: assignment to ‘struct AVCodecContext *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   53 |                         decoder->audio = avcodec_alloc_context3(NULL);
      |                                        ^
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:65:21: error: implicit declaration of function ‘avcodec_parameters_to_context’; did you mean ‘avcodec_parameters_copy’? [-Werror=implicit-function-declaration]
   65 |                 if (avcodec_parameters_to_context(context, decoder->context->streams[i]->codecpar) < 0) {
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     avcodec_parameters_copy
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:70:53: error: invalid use of undefined type ‘struct AVCodecContext’
   70 |                 codec = avcodec_find_decoder(context->codec_id);
      |                                                     ^~
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:75:21: error: implicit declaration of function ‘avcodec_open2’; did you mean ‘avio_open2’? [-Werror=implicit-function-declaration]
   75 |                 if (avcodec_open2(context, codec, NULL) < 0) {
      |                     ^~~~~~~~~~~~~
      |                     avio_open2
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c: In function ‘FFmpegDecoderClose’:
/var/tmp/portage/games-emulation/mgba-0.9.3/work/mgba-0.9.3/src/feature/ffmpeg/ffmpeg-decoder.c:114:17: error: implicit declaration of function ‘avcodec_free_context’; did you mean ‘avformat_free_context’? [-Werror=implicit-function-declaration]
  114 |                 avcodec_free_context(&decoder->audio);
      |                 ^~~~~~~~~~~~~~~~~~~~
      |                 avformat_free_context


Reproducible: Always
Comment 1 Kobboi 2022-02-28 17:37:37 UTC
Created attachment 766011 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 17:37:39 UTC
Created attachment 766012 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 17:41:14 UTC
Seems to have made it into the main branch, but no new release yet: https://github.com/mgba-emu/mgba/pull/2434
Comment 4 Kobboi 2022-02-28 17:45:29 UTC
Patch seems to work fine, will create a PR
Comment 5 Larry the Git Cow gentoo-dev 2022-03-01 08:02:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=219f791f4599cf5ca3668cbbd9f5c95b20dac98c

commit 219f791f4599cf5ca3668cbbd9f5c95b20dac98c
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2022-03-01 08:01:28 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2022-03-01 08:01:59 +0000

    games-emulation/mgba: Revbump to fix compilation against ffmpeg-5
    
    Closes: https://bugs.gentoo.org/834374
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 .../mgba/files/mgba-0.9.3-ffmpeg5.patch            | 117 ++++++++++++++++++
 games-emulation/mgba/mgba-0.9.3-r1.ebuild          | 132 +++++++++++++++++++++
 2 files changed, 249 insertions(+)