First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 16238
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Martin Holzer (RETIRED) <mholzer@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Bart Sekura <sekurb@yahoo.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 16238 depends on: Show dependency tree
Bug 16238 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-02-23 13:30 0000
When a user has CFLAGS optimizations for a specific architecture (e.g.
-fprefetch-loop-arrays) the mjpegtools ebuild still uses them in spite of the
fact that the build itself forces -march=i686. As a result, cc1 dies with error:
"-fprefetch-loop-arrays is invalid for specified architecture".
The ebuild needs to filter these out or something.

------- Comment #1 From Bart Sekura 2003-02-23 13:33:36 0000 -------
mjpegtools 1.6.0-r7

------- Comment #2 From Seemant Kulleen (RETIRED) 2003-02-23 17:51:29 0000 -------
can you paste/attach the entire log and also emerge info?

------- Comment #3 From Bart Sekura 2003-02-24 05:42:12 0000 -------
it's very easy to recreate: if you have a p4 box handy, add -march=pentium4
-fpretech-loop-arrays to your CFLAGS (or any other p4 specific optimization
flag) and try emerging mjpegtools; Since mjpegtools replaces -march=pentium4
with -march=i686 the compiler dies coz -fprefetch-loop-arrays is invalid with
-march=i686; my workaround was to temporarily remove flags that cause trouble
from CFLAGs just to emerge mjpegtools successfuly, then revert back to normal;

I'll try to recreate this for you and paste some additional info.

------- Comment #4 From phoen][x 2003-04-06 05:13:08 0000 -------
That would come in handy - i dont have a p4 box lying around.

Sounds 'filter-flags -fprefetch-loop-arrays' reasonable to you?

-phoen][x-

------- Comment #5 From Martin Holzer (RETIRED) 2003-04-06 07:08:30 0000 -------
but i have

let's see if it fails for me too

------- Comment #6 From Bart Sekura 2003-04-07 11:46:02 0000 -------
just recently I did emerge gnome and mjpegtools failed as well, with
-fprefetch-loop-arrays included in my CFLAGS; filtering these out will do the
trick (or not forcing i686) ...

------- Comment #7 From Martin Holzer (RETIRED) 2003-04-07 14:07:01 0000 -------
prints out a lot of warning messages 
cc1: warning: -fprefetch-loop-arrays not supported for this target (try -march switches)

fails here too

Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20-gentoo-r2 i686
GENTOO_MIRRORS="http://localhost/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm arts avi crypt cups encode gif java jpeg kde gnome libg++ libwww mikmod mmx motif mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline svga X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis gtk qt opengl"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -ffast-math -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr"
CXXFLAGS="-march=pentium4 -O3 -pipe -ffast-math -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://localhost/gentoo-portage"
FEATURES="sandbox buildpkg ccache"

------- Comment #8 From Hemal Kikawala 2003-04-08 20:11:19 0000 -------
-fPIC in CFLAGS also borks the compile 

------- Comment #9 From Martin Holzer (RETIRED) 2003-04-09 13:44:28 0000 -------
comment #8 is invalid

this could only be a USE flag, not a CFLAGS

------- Comment #10 From Dave Habben 2003-04-25 21:38:54 0000 -------
I can confirm that -fPIC breaks the compile for mjpegtools-1.6.0-r7

With the following settings it errors out:
CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer -fPIC"

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..    -mcpu=i686 -march=i686 -mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer -fPIC -Wall -Wunused -c `test -f cpu_accel.c || echo './'`cpu_accel.c
cpu_accel.c: In function `x86_accel':
cpu_accel.c:83: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:100: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:106: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:128: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:132: can't find a register in class `BREG' while reloading `asm'
make[2]: *** [cpu_accel.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.0-r7/work/mjpegtools-1.6.0/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.0-r7/work/mjpegtools-1.6.0'
make: *** [all] Error 2
 
!!! ERROR: media-video/mjpegtools-1.6.0-r7 failed.
!!! Function src_compile, Line 105, Exitcode 2

When I change it to:
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"

this ebuild builds successfully

------- Comment #11 From Martin Holzer (RETIRED) 2003-04-29 17:09:03 0000 -------
added   filter-flags "-fprefetch-loop-arrays"

First Last Prev Next    No search results available      Search page      Enter new bug