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

Bug 616004

Summary: media-libs/x264-0.0.20160712: not possible to build without altivec on PPC
Product: Gentoo Linux Reporter: Marcus Comstedt <marcus>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: PPC64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Proposed patch
Output from emerge --info
Complete build log

Description Marcus Comstedt 2017-04-19 11:42:10 UTC
I'm trying to build media-libs/x264 on a e5500 system, which does not have altivec.  However, the ebuild does not respect USE="-altivec".


Reproducible: Always

Steps to Reproduce:
1.Try to emerge media-libs/x264 on a PPC64 system with "-mcpu=e5500" in CFLAGS and "-altivec" in USE
2.
3.
Actual Results:  
Configure fails due to -mabi=altivec being enforced even though it is not supported.

Expected Results:  
The package is configured and built without altivec specific code (--no-asm).
Comment 1 Marcus Comstedt 2017-04-19 11:42:47 UTC
Created attachment 470380 [details, diff]
Proposed patch
Comment 2 Marcus Comstedt 2017-04-19 11:46:21 UTC
Created attachment 470382 [details]
Output from emerge --info
Comment 3 Alexis Ballier gentoo-dev 2017-04-23 12:46:59 UTC
do you have a build log ?


iirc x264 was using runtime cpu detection for altivec and building only altivec files with mabi=altivec which should work on any ppc
Comment 4 Marcus Comstedt 2017-04-23 14:16:59 UTC
Created attachment 470712 [details]
Complete build log

Sure, although it's not that fascinating.

The reason for "No working C compiler found." is that gcc gives the error
"error: AltiVec not supported in this target" due to the combination of
the flags "-mcpu=e5500" (from make.conf) and "-maltivec" (added by the
configure script unless "--disable-asm" is specified).
Comment 5 Alexis Ballier gentoo-dev 2017-04-23 14:23:53 UTC
Indeed, your patch seems correct, thanks!


commit 957db0b234d928bb48a8890f78b2bd6332ebc8f8
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Sun Apr 23 16:23:09 2017 +0200

    media-libs/x264: Add altivec useflag and disable ppc asm if not enabled, since ppc asm is what that means.
    
    Bug #616004.
    Patch by Marcus Comstedt