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

Bug 834384

Summary: media-libs/libquicktime-1.2.4-r3 with ffmpeg-5.0: plugins/ffmpeg/params.c:129:17: error: ‘FF_PRED_LEFT’ undeclared here (not in a function)
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal CC: alexey_gentoo, andrius, ironmikkl, mgorny, pacho, stevee
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.debian.org/1004637
Whiteboard: Workaround dep applied; could mask USE=ffmpeg
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 19:39:30 UTC
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg -I../.. -I/var/tmp/portage/media-
libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/include -I../../include -DLOCALE_DIR=\"/usr/share/locale\" -O2 -march=znver3 -pipe -g -ggdb3 -finline-functions -Wall -Winline -Wmissing
-declarations -Wdeclaration-after-statement -fvisibility=hidden -c /var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/params.c  -fPIC -DPIC -o .libs/
params.o
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/params.c:129:17: error: ‘FF_PRED_LEFT’ undeclared here (not in a function)
  129 |     { "Left",   FF_PRED_LEFT },
      |                 ^~~~~~~~~~~~
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/audio.c: In function ‘decode_chunk_vbr’:
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/audio.c:551:19: warning: implicit declaration of function ‘avcodec_decode_audio4’; did you mean ‘avcodec_decode_subtitle2’? [-Wimplicit-function-declaration]
  551 |     frame_bytes = avcodec_decode_audio4(codec->avctx, &f,
      |                   ^~~~~~~~~~~~~~~~~~~~~
      |                   avcodec_decode_subtitle2
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/video.c: In function ‘lqt_ffmpeg_decode_video’:
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/params.c:130:17: error: ‘FF_PRED_PLANE’ undeclared here (not in a function)
  130 |     { "Plane",  FF_PRED_PLANE },
      |                 ^~~~~~~~~~~~~
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/video.c:881:10: warning: implicit declaration of function ‘avcodec_decode_video2’; did you mean ‘avcodec_decode_subtitle2’? [-Wimplicit-function-declaration]
  881 |       if(avcodec_decode_video2(codec->avctx,
      |          ^~~~~~~~~~~~~~~~~~~~~
      |          avcodec_decode_subtitle2
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/video.c: In function ‘init_imx_encoder’:
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/video.c:1142:15: error: ‘AVCodecContext’ has no member named ‘rtp_payload_size’
 1142 |   codec->avctx->rtp_payload_size = 1; // ??
      |               ^~
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/audio.c: In function ‘lqt_ffmpeg_encode_audio’:
/var/tmp/portage/media-libs/libquicktime-1.2.4-r3/work/libquicktime-1.2.4/plugins/ffmpeg/audio.c:1265:5: warning: ‘av_init_packet’ is deprecated [-Wdeprecated-declarations]
 1265 |     av_init_packet(&pkt);
      |     ^~~~~~~~~~~~~~


Reproducible: Always
Comment 1 Kobboi 2022-02-28 19:39:51 UTC
Created attachment 766031 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 19:39:53 UTC
Created attachment 766032 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 19:42:30 UTC
Compiles fine with 
* USE=ffmpeg and ffmpeg-4.4.1
* USE=-ffmpeg and ffmpeg-5.0
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-28 12:40:52 UTC
Ping
Comment 5 Larry the Git Cow gentoo-dev 2023-02-15 06:23:26 UTC
The bug has been referenced in the following commit(s):

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

commit b7a2468b9b5dd390adca7c241ed4e85ec4c634e9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-15 06:18:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-15 06:18:23 +0000

    media-libs/libquicktime: depend on <ffmpeg-5
    
    Bug: https://bugs.gentoo.org/834384
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libquicktime/libquicktime-1.2.4-r4.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 6 Alexey Chernyak 2023-02-20 00:24:20 UTC
Might be better to use the upstream patch to disable ffmpeg instead of creating blockers and having to customise USE flags to build it?

https://sourceforge.net/p/libquicktime/git/ci/974ad1489bb1d7d1ebc94f301508702f8ac2083b/
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-20 02:51:12 UTC
(In reply to Alexey Chernyak from comment #6)
> Might be better to use the upstream patch to disable ffmpeg instead of
> creating blockers and having to customise USE flags to build it?
> 
> https://sourceforge.net/p/libquicktime/git/ci/
> 974ad1489bb1d7d1ebc94f301508702f8ac2083b/

The upstream patch literally adds a version cap and nothing else.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-20 02:55:00 UTC
I.e. per the whiteboard, we're happy to consider masking or removing the USE flag entirely, based on feedback/suggestions on whether the functionality is useful.

ffmpeg is still masked and this is just prep work for unmasking it. Using the upstream patch would still mean you need to either add a "blocker" (version limit, not a blocker) and/or make the decision to mask or remove ffmpeg support entirely. So far, nobody has told us how useful it is in this package, and I have no idea. There's a bunch of these with dead upstreams and no active maintainer.

So, if you'd like to give practical feedback on how the software is likely typically used, please do, but it's not as simple as "well just just ffmpeg from everything". The time to then remove stuff more drastically usually comes later in the absence of feedback.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-24 16:54:18 UTC
I suppose no treecleaning is necessary here.
Comment 10 Alexey Chernyak 2023-06-05 03:05:13 UTC
Ebuild needs the following changes:
1. Change RDEPEND <ffmpeg-5 restriction to >ffmpeg-3.5
2. Move application of ffmpeg4 patch from src_prepare() to PATCHES=
3. Add ffmpeg5 patch from Arch Linux: https://aur.archlinux.org/packages/libquicktime

Note: ffmpeg5 patch depends on prior application of ffmeg4 patch. For some reason src_prepare() had inconsistent behaviour for me:
* It applied ffmpeg4 patch when there were no user patches.
* It didn't apply ffmpeg4 patch when I tried to apply ffmpeg5 as a User patch.

The above approach tested and built fine against ffmpeg-6.
Haven't tested against ffmpeg-4 and ffmpeg-5.

Also the following minor issues might need attention:

1. Fix portage permissions of libquicktime-1.2.4-implicit-func-decl.patch file
2. ffmpeg29 and ffmpeg4 patches apply with slight fuzz on plugins/ffmpeg/video.c
Comment 11 Mikkl 2024-01-14 12:48:31 UTC
(In reply to Alexey Chernyak from comment #10)
> Ebuild needs the following changes:
> 1. Change RDEPEND <ffmpeg-5 restriction to >ffmpeg-3.5
> 2. Move application of ffmpeg4 patch from src_prepare() to PATCHES=
> 3. Add ffmpeg5 patch from Arch Linux:
> https://aur.archlinux.org/packages/libquicktime
> 
> Note: ffmpeg5 patch depends on prior application of ffmeg4 patch. For some
> reason src_prepare() had inconsistent behaviour for me:
> * It applied ffmpeg4 patch when there were no user patches.
> * It didn't apply ffmpeg4 patch when I tried to apply ffmpeg5 as a User
> patch.
> 
> The above approach tested and built fine against ffmpeg-6.
> Haven't tested against ffmpeg-4 and ffmpeg-5.
> 
> Also the following minor issues might need attention:
> 
> 1. Fix portage permissions of libquicktime-1.2.4-implicit-func-decl.patch
> file
> 2. ffmpeg29 and ffmpeg4 patches apply with slight fuzz on
> plugins/ffmpeg/video.c

Works fine for me with ffmpeg-6.1.1!
Comment 12 Larry the Git Cow gentoo-dev 2024-05-18 10:28:18 UTC
The bug has been closed via the following commit(s):

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

commit 18fa34358d5e58bd9c6a59b66602bd4ee329a70f
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2024-05-18 10:26:05 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2024-05-18 10:28:10 +0000

    media-libs/libquicktime: Apply fixes from Arch
    
    Adds compatibility with newer ffmpeg versions, faad2 fixes and fix codecs
    via patch instead of sedding.
    
    Closes: https://bugs.gentoo.org/834384
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 .../files/libquicktime-1.2.4-faad2.patch           |  86 +++
 .../files/libquicktime-1.2.4-ffmpeg-codecs.patch   | 651 +++++++++++++++++++++
 .../files/libquicktime-1.2.4-ffmpeg5.patch         | 342 +++++++++++
 .../libquicktime/libquicktime-1.2.4-r5.ebuild      | 124 ++++
 4 files changed, 1203 insertions(+)