Opened 17 years ago
Closed 16 years ago
#1144 closed defect (fixed)
can't find a register in class 'GENERAL_REGS' while reloading asm due to missing CFLAGS when cross-compiling x86_64 --> x86_32
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | 1.0rc2 | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
I built a b4-bit mplayer using "./configure ; make"
But I would like to use the 32-bit codecs.
If I use "CFLAGS=-m32 ./configure ; make"
most modules compile, but many in libavcodec
fail with e.g.
In file included from h264.h:32,
from h264.c:31:
cabac.h: In function 'get_cabac_noinline':
cabac.h:525: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
gcc-4.1.2-42.el5.x86_64 also compat-gcc-34-3.4.6-4.x86_64
Linux 2.6.18-92.1.6.el5
Attachments (1)
Change History (7)
comment:1 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Summary: | Cannot build 32-bit binary on Intel core2 system → can't find a register in class 'GENERAL_REGS' while reloading asm |
comment:2 by , 17 years ago
(In reply to comment #1)
This is a bug in gcc.
Does this work in any version of gcc ?
It fails for me also in gcc-3.4.6-9.x86_64 and gcc4-4.1.2-14.EL4.x86_64
Is there any alternative to compiling on a 32-bit machine (which would have to
have the same libraries as the target machine; my old PC is too old) ?
comment:3 by , 17 years ago
(In reply to comment #2)
(In reply to comment #1)
This is a bug in gcc.
Does this work in any version of gcc ?
I have no idea, possibly not.
It fails for me also in gcc-3.4.6-9.x86_64 and gcc4-4.1.2-14.EL4.x86_64
Is there any alternative to compiling on a 32-bit machine (which would have to
have the same libraries as the target machine; my old PC is too old) ?
Do you have -fomit-frame-pointer in your CFLAGS? Note that this bug report is quite incomplete, you do not even provide the complete compilation command that fails.
comment:4 by , 17 years ago
No, -fomit-frame-pointer is not set when CFLAGS is preset to -m32.
I managed to build mplayer with lib/codecs support by replacing the x86-64 versions of gcc, cpp and binutils (includes "as") with the i386 versions.
But this is not very convenient. I had hoped to find a simpler method such as a configuration option.
The failing compile commands are e.g.
cc -I./libavcodec -I./libavformat -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -I. -I. -I./libavutil -m32 -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetype2 -I../libswscale -I../libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil
-Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -I. -I.. -I../libavutil -m32 -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetype2 -c -o i386/dsputil_mmx.o i386/dsputil_mmx.c
comment:5 by , 17 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Summary: | can't find a register in class 'GENERAL_REGS' while reloading asm → can't find a register in class 'GENERAL_REGS' while reloading asm due to missing CFLAGS when cross-compiling x86_64 --> x86_32 |
I think I will have to look into this...
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
should be fixed since a long time ago
please reopen if svn mplayer still has problems.
This is a bug in gcc.