Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31212 - mjpegtools will not build with CFLAGS of -O3 -pipe -fomit-frame-pointer -fPIC
Summary: mjpegtools will not build with CFLAGS of -O3 -pipe -fomit-frame-pointer -fPIC
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-15 10:03 UTC by Alan
Modified: 2003-10-18 10:25 UTC (History)
1 user (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 Alan 2003-10-15 10:03:10 UTC
When building mjpegtools I had to set my CFLAGS from 
-O3 -pipe -fomit-frame-pointer -fPIC
to 
-O2 -pipe

to get it to build.  With the older CFLAGS it would error out with:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..    -mcpu=i686 -march=i686 -march=athlon-xp
-O3 -pipe -fomit-frame-pointer -fPIC -Wall -Wunused -c `test -f 'yuv4mpeg.c' ||
echo './'`yuv4mpeg.c
cpu_accel.c: In function `x86_accel':
cpu_accel.c:87: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:104: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:110: 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'
cpu_accel.c:136: can't find a register in class `BREG' while reloading `asm'
make[3]: *** [cpu_accel.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/var/tmp/portage/mjpegtools-1.6.1.90-r1/work/mjpegtools-1.6.1.90/utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/mjpegtools-1.6.1.90-r1/work/mjpegtools-1.6.1.90/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/mjpegtools-1.6.1.90-r1/work/mjpegtools-1.6.1.90'
make: *** [all] Error 2
 
!!! ERROR: media-video/mjpegtools-1.6.1.90-r1 failed.
!!! Function src_compile, Line 66, Exitcode 2
!!! compile problem

Not a huge deal, might have something connected to bug #30345 though.  Maybe if
this can be confirmed by others -O3 and other harsh CFLAGS should be stripped
out in the build?

GCC was version 3.2.3 (ebuild: 3.2.3-r2).
Hardware is Athlon XP2500+ with 1G ram and mostly new hardware so hardware
errors are unlikely (IMHO).

Reproducible: Always
Steps to Reproduce:
1. Set clags to noted above on an X86 stable system 
2. Build mjpegtools
3. Note failure.

Actual Results:  
Build failed with noted error message.

Expected Results:  
Build completes.
Comment 1 SpanKY gentoo-dev 2003-10-15 12:54:46 UTC
you really shouldnt put -fPIC in your CFLAGS ... you should let the packages
do it themselves ...

BREG asm errors are because the program doesnt support pic properly
Comment 2 Alan 2003-10-15 13:02:39 UTC
I was under the impression that -fPIC was required to be added to the CFLAGS
so that prelinking would work.
Comment 3 SpanKY gentoo-dev 2003-10-15 18:26:51 UTC
packages do pic support themselves, you shouldnt have to worry about it

for example, ive never put fPIC in my CFLAGS and everything on my system
that can be prelinked is (with the exception of a few packages that dont
support pic atm)
Comment 4 Martin Holzer (RETIRED) gentoo-dev 2003-10-18 10:25:19 UTC
wrong useage of -fPIC in CFLAGS (unsupported by gentoo)