Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43964 - Compile of mplayer/xine/gimp with gcc 3.3.3 all fails with: can't find a register in class `BREG' while reloading `asm'
Summary: Compile of mplayer/xine/gimp with gcc 3.3.3 all fails with: can't find a regi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-07 09:29 UTC by Henrik Farre
Modified: 2004-04-18 23:09 UTC (History)
2 users (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 Henrik Farre 2004-03-07 09:29:58 UTC
Compiling of mplayer 0.92/1.0_pre* , xine-lib-* and gimp-2.0_pre3-r1 fails with: can't find a register in class `BREG' while reloading `asm'

This is the errors (xine is missing, sry):

Mplayer: 

gcc -O4 -march=athlon-tbird -mcpu=athlon-tbird -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o msmpeg4.o msmpeg4.c 
msmpeg4.c: I funktionen 'msmpeg4_pred_dc': 
msmpeg4.c:734: error: can't find a register in class `BREG' while reloading `asm' 
distcc[7105] ERROR: compile on localhost failed 
make[1]: *** [msmpeg4.o] Fejl 1 
make[1]: Leaving directory `/var/tmp/portage/mplayer-1.0_pre3/work/MPlayer-1.0pre3/libavcodec' 
make: *** [libavcodec/libavcodec.a] Fejl 2 

!!! ERROR: media-video/mplayer-1.0_pre3 failed. 
!!! Function src_compile, Line 307, Exitcode 2 
!!! Failed to build MPlayer!

The Gimp:

cpu-accel.c: I funktionen 'cpu_accel': 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:236: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:241: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:270: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:275: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Base\"  -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -g -march=athlon-tbird -O3 -mmmx -m3dnow -pipe  -falign-functions=4 -ffast-math -fforce-addr -frerun-loop-opt -maccumulate-outgoing-args -funroll-loops -g -g -g -Wall -MT lut-funcs.o -MD -MP -MF ".deps/lut-funcs.Tpo" \ 
  -c -o lut-funcs.o `test -f 'lut-funcs.c' || echo './'`lut-funcs.c; \ 
