Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116125 - ffmpeg can't find a register in class `GENERAL_REGS' while reloading `asm'
Summary: ffmpeg can't find a register in class `GENERAL_REGS' while reloading `asm'
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Developers for the x86 Architecture
URL:
Whiteboard:
Keywords:
: 116529 118637 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-19 23:36 UTC by Christopher Smith
Modified: 2009-12-09 21:49 UTC (History)
7 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 Christopher Smith 2005-12-19 23:36:20 UTC
Here's the trailing bit of my build:

 i386-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../include -I../../../../include -I../../../../src -I../../../../src/xine-engine -I../../../../src/xine-engine -I../../../../src/xine-utils -I../../../../src/input -I../../../../src/input -I../../../../lib -DSIMPLE_IDCT -DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DUSE_FASTMEMCPY -DCONFIG_RISKY -DCONFIG_DECODERS -DXINE_MPEG_ENCODER -DCONFIG_ZLIB -DCONFIG_GPL -I../../../../src/libffmpeg/libavcodec -fomit-frame-pointer -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -DENABLE_IPV6 -O2 -mcpu=i686 -march=pentium4 -pipe -frename-registers -ffunction-sections -mno-sse -fomit-frame-pointer -c postprocess.c  -fPIC -DPIC -o .libs/postprocess.o
