Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671746 - media-video/ffmpeg-3.4.5 fails to compile for 32bit with frame pointers
Summary: media-video/ffmpeg-3.4.5 fails to compile for 32bit with frame pointers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-23 11:45 UTC by Mart Raudsepp
Modified: 2018-11-27 11:54 UTC (History)
0 users

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


Attachments
build.log (build.log,921.93 KB, text/x-log)
2018-11-27 11:29 UTC, Mart Raudsepp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2018-11-23 11:45:02 UTC
ffmpeg-3.4.5 (have yet to get to ffmpeg4, so maybe that too) fails to build with -fno-omit-frame-pointer in CFLAGS. I have that there to properly support sample based profiling with sysprof and similar.

In file included from src/libavcodec/cabac_functions.h:46,
                 from src/libavcodec/h264_cabac.c:37:
src/libavcodec/cabac_functions.h: In function ‘get_cabac_noinline’:
src/libavcodec/x86/cabac.h:192:5: error: ‘asm’ operand has impossible constraints
     __asm__ volatile(
     ^~~~~~~

Build passes if I remove -fno-omit-frame-pointer - but I don't think that should be necessary, nor that this should be fixed via filtering that flag out; the build (and asm) should really work with frame pointers usage, too.


Additionally there's a configure warning (unrelated to this):
WARNING: Option --disable-outdev=sdl did not match anything
Comment 1 Mart Raudsepp gentoo-dev 2018-11-25 22:40:48 UTC
Looks like at least ffmpeg-4.0.3 was fine with -fno-omit-frame-pointer in CFLAGS, albeit not sure yet if it overrode it or is properly effective.
Comment 2 Carl Eugen Hoyos 2018-11-26 01:24:09 UTC
I believe this is a duplicate of #578802, an analysis is in https://bugs.gentoo.org/show_bug.cgi?id=645778#c5
Comment 3 Alexis Ballier gentoo-dev 2018-11-27 11:13:44 UTC
build & config.log are missing here

it's likely you do not have the 7 registers required for this function but somehow the configure check passes and enables this code
Comment 4 Mart Raudsepp gentoo-dev 2018-11-27 11:29:59 UTC
Created attachment 556448 [details]
build.log
Comment 5 Mart Raudsepp gentoo-dev 2018-11-27 11:30:57 UTC
32bit build of multilib amd64 build is what fails..
Comment 6 Mart Raudsepp gentoo-dev 2018-11-27 11:33:44 UTC
4.0.3 fails the same way if built with ABI_X86="32 64"
Comment 7 Larry the Git Cow gentoo-dev 2018-11-27 11:54:55 UTC
The bug has been closed via the following commit(s):

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

commit 6a2691a2bb66bd0497e458b0a00414507e8e99c0
Author:     Alexis Ballier <aballier@gentoo.org>
AuthorDate: 2018-11-27 11:54:32 +0000
Commit:     Alexis Ballier <aballier@gentoo.org>
CommitDate: 2018-11-27 11:54:42 +0000

    media-video/ffmpeg: Pass disable optimization to configure.
    
    This is only useful for hardcoded CFLAGS. We use optflags that override them anyway. However, some configure checks run with fomit-frame-pointer when this is enabled.
    This lures the build system it has enough registers to build some inline asm on x86 and then causes build failures.
    
    Closes: https://bugs.gentoo.org/671746
    Closes: https://bugs.gentoo.org/645778
    Package-Manager: Portage-2.3.51, Repoman-2.3.12
    RepoMan-Options: --force
    Signed-off-by: Alexis Ballier <aballier@gentoo.org>

 media-video/ffmpeg/ffmpeg-4.1.ebuild  | 4 ++++
 media-video/ffmpeg/ffmpeg-9999.ebuild | 4 ++++
 2 files changed, 8 insertions(+)