then mv -f ".deps/lut-funcs.Tpo" ".deps/lut-funcs.Po"; \ 
else rm -f ".deps/lut-funcs.Tpo"; exit 1; \ 
fi 
cpu-accel.c: Ved 
Comment 1 Henrik Farre 2004-03-07 09:29:58 UTC
Compiling of mplayer 0.92/1.0_pre* , xine-lib-* and gimp-2.0_pre3-r1 fails with: can't find a register in class `BREG' while reloading `asm'

This is the errors (xine is missing, sry):

Mplayer: 

gcc -O4 -march=athlon-tbird -mcpu=athlon-tbird -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o msmpeg4.o msmpeg4.c 
msmpeg4.c: I funktionen 'msmpeg4_pred_dc': 
msmpeg4.c:734: error: can't find a register in class `BREG' while reloading `asm' 
distcc[7105] ERROR: compile on localhost failed 
make[1]: *** [msmpeg4.o] Fejl 1 
make[1]: Leaving directory `/var/tmp/portage/mplayer-1.0_pre3/work/MPlayer-1.0pre3/libavcodec' 
make: *** [libavcodec/libavcodec.a] Fejl 2 

!!! ERROR: media-video/mplayer-1.0_pre3 failed. 
!!! Function src_compile, Line 307, Exitcode 2 
!!! Failed to build MPlayer!

The Gimp:

cpu-accel.c: I funktionen 'cpu_accel': 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:236: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:241: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:270: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:275: error: can't find a register in class `BREG' while reloading `asm' 
cpu-accel.c:174: error: can't find a register in class `BREG' while reloading `asm' 
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Base\"  -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -g -march=athlon-tbird -O3 -mmmx -m3dnow -pipe  -falign-functions=4 -ffast-math -fforce-addr -frerun-loop-opt -maccumulate-outgoing-args -funroll-loops -g -g -g -Wall -MT lut-funcs.o -MD -MP -MF ".deps/lut-funcs.Tpo" \ 
  -c -o lut-funcs.o `test -f 'lut-funcs.c' || echo './'`lut-funcs.c; \ 
then mv -f ".deps/lut-funcs.Tpo" ".deps/lut-funcs.Po"; \ 
else rm -f ".deps/lut-funcs.Tpo"; exit 1; \ 
fi 
cpu-accel.c: Ved øverste niveau: 
cpu-accel.c:330: advarsel: `sigill_handler' defined but not used 
distcc[3101] ERROR: compile on localhost failed 
make[3]: *** [cpu-accel.o] Fejl 1 
make[3]: *** Venter på uafsluttede job.... 
make[3]: Leaving directory `/var/tmp/portage/gimp-2.0_pre3-r1/work/gimp-2.0pre3/app/base' 
make[2]: *** [all-recursive] Fejl 1 
make[2]: Leaving directory `/var/tmp/portage/gimp-2.0_pre3-r1/work/gimp-2.0pre3/app' 
make[1]: *** [all-recursive] Fejl 1 
make[1]: Leaving directory `/var/tmp/portage/gimp-2.0_pre3-r1/work/gimp-2.0pre3' 
make: *** [all] Fejl 2 

!!! ERROR: media-gfx/gimp-2.0_pre3-r1 failed. 
!!! Function src_compile, Line 95, Exitcode 2 
!!! (no error message)

The only info I could find about this error was something about disabeling -fPIC in the cflags, but I do not have that in my cflags.

The gimp 1.2 compiles without any problemes, so does gimp 2.0pre with USE="-mmx"

I downgraded to gcc 3.3.2 and very thing works fine. I also tried a 3.4pre ebuild from breakmygentoo.net, which produced the same error as gcc 3.3.3


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.2-r9, 2.6.3-mm4) 
================================================================
= 
System uname: 2.6.3-mm4 i686 AMD Athlon(tm) Processor 
Gentoo Base System version 1.4.3.13 
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] 
Autoconf: sys-devel/autoconf-2.58-r1 
Automake: sys-devel/automake-1.8.2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-march=athlon-tbird -O3 -mmmx -m3dnow -pipe -fomit-frame-pointer -falign-functions=4 
-ffast-math -fforce-addr -frerun-loop-opt -maccumulate-outgoing-args -funroll-loops" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config 
/usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ 
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ 
/var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=athlon-tbird -O3 -mmmx -m3dnow -pipe -fomit-frame-pointer -falign-functions=4 
-ffast-math -fforce-addr -frerun-loop-opt -maccumulate-outgoing-args -funroll-loops" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache distcc sandbox" 
GENTOO_MIRRORS="http://gentoo.linux.no" 
MAKEOPTS="-j7" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync1.no.gentoo.org/gentoo-portage" 
USE="3dnow X acpi alsa apache2 avi berkdb cdr dga dvd fbcon foomaticdb freetype gdbm gif gtk gtk2 
imlib jpeg libg++ libwww mad matrox mmx motif mozilla mpeg ncurses nls nogcj nptl oggvorbis opengl 
pam pda pdflib perl png python qt quicktime readline spell ssl tcltk tcpd tetex tiff truetype 
video_cards_matrox x x86 xml xml2 xmms xv zlib"
Comment 2 Alexander Gabert (RETIRED) gentoo-dev 2004-03-08 01:03:05 UTC
hi

can you disable distcc or at least make sure you are using the same gcc version and the same specs file on each machine?

if hardened-gcc on all or any machine, unmerge hardened-gcc and run the following command on every machine:

gcc -dumpspecs > $(gcc-config -L)/specs

this will restore the original specs for the gcc

additionally, can you lower the CFLAGS and see what happens?

i understand that Gentoo users appreciate lots of speedup switches for gcc, but we would be more productive doing bug reports where people report errors after having done some "preliminary" sorting of the CFLAGS that may or may not be involved in this behaviour- which will in turn give us a clue what CFLAGS the ebuild should filter-flag in the future as a response to your bug report :-)

thanks,

Alex
Comment 3 Henrik Farre 2004-03-08 06:29:17 UTC
I have tried to run without distcc, same result. When I run with gcc I use the same version on both computers. The specs of $(gcc-config -L)/specs and gcc -dumpspecs are the same.
I have tried with CFLAGS="" CXXFLAGS="" in my make.conf, same result. 

I'm sry that I forget to mention that :)
Comment 4 Alexander Gabert (RETIRED) gentoo-dev 2004-03-11 07:16:50 UTC
give me an emerge log of the package getting build without CFLAGS and CXXFLAGS like march and optimization

thanks, Alex
Comment 5 Henrik Farre 2004-03-14 05:25:15 UTC
I'm sorry, as I stated in my first post, I downgraded to 3.3.2, and I need my system working right now, I might try later to compile something with 3.3.3 and no optimizing and post the log
Comment 6 Alexey McSakoff 2004-03-23 03:02:45 UTC
# emerge /usr/portage/media-video/mplayer/mplayer-1.0_pre3-r1.ebuild

[skipped]

gcc -c -O4 -march=pentium3 -mcpu=pentium3 -pipe -ffast-math 
-fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I. -Inative -I.. 
-I../libmpdemux -I../loader -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include 
-I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   
-D_GNU_SOURCE -I../libmpflac -o vf_tfields.o vf_tfields.c
vf_tfields.c: In function `qpel_4tap_MMX':
vf_tfields.c:199: error: can't find a register in class `BREG' while reloading 
`asm'
make[1]: *** [vf_tfields.o] Error 1
make[1]: Leaving directory 
`/var/tmp/portage/mplayer-1.0_pre3-r1/work/MPlayer-1.0pre3/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2