In file included from postprocess.c:655:
postprocess_template.c:3207:1: warning: "REAL_SCALED_CPY" redefined
In file included from postprocess.c:645:
postprocess_template.c:3230:1: warning: this is the location of the previous definition
In file included from postprocess.c:655:
postprocess_template.c: In function `postProcess_MMX2':
postprocess_template.c:3483: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
postprocess_template.c:3629: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
In file included from postprocess.c:665:
postprocess_template.c:53:1: warning: "REAL_PAVGB" redefined
In file included from postprocess.c:655:
postprocess_template.c:51:1: warning: this is the location of the previous definition
In file included from postprocess.c:665:
postprocess_template.c:1209:1: warning: "REAL_FIND_MIN_MAX" redefined
In file included from postprocess.c:655:
postprocess_template.c:1204:1: warning: this is the location of the previous definition
In file included from postprocess.c:665:
postprocess_template.c:3230:1: warning: "REAL_SCALED_CPY" redefined
In file included from postprocess.c:655:
postprocess_template.c:3207:1: warning: this is the location of the previous definition
make[5]: *** [postprocess.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/xine-lib-1.1.1-r2/work/xine-lib-1.1.1/src/libffmpeg/libavcodec/libpostproc'

Relevant USE flags: +X +a52 +aac -aalib +alsa (-altivec) +arts -cle266 -directfb +dts +dvd -dxr3 +esd -fbcon +flac +gnome -i8x0 +imagemagick +ipv6 -libcaca +mad +mng +nls -nvidia +opengl +oss +samba +sdl +speex +theora +v4l +vcd -vidix +vorbis +win32codecs +xinerama +xv -xvmc

Relevant CFLAGS: "-O2 -mcpu=i686 -march=pentium4 -pipe"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-12-20 01:00:21 UTC
Post emerge --info output and reopen then...
Comment 2 Christopher Smith 2005-12-20 01:06:23 UTC
# emerge --info
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13-gentoo-r3 i686)
=================================================================
System uname: 2.6.13-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O2 -mcpu=i686 -march=pentium4 -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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="-O2 -mcpu=i686 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://64.50.236.52/ ftp://130.207.108.136/pub/gentoo ftp://130.207.108.134/pub/gentoo http://64.50.238.52/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi adns aim alsa apache2 apm arts audiofile avi bash-completion berkdb bitmap-fonts bonobo browserplugin bzip2 c++ cairo calendar cdb cdparanoia cdr crypt ctype cups curl curlwrappers dba dbase dbus dbx dga dio divx4linux dmx doc dri dts dv dvb dvd dvdr dvdread eds effects emacs emacs-w3 emboss encode esd ethereal exif expat fam firebird flac foomaticdb fortran freetds ftp gcj gd gdbm geoip gif ginac glitz glut gmp gnome gnutls gphoto2 gstreamer gtk gtk2 gtkhtml guile hal howl icq idn imagemagick imap imlib inkjar innodb iodbc ipv6 jabber jack java javascript jpeg jpeg2k junit kde kdeenablefinal kdexdeltas lapack lcms ldap libedit libg++ libgda libwww lm_sensors mad mhash mikmod mime ming mmap mmx mng mono motif mozilla mp3 mpeg mpi msn mssql mysql mysqli ncurses netcdf nls nptl nsplugin ocaml oci odbc offensive ofx ogg oggvorbis opengl oracle oracle7 oscar oss pam pcre pdflib perl php pic plotutils plugin png posix postgres ppds python qdbm qt quicktime rdesktop readline recode ruby samba sasl scanner sdl slp snmp soap sockets speex spell sse sse2 ssl svg symlink sysvipc tcltk tcpd tetex theora threads tidy tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vcd vhosts vorbis win32codecs wmf xine xinerama xml xml2 xmlrpc xmms xpm xprint xsl xv xvid yahoo zeroconf zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-20 01:18:39 UTC
Can you try dropping -mcpu or -march? It seems like it's running out of registers sooner than expected.
Comment 4 Christopher Smith 2005-12-20 01:50:21 UTC
Removing -march=pentium4 made the build run smoothly.
This a compiler bug then?
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-20 02:04:27 UTC
I would say that's an architecture limitation.

x86 arch team, can someone suggest a solution to all this?
Comment 6 Christopher Smith 2005-12-20 02:19:19 UTC
So I looked at my CFLAGS more closely and realized I'm an idiot for setting -mcpu and -march at the same time, and to different values no less. Let's chalk this up to PEBKAC.
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-20 02:55:35 UTC
Well it makes sense, if you're going to distribute the binaries to other machines ;)
But if you just use it yourself, you're probably creating bigger executables with no advantage.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2005-12-20 03:14:55 UTC
(In reply to comment #7)
> Well it makes sense, if you're going to distribute the binaries to other
> machines ;)

Well, I'd say -mcpu=i686 -march=pentium4 does not make much sense, should be the other way round, if anything. :=)
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-20 03:23:41 UTC
Erm wait you're right.. but in this case shouldn't -mcpu be ignored? if -march > -mcpu, it's a no-op ...
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-12-20 04:03:46 UTC
(In reply to comment #9)
> Erm wait you're right.. but in this case shouldn't -mcpu be ignored? if -march
> > -mcpu, it's a no-op ...

Well, I'd say yes, but it's more likely a question for toolchain folks...

Comment 11 Rumen Yotov 2005-12-20 10:34:29 UTC
Hi,
Same problem with xine-lib-1.1.1-r2.
Even tried disabling "-mmx" but to no avail.
Solved only when put both 'xvid&ffmpeg' in package.keywords.
So with xvid & ffmpeg & xine-lib in '~x86' no error.
Quite sane CFLAGS "-march-athlon-xp -O2 -fomit-frame-pointer"
Thanks.Rumen
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2005-12-23 13:15:40 UTC
*** Bug 116529 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2005-12-23 16:15:57 UTC
*** Bug 116547 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2005-12-23 16:24:13 UTC
I'm reopening this bug wrt Bug 116547 (same issue w/ >=gcc-4.0) and comment #11 in this bug. 

CCing toolchain to have a look what's going on here, does not make much sense. :/
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-23 17:55:30 UTC
Moving to x86 arch team (I'm on media-video so no need to CC me), as this is by all means an arch limitation that I have no idea how to fix...
Comment 16 Mark Loeser (RETIRED) gentoo-dev 2005-12-23 18:16:16 UTC
I'm completely confused here.  Can whomever is experiencing this problem give us the output of `emerge info' and error output as well as the version of the package you are merging.
Comment 17 SpanKY gentoo-dev 2005-12-23 21:05:44 UTC
not bother looking into

original reporter's `emerge info` shows a system that is clearly screwed
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-01-13 01:57:05 UTC
*** Bug 118637 has been marked as a duplicate of this bug. ***
Comment 19 Stefan de Konink 2009-12-09 21:49:26 UTC
Happens again on Gentoo 4.4.2 p1.0, using:
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"

media-video/ffmpeg-0.5_p20373