#87 closed defect (invalid)
error: can't find a register in class `GENERAL_REGS' while reloading `asm'
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | core |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | biterek@…, bjrtchsupp@…, corrado91@… | |
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
Hello,
I'm having trouble compiling latest (2004-09-14 tarball) with my gcc [0],
on my linux [1] box.
While in MPlayer-20040914/libavcodec,
I get the following error:
i386/dsputil_mmx.c: In function `h263_h_loop_filter_mmx':
i386/dsputil_mmx.c:662: error: can't find a register in class `GENERAL_REGS'
while reloading `asm'
Here's the (original) $(CC)-line that causes this:
cc -I../libvo -I../../libvo -I/usr/X11R6/include -O3 -march=athlon-xp
-mtune=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -fomit-frame-pointer
-pipe -fforce-addr -fforce-mem -frerun-cse-after-loop -frerun-loop-opt
-falign-functions=4 -maccumulate-outgoing-args -fprefetch-loop-arrays
-fmove-all-movables -momit-leaf-frame-pointer -fno-PIC -D_REENTRANT
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
-DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_GNU_SOURCE -c -o i386/dsputil_mmx.o i386/dsputil_mmx.c
I've 'hacked' at it, and trimmed it down to (without 'it' failing for some other
reason, then *above):
cc -I../libvo -DHAVE_AV_CONFIG_H -I.. -c -o i386/dsputil_mmx.o
i386/dsputil_mmx.c
... my guess would be, 'GCC done it again' :)
... and I'll ...well have to roll back to 3.4.1
---
[0]:
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/specs
Configured with: ../gcc-3.4.2/configure --prefix=/usr --enable-shared
--enable-languages=c,c++,objc --enable-threads=posix --enable-cxa_atexit
Thread model: posix
gcc version 3.4.2
[1]:
http://www.archlinux.org/ - precompiled - Linux version 2.6.8.1 (root@earth)
(gcc version 3.4.1) #1 SMP Sun Aug 22 16:44:06 PDT 2004
Change History (13)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
This is not MPlayer bug. It's due to GCC overoptimization, and you're using
non-standard CFLAGS anyway, so you shouldn't have reported it here.
comment:3 by , 20 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
ok.
GCC overoptimization
like, '--enable-cxa_atexit' ?
"--enable-cxa_atexit: This option will result in C++ shared libraries and C++
programs that are interoperable with other linux distributions."[0]
. . .
"This option allows use of cxa_atexit, rather than atexit, to register C++
destructors for local statics and global objects. This option is essential for fully
standards-compliant handling of destructors. It also effects the C++ ABI, and
therefore results in C++ shared libraries and C++ programs that are
interoperable with other Linux distributions"[1]
if it is, then in such case, guess I'd have to blame the maintainer for enabling it
*using precompiled gcc...*
non-standard CFLAGS anyway
It hit me too - But, I've 'trimmed' it all out/away .. and still it errors.
- - -
[0]: http://www.faqs.org/docs/linux_scratch/chapter06/gcc.html
[1]: http://www.lfs-matrix.de/lfs/view/testing/chapter05/gcc-pass2.html
comment:4 by , 20 years ago
Why was this reopened? I think we agree this is yet another gcc bug (I have yet
to see a gcc 3.x version that compiles MPlayer under all conditions correctly).
And as it doesn't trigger any hard-to-find bugs I will be against any patch.
So all that you can expect by reopening this is that we put the same kind of
check for gcc 3.x in configure as we did for gcc 2.96... which I doubt anyone
really wants...
Greetings,
Reimar Döffinger
comment:5 by , 20 years ago
(In reply to comment #3)
non-standard CFLAGS anyway
It hit me too - But, I've 'trimmed' it all out/away .. and still it errors.
I just installed gcc-3.4.2. I successfully compiled mplayer both with and
without runtime CPU detection enabled. Processor is P3 though and not AMD.
Try unset CFLAGS and similar flags before running configure and see if that
fixes.
comment:6 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Eureka Eureka! :)
sorry for the 'delay' - but I've finally had time over, and I found the problem! :)
but 1st.
/* reply to Reimar Döffinger' */
Why was this reopened?
I wanted to have confirmed what 'he' [0] ment by 'due to GCC overoptimization'
that I used. /* so I'd learn :) */
as I didn't quite 'follow' what 'he' [0] was refering to - my $C*FLAGS, the
'$GCC_CONF_OPT' I quote xor a little bit of both....
anyhow, when I rerun the 'trimmed down' offending $(CC)-line I wasn't diligent
enough in my efforts.
what I should have been doing was to go the:
' make clean; export CFLAGS="<ins. new test flags>" ; export
CXXFLAGS=$CFLAGS; ./configure ... ; make '
way.
So after a few tries and a couple of double-checking reruns, I found that what it
didn't like in my $CFLAGS/$CXXFLAGS [1]
was the declared '-fforce-addr' [2]
maybe one of "you'vs" could confirm that '--fforce-addr' is a bad Opt-flag to
use /w mplayer?
and in case this applies to 'others' and other versions of gcc too, then maybe one
ought to update the ./configure script to:
export OPTFLAGS=
echo $CFLAGS | sed 's/-fforce-addr //'
- - -
[0] - Dominik 'Rathann' Mierzejewski
[1] - -O3 -march=athlon-xp -mtune=athlon-xp -m3dnow -msse -mfpmath=sse
-mmmx -fomit-frame-pointer -pipe -fforce-addr -fforce-mem
-frerun-cse-after-loop -frerun-loop-opt -falign-functions=4
-maccumulate-outgoing-args -fprefetch-loop-arrays -fmove-all-movables
-momit-leaf-frame-pointer -fno-PIC
[2] - -fforce-addr ; Force memory address constants to be copied into registers
before doing arithmetic on them. This may produce better code just as
-fforce-mem may.
[2] -
http://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/Optimize-Options.html#Optimize-Options
comment:7 by , 20 years ago
(In reply to comment #5)
(In reply to comment #3)
non-standard CFLAGS anyway
It hit me too - But, I've 'trimmed' it all out/away .. and still it errors.
I just installed gcc-3.4.2. I successfully compiled mplayer both with and
without runtime CPU detection enabled. Processor is P3 though and not AMD.
Try unset CFLAGS and similar flags before running configure and see if that
fixes.
take another look at the bug[0], I've found the offending-thing :)
- - -
comment:8 by , 20 years ago
(In reply to comment #6)
/* reply to Reimar Döffinger' */
Why was this reopened?
I wanted to have confirmed what 'he' [0] ment by 'due to GCC overoptimization'
that I used. /* so I'd learn :) */
No need to reopen the bug for that.
maybe one of "you'vs" could confirm that '--fforce-addr' is a bad Opt-flag to
use /w mplayer?
No, it's only bad when you use a compiler that is as badly broken as gcc 3.x.
That's why you should report that to the gcc team in the hope that they somewhen
will have fixed their compiler so far that it is actually usable.
and in case this applies to 'others' and other versions of gcc too, then maybe
one
ought to update the ./configure script to:
export OPTFLAGS=
echo $CFLAGS | sed 's/-fforce-addr //'
No, we won't as think our users usually know what their doing and if they
specify CFLAGS we will use them. In other words: We don't want to treat our
users like little children and watch and try to correct their every step.
And anyway, FIXED is the wrong resolution, INVALID would have been correct.
Sorry for the not-so-friendly reply, but I'm getting pissed by all those
so-called "bugreports" caused by gcc 3.x.
comment:9 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Reopen bug to mark as INVALID.
comment:11 by , 18 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Summary: | GCC 3.4.2 compile error. → error: can't find a register in class `GENERAL_REGS' while reloading `asm' |
Properly marking as INVALID, this is a compiler bug.
*opps*,
maybe you would like to know how I configured [0] it too
*/opps*
[0]:
./configure --prefix=/usr --confdir=/etc/mplayer \
--enable-gui --enable-largefiles --enable-linux-devfs --enable-live --enable-menu
--enable-fribidi \
--disable-external-faad \
--disable-arts --disable-esd \
--enable-runtime-cpudetection \
--enable-dynamic-plugins \
--with-win32libdir=/usr/lib/win32 --with-livelibdir=/usr/lib/live