Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834422 - sci-libs/opencascade-7.6.0-r2 with ffmpeg-5.0: src/Media/Media_FormatContext.cxx:413:25: error: ‘const AVStream’ {aka ‘const struct AVStream’} has no member named ‘codec’
Summary: sci-libs/opencascade-7.6.0-r2 with ffmpeg-5.0: src/Media/Media_FormatContext....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL: https://dev.opencascade.org/content/b...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: ffmpeg-5.0
  Show dependency tree
 
Reported: 2022-02-28 21:38 UTC by Kobboi
Modified: 2022-03-16 22:51 UTC (History)
1 user (show)

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


Attachments
build.log.gz (build.log.gz,83.01 KB, application/gzip)
2022-02-28 21:38 UTC, Kobboi
Details
emerge-info.txt (emerge-info.txt,8.00 KB, text/plain)
2022-02-28 21:38 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 21:38:07 UTC
[2287/5853] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_GLES2_EXT -DHAVE_OPENGL_EXT -DHAVE_TK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DTKService_EXPORTS -I/usr/include/freetype2 -I/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0_build/include/opencascade  -std=c++0x -O2 -march=znver3 -pipe -g -ggdb3 -fexceptio
ns -fPIC -Wall -Wextra -fPIC -MD -MT src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o -MF src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o.d -o src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o -c /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Me
dia_FormatContext.cxx
FAILED: src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_GLES2_EXT -DHAVE_OPENGL_EXT -DHAVE_TK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DTKService_EXPORTS -I/usr/include/freetype2 -I/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0_build/include/opencascade  -std=c++0x -O2 -march=znver3 -pipe -g -ggdb3 -fexceptions -fPIC -Wa
ll -Wextra -fPIC -MD -MT src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o -MF src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o.d -o src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o -c /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatCo
ntext.cxx
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx: In member function ‘TCollection_AsciiString Media_FormatContext::StreamInfo(unsigned int, AVCodecContext*) const’:
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:413:25: error: ‘const AVStream’ {aka ‘const struct AVStream’} has no member named ‘codec’
  413 |     aCodecCtx = aStream.codec;
      |                         ^~~~~
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:418:3: error: ‘avcodec_string’ was not declared in this scope; did you mean ‘av_codec_iterate’?
  418 |   avcodec_string (aFrmtBuff, sizeof(aFrmtBuff), aCodecCtx, 0);
      |   ^~~~~~~~~~~~~~
      |   av_codec_iterate
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:446:18: error: invalid use of incomplete type ‘struct AVCodecContext’
  446 |     if (aCodecCtx->time_base.den != 0 && aCodecCtx->time_base.num != 0)
      |                  ^~
In file included from /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0_build/include/opencascade/Media_FormatContext.hxx:1,
                 from /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:20:
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.hxx:22:8: note: forward declaration of ‘struct AVCodecContext’
   22 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:446:51: error: invalid use of incomplete type ‘struct AVCodecContext’
  446 |     if (aCodecCtx->time_base.den != 0 && aCodecCtx->time_base.num != 0)
      |                                                   ^~
In file included from /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0_build/include/opencascade/Media_FormatContext.hxx:1,
                 from /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:20:
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.hxx:22:8: note: forward declaration of ‘struct AVCodecContext’
   22 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:448:85: error: invalid use of incomplete type ‘struct AVCodecContext’
  448 |       aStreamInfo += TCollection_AsciiString(", ") + formatFps(1 / av_q2d (aCodecCtx->time_base)) + " tbc";
      |                                                                                     ^~
In file included from /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0_build/include/opencascade/Media_FormatContext.hxx:1,
                 from /var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:20:
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.hxx:22:8: note: forward declaration of ‘struct AVCodecContext’
   22 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx: In member function ‘bool Media_FormatContext::SeekStream(unsigned int, double, bool)’:
/var/tmp/portage/sci-libs/opencascade-7.6.0-r2/work/occt-V7_6_0/src/Media/Media_FormatContext.cxx:502:79: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘cur_dts’
  502 |   for (int aTries = 10; isSeekDone && theToSeekBack && aTries > 0 && (aStream.cur_dts > aSeekTarget); --aTries)
      |                                                                               ^~~~~~~


Reproducible: Always
Comment 1 Kobboi 2022-02-28 21:38:24 UTC
Created attachment 766099 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 21:38:25 UTC
Created attachment 766100 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 21:47:57 UTC
Compiles fine with
* USE=ffmpeg and ffmpeg-4.4.1
* USE=-ffmpeg and ffmpeg-5.0
Comment 4 Bernd 2022-03-01 06:13:16 UTC
Thanks for the report. I'm gonna check, if 7.6.1 is working with ffmpeg-5 or else report upstream.
Comment 5 Bernd 2022-03-13 09:16:25 UTC
The issue also shows up in 7.6.1.
Reported upstream, see https://dev.opencascade.org/content/build-error-when-compiling-against-ffmpeg-5
Comment 6 Larry the Git Cow gentoo-dev 2022-03-16 22:51:15 UTC
The bug has been closed via the following commit(s):

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

commit 088d1cd3dd668d0460b42632306fc612e13422e2
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2022-03-13 09:47:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-16 22:51:01 +0000

    sci-libs/opencascade: backport fixes from v7.6.1
    
    Package is not yet compatible with ffmpeg-5, so we restrict to
    <media-video/ffmpeg-5. Reported upstream.
    Not compatible with musl libc implementation, so we explicitly
    DEPEND on sys-libs/glibc.
    
    Closes: https://bugs.gentoo.org/832742
    Closes: https://bugs.gentoo.org/834422
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/24525
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{opencascade-7.6.0-r2.ebuild => opencascade-7.6.0-r3.ebuild}      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

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

commit 5e6ca21c0846fea81d72cb8267b2ef2f66a5a755
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2022-03-13 09:42:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-16 22:50:59 +0000

    sci-libs/opencascade: bump to 7.6.1
    
    Package is not yet compatible with ffmpeg-5, so we restrict to
    <media-video/ffmpeg-5. Reported upstream.
    Not compatible with musl libc implementation, so we explicitly
    DEPEND on sys-libs/glibc.
    
    Closes: https://bugs.gentoo.org/835040
    Bug: https://bugs.gentoo.org/832742
    Bug: https://bugs.gentoo.org/834422
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/opencascade/Manifest                 |   1 +
 sci-libs/opencascade/opencascade-7.6.1.ebuild | 169 ++++++++++++++++++++++++++
 2 files changed, 170 insertions(+)