Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593460 - media-video/vlc-2.2.4 fails to compile against >=media-video/libav-11.7
Summary: media-video/vlc-2.2.4 fails to compile against >=media-video/libav-11.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Nick Andrade
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords:
: 603846 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-10 20:41 UTC by James Ausmus
Modified: 2016-12-27 19:30 UTC (History)
11 users (show)

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


Attachments
vlc-2.2.4-fix-libav-compile.patch (vlc-2.2.4-fix-libav-compile.patch,290 bytes, patch)
2016-09-10 21:02 UTC, James Ausmus
Details | Diff
vlc-2.2.4-r1.ebuild (vlc-2.2.4-r1.ebuild,15.38 KB, text/plain)
2016-09-10 21:03 UTC, James Ausmus
Details
Ebuild Patch (vlc-2.2.4-ebuild-r1.patch,382 bytes, patch)
2016-12-07 04:19 UTC, David Turner
Details | Diff
Updated vlc-2.2.4-r1.ebuild as of 20161207 (vlc-2.2.4-r1.ebuild,15.41 KB, text/plain)
2016-12-07 04:21 UTC, David Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Ausmus 2016-09-10 20:41:59 UTC
Compile fails on modules/codec/avcodec/audio.c with several error messages similar to:

codec/avcodec/audio.c:485:7: error: ‘AV_CH_FRONT_LEFT’ undeclared here (not in a function)
     { AV_CH_FRONT_LEFT,        AOUT_CHAN_LEFT },

Reproducible: Always

Steps to Reproduce:
1. emerge =media-video/libav-11.7
2. emerge =media-video/vlc-2.2.4
3.



Missing definition is in /usr/include/libavutil/channel_layout.h
Comment 1 James Ausmus 2016-09-10 21:02:21 UTC
Created attachment 445420 [details, diff]
vlc-2.2.4-fix-libav-compile.patch

Patch to include the proper header
Comment 2 James Ausmus 2016-09-10 21:03:10 UTC
Created attachment 445422 [details]
vlc-2.2.4-r1.ebuild

ebuild to use the patch
Comment 3 Andrew Redd 2016-09-20 17:40:19 UTC
This showed up for me when I turned on the v4l use flag.  which might be needed to get this bug to appear.
Comment 4 Peter Levine 2016-09-21 06:01:18 UTC
(In reply to James Ausmus from comment #1)
> Created attachment 445420 [details, diff] [details, diff]
> vlc-2.2.4-fix-libav-compile.patch
> 
> Patch to include the proper header

Patch works for me.
Comment 5 Andrew 2016-10-08 08:03:00 UTC
(In reply to James Ausmus from comment #1)
> Created attachment 445420 [details, diff] [details, diff]
> vlc-2.2.4-fix-libav-compile.patch
> 
> Patch to include the proper header

The patch worked for me as well.
Comment 6 Gef 2016-10-09 14:06:02 UTC
Proposed patch works for me too with media-libs/libav-11.7 and media-video/vlc-2.2.4. Though it should probably be checked against older libav versions.
Comment 7 AngeloGioacchino Del Regno 2016-11-16 11:47:58 UTC
Works with the new ebuild+patch.
Comment 8 Zhu Sha Zang 2016-12-04 17:03:25 UTC
Hey, when this ebuild will be placed in portage tree?

Best regards
Comment 9 quazgar 2016-12-06 07:38:40 UTC
I can confirm this bug.
Comment 10 Michal Špondr 2016-12-06 17:05:54 UTC
I have the same problem. It's December and the patch is available here since September...?
Comment 11 Jack 2016-12-06 19:43:59 UTC
Problem still present with libav 11.8.  The provided patch and ebuild work for me.
Comment 12 David Turner 2016-12-07 04:18:23 UTC
Had the same problem with vlc-2.2.4 and libav-11.8. v4l use flag enabled.

Attached patch fixed this. However, the attached ebuild is outdated compared to the vlc-2.2.4.ebuild in tree which has been updated.

Will attach an updated ebuild and a ebuild diff to allow future patching of the ebuild to include the vlc-2.2.4-fix-libav-compile.patch file.
Comment 13 David Turner 2016-12-07 04:19:36 UTC
Created attachment 455310 [details, diff]
Ebuild Patch
Comment 14 David Turner 2016-12-07 04:21:08 UTC
Created attachment 455312 [details]
Updated vlc-2.2.4-r1.ebuild as of 20161207
Comment 15 Brian Evans (RETIRED) gentoo-dev 2016-12-08 04:36:13 UTC
I can confirm this bug.

Patch seems to fix it but might want to make it universal instead of conditional by an #ifdef if possible.
Comment 16 Michael 'veremitz' Everitt 2016-12-08 09:23:53 UTC
(In reply to Brian Evans from comment #15)
> I can confirm this bug.
> 
> Patch seems to fix it but might want to make it universal instead of
> conditional by an #ifdef if possible.

I think the issue remains as a result of the ffmpeg/libav fork, and an API change has occurred, which is why the additional header is required (or one implementation includes the functions whilst the other doesn't). It also only seems to manifest when both the 'v4l' and 'libav' flags are used in combination (presumably 'v4l' pulls some function that is contentious between the two implementations). The patch doesn't currently reflect this, but could be easily tweaked to do so.
Comment 17 Brian Evans (RETIRED) gentoo-dev 2016-12-08 13:30:51 UTC
(In reply to Michael Everitt (IRC: veremit) from comment #16)
> (In reply to Brian Evans from comment #15)
> > I can confirm this bug.
> > 
> > Patch seems to fix it but might want to make it universal instead of
> > conditional by an #ifdef if possible.
> 
> I think the issue remains as a result of the ffmpeg/libav fork, and an API
> change has occurred, which is why the additional header is required (or one
> implementation includes the functions whilst the other doesn't). It also
> only seems to manifest when both the 'v4l' and 'libav' flags are used in
> combination (presumably 'v4l' pulls some function that is contentious
> between the two implementations). The patch doesn't currently reflect this,
> but could be easily tweaked to do so.

The v4l USE flag is not a concern.  I had it off on both libav and vlc and still hit this error.
Comment 18 Michael 'veremitz' Everitt 2016-12-21 03:40:57 UTC
I believe this has been fixed in https://github.com/gentoo/gentoo/commit/5b56b99eeb7c29df23e317f9f3627ac7aa2eeb18 from PR#3122 mentioned above.
Comment 19 Andreas Sturmlechner gentoo-dev 2016-12-21 18:40:28 UTC
Thanks, fixed in 2.2.4-r1 (commit 7e29d89c6ffa1ba14c1364c1dc92dcc2f7b9e262).
Comment 20 Andreas Sturmlechner gentoo-dev 2016-12-27 19:30:37 UTC
*** Bug 603846 has been marked as a duplicate of this bug. ***