Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834377 - games-emulation/vbam-2.1.4 with ffmpeg-5.0: common/ffmpeg.cpp:101:34: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
Summary: games-emulation/vbam-2.1.4 with ffmpeg-5.0: common/ffmpeg.cpp:101:34: error: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL: https://github.com/visualboyadvance-m...
Whiteboard:
Keywords:
Depends on:
Blocks: ffmpeg-5.0
  Show dependency tree
 
Reported: 2022-02-28 18:44 UTC by Kobboi
Modified: 2023-01-20 03:54 UTC (History)
0 users

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


Attachments
build.log.gz (build.log.gz,8.55 KB, application/gzip)
2022-02-28 18:45 UTC, Kobboi
Details
emerge-info.txt (emerge-info.txt,8.00 KB, text/plain)
2022-02-28 18:45 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 18:44:49 UTC
[24/200] ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DBKPT_SUPPORT -DC_CORE -DELF -DENABLE_NLS -DFINAL_VERSION -DGBA_LOGGING -DHAVE_ARPA_INET_H -DHAVE_NETINET_IN_H -DHAVE_ZLIB_H -DLOCALEDIR=\"/usr/share/locale\" -DNDEBUG -DNO_ASM -DNO_LINK -DPACKAGE="" -DPKGDATADIR=\"/usr/share/vbam\" -DSDL -DSYSCONF_INSTALL_DIR=\"/etc\" -DUSE_OPENGL -DWITH_LIRC=0 -D_REENTRANT -D__AMD64__ -D__STDC_FORMAT_MACROS -I/var/tmp/portage/games-emulation/vbam-2.1.4/work/vbam-2.1.4_build -I/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/fex -I/usr/include/SDL2  -DNDEBUG -O2 -march=znver3 -pipe -g -ggdb3 -fdiagnostics-color=always -pipe -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -feliminate-unused-debug-types -fPIC -fopenmp -mfpmath=sse -msse2 -O2 -fomit-frame-pointer -mtune=generic -Wno-error -std=gnu++11 -MD -MT CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o -MF CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o.d  -std=gnu++11 -fexceptions  -o CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o -c /var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp
FAILED: CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o 
ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DBKPT_SUPPORT -DC_CORE -DELF -DENABLE_NLS -DFINAL_VERSION -DGBA_LOGGING -DHAVE_ARPA_INET_H -DHAVE_NETINET_IN_H -DHAVE_ZLIB_H -DLOCALEDIR=\"/usr/share/locale\" -DNDEBUG -DNO_ASM -DNO_LINK -DPACKAGE="" -DPKGDATADIR=\"/usr/share/vbam\" -DSDL -DSYSCONF_INSTALL_DIR=\"/etc\" -DUSE_OPENGL -DWITH_LIRC=0 -D_REENTRANT -D__AMD64__ -D__STDC_FORMAT_MACROS -I/var/tmp/portage/games-emulation/vbam-2.1.4/work/vbam-2.1.4_build -I/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/fex -I/usr/include/SDL2  -DNDEBUG -O2 -march=znver3 -pipe -g -ggdb3 -fdiagnostics-color=always -pipe -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -feliminate-unused-debug-types -fPIC -fopenmp -mfpmath=sse -msse2 -O2 -fomit-frame-pointer -mtune=generic -Wno-error -std=gnu++11 -MD -MT CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o -MF CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o.d  -std=gnu++11 -fexceptions  -o CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o -c /var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp
/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp: In member function ‘recording::MediaRet recording::MediaRecorder::setup_audio_stream()’:
/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp:101:34: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  101 |     acodec = avcodec_find_encoder(fmt->audio_codec);
      |              ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      |                                  |
      |                                  const AVCodec*
/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp:104:12: error: ‘avcodec_alloc_context3’ was not declared in this scope; did you mean ‘avio_alloc_context’?
  104 |     aenc = avcodec_alloc_context3(acodec);
      |            ^~~~~~~~~~~~~~~~~~~~~~
      |            avio_alloc_context
/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp:106:9: error: invalid use of incomplete type ‘struct AVCodecContext’
  106 |     aenc->sample_fmt = acodec->sample_fmts ? acodec->sample_fmts[0] : AV_SAMPLE_FMT_FLTP;
      |         ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from /var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.h:11,
                 from /var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp:1:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/var/tmp/portage/games-emulation/vbam-2.1.4/work/visualboyadvance-m-2.1.4/src/common/ffmpeg.cpp:107:9: error: invalid use of incomplete type ‘struct AVCodecContext’
  107 |     aenc->bit_rate = 128000; // mp3
      |         ^~


Reproducible: Always
Comment 1 Kobboi 2022-02-28 18:45:04 UTC
Created attachment 766017 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 18:45:05 UTC
Created attachment 766018 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 18:45:19 UTC
Compiles fine with ffmpeg-4.4.1
Comment 4 Kobboi 2022-02-28 18:46:47 UTC
Also compiles fine with ffmpeg-5.0 and USE=-ffmpeg. Which is what you would expect, but it never hurts to check :)
Comment 5 Larry the Git Cow gentoo-dev 2023-01-20 03:54:26 UTC
The bug has been closed via the following commit(s):

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

commit ff864f5fc9ea92617ffd9ce13352158250d9c512
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-20 03:32:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-20 03:54:12 +0000

    games-emulation/vbam: add 2.1.5
    
    Closes: https://bugs.gentoo.org/834377
    Signed-off-by: Sam James <sam@gentoo.org>

 games-emulation/vbam/Manifest          |   1 +
 games-emulation/vbam/vbam-2.1.5.ebuild | 110 +++++++++++++++++++++++++++++++++
 games-emulation/vbam/vbam-9999.ebuild  |  17 +++--
 3 files changed, 123 insertions(+), 5 deletions(-)