Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834370

Summary: games-arcade/oshu-2.0.1 with ffmpeg-5.0: lib/audio/stream.cc:52:30: error: ‘avcodec_send_packet’ was not declared in this scope; did you mean ‘avcodec_get_name’?
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Haelwenn (lanodan) Monnier <contact>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/24499
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 17:25:57 UTC
[3/41] /usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1_build -I/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/include  -O2 -march=znver3 -pipe -g -ggdb3 -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/uuid -pthread -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -std=gnu++14 -MD -MT lib/CMakeFiles/liboshu.dir/audio/stream.cc.o -MF lib/CMakeFiles/liboshu.dir/audio/stream.cc.o.d -o lib/CMakeFiles/liboshu.dir/audio/stream.cc.o -c /var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc
FAILED: lib/CMakeFiles/liboshu.dir/audio/stream.cc.o 
/usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1_build -I/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/include  -O2 -march=znver3 -pipe -g -ggdb3 -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/uuid -pthread -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -std=gnu++14 -MD -MT lib/CMakeFiles/liboshu.dir/audio/stream.cc.o -MF lib/CMakeFiles/liboshu.dir/audio/stream.cc.o.d -o lib/CMakeFiles/liboshu.dir/audio/stream.cc.o -c /var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc: In function ‘int next_page(oshu::stream*)’:
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:52:30: error: ‘avcodec_send_packet’ was not declared in this scope; did you mean ‘avcodec_get_name’?
   52 |                         rc = avcodec_send_packet(stream->decoder, NULL);
      |                              ^~~~~~~~~~~~~~~~~~~
      |                              avcodec_get_name
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:58:30: error: ‘avcodec_send_packet’ was not declared in this scope; did you mean ‘avcodec_get_name’?
   58 |                         rc = avcodec_send_packet(stream->decoder, &packet);
      |                              ^~~~~~~~~~~~~~~~~~~
      |                              avcodec_get_name
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc: In function ‘int next_frame(oshu::stream*)’:
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:80:26: error: ‘avcodec_receive_frame’ was not declared in this scope; did you mean ‘avcodec_profile_name’?
   80 |                 int rc = avcodec_receive_frame(stream->decoder, stream->frame);
      |                          ^~~~~~~~~~~~~~~~~~~~~
      |                          avcodec_profile_name
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc: In function ‘int oshu::read_stream(oshu::stream*, float*, int)’:
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:151:75: error: invalid use of incomplete type ‘struct AVCodecContext’
  151 |                 stream->current_timestamp += (double) rc / stream->decoder->sample_rate;
      |                                                                           ^~
In file included from /var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:6:
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/include/audio/stream.h:14:8: note: forward declaration of ‘struct AVCodecContext’
   14 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
In file included from /var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:7:
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc: In function ‘void dump_stream_info(oshu::stream*)’:
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/lib/audio/stream.cc:165:67: error: invalid use of incomplete type ‘struct AVCodecContext’
  165 |         oshu_log_info("      Sample rate: %d Hz.", stream->decoder->sample_rate);
      |                                                                   ^~
/var/tmp/portage/games-arcade/oshu-2.0.1/work/oshu-2.0.1/include/core/log.h:57:74: note: in definition of macro ‘oshu_log_info’
   57 | #define oshu_log_info(...)     SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__)
      |                                                                          ^~~~~~~~~~~

Reproducible: Always
Comment 1 Kobboi 2022-02-28 17:26:16 UTC
Created attachment 766003 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 17:26:21 UTC
Created attachment 766004 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 17:26:48 UTC
Compiles fine with ffmpeg-4.4.1
Comment 4 Larry the Git Cow gentoo-dev 2022-05-26 06:36:36 UTC
The bug has been closed via the following commit(s):

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

commit 5673186acd87d77631b0b1b2ced9238491bedf18
Author:     Haelwenn (lanodan) Monnier <contact@hacktivis.me>
AuthorDate: 2022-03-11 21:38:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-05-26 06:36:33 +0000

    games-arcade/oshu: Version bump, 2.0.2
    
    Closes: https://bugs.gentoo.org/834370
    Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
    Closes: https://github.com/gentoo/gentoo/pull/24499
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 games-arcade/oshu/Manifest                         |  1 +
 .../oshu/files/oshu-2.0.2-ffmpeg4-compat.patch     | 16 ++++++
 games-arcade/oshu/oshu-2.0.2.ebuild                | 65 ++++++++++++++++++++++
 games-arcade/oshu/oshu-9999.ebuild                 | 18 ++++--
 4 files changed, 95 insertions(+), 5 deletions(-)