Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711448 - media-video/ffmpeg-4.2.2: unable to override automatic configure flags
Summary: media-video/ffmpeg-4.2.2: unable to override automatic configure flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-03 19:05 UTC by David Michael
Modified: 2020-07-02 12:50 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-03-03 19:05:27 UTC
The ffmpeg configure script does not use the regular econf setup.  It initializes an array of arguments starting with $EXTRA_FFMPEG_CONF, but then automatically determined options are appended after that.  This prevents those options from being overridden without rewriting the ebuild's configure function.  The $EXTRA_FFMPEG_CONF should be at the end of the configure command-line.

Reproducible: Always

Steps to Reproduce:
1. Run "EXTRA_FFMPEG_CONF=... emerge ffmpeg" to change some option that is set automatically.

Actual Results:  
The specified options have no effect.

Expected Results:  
User-provided options should be given the highest priority.

I hit the problem by cross-compiling for a new triplet that is just optimized for the current system's native CPU.  The ebuild checks CFLAGS and sets --cpu=host for the configure script.  The script rejects the host CPU when it detects it's cross-compiling.  That is an upstream problem, but I am unable to work around it by setting a target CPU since the custom --cpu= argument is ignored.
Comment 1 David Michael 2020-04-03 00:33:45 UTC
I'm willing to close this bug when this commit is in a release or backported, since it was the original issue that prompted this in the first place:
https://github.com/FFmpeg/FFmpeg/commit/9f567c431eb49e5cd4399f54de433422f5b9b9c4
Comment 2 David Michael 2020-06-18 14:17:44 UTC
Well, this bug is still an issue, but I've corrected the underlying problem that prompted it upstream in 4.3.  I'm just going to close this since there is apparently no interest or ability to fix it.
Comment 3 Alexis Ballier gentoo-dev 2020-06-18 14:51:43 UTC
(In reply to David Michael from comment #2)
> Well, this bug is still an issue, but I've corrected the underlying problem
> that prompted it upstream in 4.3.  I'm just going to close this since there
> is apparently no interest or ability to fix it.

missed this one; will be fixed soon since the point of EXTRA_FFMPEG_CONF is to override settings...
Comment 4 Larry the Git Cow gentoo-dev 2020-07-02 12:50:03 UTC
The bug has been closed via the following commit(s):

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

commit fe9d90fdbb4a0836fbfff32f596449337b484cd5
Author:     Alexis Ballier <aballier@gentoo.org>
AuthorDate: 2020-06-18 15:12:21 +0000
Commit:     Alexis Ballier <aballier@gentoo.org>
CommitDate: 2020-07-02 12:49:33 +0000

    media-video/ffmpeg: Move EXTRA_FFMPEG_CONF last to the configure call
    
    Otherwise we cant override ebuild-fed options.
    
    Closes: https://bugs.gentoo.org/711448
    Package-Manager: Portage-2.3.101, Repoman-2.3.22
    Signed-off-by: Alexis Ballier <aballier@gentoo.org>

 media-video/ffmpeg/ffmpeg-4.3.ebuild  | 5 +++--
 media-video/ffmpeg/ffmpeg-9999.ebuild | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)