Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394241 - media-libs/xvid - on ppc g3 hardware use flag -altivec is not honored
Summary: media-libs/xvid - on ppc g3 hardware use flag -altivec is not honored
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 13:31 UTC by Axel Scheepers
Modified: 2013-06-29 13:31 UTC (History)
0 users

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 Axel Scheepers 2011-12-10 13:31:51 UTC
When I try to emerge mplayer on a g3 ibook xvid compile halts due to lack of altivec. This is because the configure script checks for /usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/include/altivec.h instead of honoring the use flag. I noticed this since my cflags is;
CFLAGS="-mpowerpc-gfxopt -mstring -mmultiple -mno-altivec -mcpu=750 -mtune=750 -Os -pipe"

I use -Os instead of -O2 since this processor has a very small cache. So when xvid started to compile it clashed with -mno-altivec. To make everything work ok I did a for f in $(locate altivec.h); do mv "$f" "$f".dontwant; done
axel@ibook:pkg$ locate altivec.h                                               
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.3/include/altivec.h.dontwant
/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.2/include/altivec.h.dontwant

Now emerging mplayer works.
axel@ibook:pkg$ ls -d */* | grep -E 'mplayer|xvid'
media-libs/xvid-1.3.2/
media-video/mplayer-1.0_rc4_p20110322-r1/

 

Reproducible: Always

Steps to Reproduce:
1. emerge mplayer on hardware w/o altivec with USE="-altivec"

Actual Results:  
either compiler error when using -mno-altivec in cflags or, but i've not confirmed this, it will compile but crash on runtime with illegal instruction.

Expected Results:  
the ebuild for xvid (and maybe others) should make -altivec work or the configure script should check for actual existence of altivec by compiling and running a program (better I think).

axel@ibook:pkg$ cat /etc/gentoo-release                                        
Gentoo Base System release 2.0.3
axel@ibook:pkg$ cat /proc/cpuinfo                                              
processor       : 0
cpu             : 745/755
temperature     : 5 C (uncalibrated)
clock           : 600.000000MHz
revision        : 51.17 (pvr 0008 3311)
bogomips        : 49.92

total bogomips  : 49.92
timebase        : 24960000
platform        : PowerMac
model           : PowerBook4,1
machine         : PowerBook4,1
motherboard     : PowerBook4,1 MacRISC2 MacRISC Power Macintosh
detected as     : 257 (iBook 2)
pmac flags      : 0000001b
L2 cache        : 256K unified
pmac-generation : NewWorld
Memory          : 384 MB
Comment 1 Axel Scheepers 2011-12-10 13:44:40 UTC
Portage 2.1.10.11 (unavailable, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3 ppc)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-ppc-745-755-with-gentoo-2.0.3
Timestamp of tree: Unknown
ccache version 2.4 [enabled]
dev-lang/python:          2.7.1-r1::gentoo, 3.1.3-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.68::gentoo
sys-devel/automake:       1.11.1::gentoo
sys-devel/binutils:       2.20.1-r1::gentoo
sys-devel/libtool:        2.4-r1::gentoo
sys-kernel/linux-headers: 2.6.36.1::gentoo (virtual/os-headers)
Repositories: x-portage
ACCEPT_LICENSE="* -@EULA"
CFLAGS="-mpowerpc-gfxopt -mstring -mmultiple -mno-altivec -mcpu=750 -mtune=750 -Os -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mpowerpc-gfxopt -mstring -mmultiple -mno-altivec -mcpu=750 -mtune=750 -Os -pipe"
DISTDIR="/var/tmp/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://gentoo.tiscali.nl/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="imap smtp"
Unset:  ACCEPT_KEYWORDS, EMERGE_DEFAULT_OPTS, PORTAGE_BUNZIP2_COMMAND
Comment 2 Michael Wilcox 2013-06-29 13:31:35 UTC
xvid-1.3.2-r1 emerges on my G3 with

use ppc && has -Os ${CFLAGS} && filter-flags -Os && append-cflags -O2

added to multilib_src_configure().