!!! ERROR: media-video/mplayer-1.0_pre3-r1 failed.
!!! Function src_compile, Line 307, Exitcode 2
!!! Failed to build MPlayer!

Whith gcc-3.3.2 and hardened-gcc I've got same fail but in other file. Also I 
tried to reemerge gcc-3.3.3-r1 with and without USE="hardened" flag. Same 
result.

While emerging it says:
         * Please note that we do not use C[XX]FLAGS from /etc/make.conf
         * or the environment, as the MPlayer guys then do not give support
         * in case of bug reports!.
so it do not use my optimizatoin flags.

Portage 2.0.50-r1 (hardened-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 
2.6.3-gentoo-r2)
=================================================================
System uname: 2.6.3-gentoo-r2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.gentoo.ru/pub/mirror/gentoo/ 
http://gentoo.oregonstate.edu/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa arts berkdb cdr crypt gtk imlib kde ldap libwww mmx motif 
mysql nls oggvorbis opengl pam perl pic python qt readline scanner sdl sse 
ssl svga tcpd x86 zlib"
Comment 7 Alexey McSakoff 2004-03-23 20:55:25 UTC
I just emerge mplayer on other Gentoo system assembled with USE="-hardened" gcc-3.3.3-r1. No fails.
Comment 8 Danicel Liviu Cristian 2004-04-10 04:00:01 UTC
Put "hardened" in your USE flags and recompile gcc. That worked for me
Comment 9 Danicel Liviu Cristian 2004-04-10 04:04:15 UTC
I forgot to say that i didn't have "hardened" when i compiled the gcc which was borking on ffmpeg/mplayer/avifile etc.I tried putting out all the use flags and CFlags and the CXXFlags but it was still acting the same way.I tried 3.3.x as well as 3.2.x and nothing changed.Then i put "hardened" in my use flags and recompiled gcc 3.3.3 ( since i wanted to get back my up-to-date gcc ) and this time it started compiling succesfully everything :-)
Hope this info is helpful in any way.
Comment 10 Paul Sorensen 2004-04-11 00:30:33 UTC
I had this problem (I hit it when compiling xine-lib) and found that the problem went away after removing "-fPIC" from my CFLAGS in /etc/make.conf.

From what I read, this is something to do with a more strict version of the assembler in gcc 3.3.2 in how it handles declaring "clobered" registers.  I don't understand why removing -fPIC helps, but it seems to.
Comment 11 SpanKY gentoo-dev 2004-04-18 23:09:20 UTC
most apps filter-flags -fPIC now ...

please open bugs for each specific package