gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavcodec -DHAVE_AV_CONFIG_H=1 -msse -march=athlon-xp -Os -pipe -MT libmmxsse_la-dsputil_mmx.lo -MD -MP -MF .deps/libmmxsse_la-dsputil_mmx.Tpo -c dsputil_mmx.c -fPIC -DPIC -o .libs/libmmxsse_la-dsputil_mmx.o dsputil_mmx.c: In function `h263_h_loop_filter_mmx': dsputil_mmx.c:614: error: can't find a register in class `INDEX_REGS' while reloading `asm' make[8]: *** [libmmxsse_la-dsputil_mmx.lo] Error 1 make[8]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs/ext/ffmpeg/libavcodec/i386' make[7]: *** [all-recursive] Error 1 make[7]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs/ext/ffmpeg/libavcodec' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs/ext/ffmpeg' make[5]: *** [all] Error 2 make[5]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs/ext/ffmpeg' make[4]: *** [all-local] Error 2 make[4]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs/ext' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs/ext' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0/gst-libs' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gst-plugins-ffmpeg-0.8.0/work/gst-ffmpeg-0.8.0' make: *** [all] Error 2 !!! ERROR: media-plugins/gst-plugins-ffmpeg-0.8.0 failed. !!! Function src_compile, Line 29, Exitcode 2 !!! (no error message) The compilation stop every time in the same point!! Reproducible: Always Steps to Reproduce: 1.emerge gst-ffmpeg 2.with CFLAGS -Os 3. Actual Results: don't compile Expected Results: compile Adding this filter to the ebuild solve the problem replace-flags "-Os" "-O2" For me!!
and your 'emerge info' is ? (read the bugreport form!)
Sorry!! $ emerge info Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-ck4) ================================================================= System uname: 2.6.7-ck4 i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -Os -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 /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-xp -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X aalib alsa apm arts artswrappersuid avi bzlib cdr crypt cups dga divx4linux dvd dvdr encode esx exif faac faad fbcon ffmpeg flac freetype gif gimp gimpprint gpm gstreamer gtk2 imagemagick imap imlib2 java javascript jce jpeg kde kerberos krb4 lcms libwww mad maildir matroska mikmod mldonkeypango mmx monkey motif mozilla moznocompose moznoirc moznomail mozsvg mpeg mplayer ncurses nls nptl oggvorbis ooo-kde opengl pam pdflib perl pic plotutils png python qt quicktime readline samba scanner sdl slang spell sse ssl svg svga tcltk tcpd tetex theora tiff transcode truetype type1 unicode wmf x86 xine xml2 xmms xv xvid zlib"
me too post: compile fails with -Os, works with -O2. emerge info: Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.4.20040619-r0, 2.6.7-gentoo-r7) ================================================================= System uname: 2.6.7-gentoo-r7 i686 AMD Athlon(TM) XP 2800+ Gentoo Base System version 1.5.1 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-Os -march=athlon-xp -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /etc/tomcat /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-Os -march=athlon-xp -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.rnl.ist.utl.pt/gentoo http://darkstar.ist.utl.pt/gentoo/ http://gentoo.felisberto.net" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main" SYNC="rsync://ftp.rnl.ist.utl.pt/gentoo-portage" USE="3dnow X alsa apm avi berkdb crypt cups dvd encode esd gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 guile imlib jack java jpeg libg++ libwww mad mikmod mmx mozilla moznocompose moznoirc moznomail mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python quicktime readline samba sdl slang sse ssl svga tcpd theora truetype x86 xml2 xmms xv zlib"
I think the problem lies with the -falign-functions, it has to be enabled, but without extra arguments. In my CFLAGS I had -falign-functions=4, and I had exactly the same error, after changing that into -falign-functions, the compile went fine. Because that flag is turned off with -Os, my guess is it's just needed for the compile to succeed.
*** Bug 60968 has been marked as a duplicate of this bug. ***
You can forget my laast comment, I just tried some optimalisations, it still fails by just adding -falign-functions with -Os but it works after adding -fprefetch-loop-arrays to the CFLAGS My problem was with -fforce-addr, adding that flag will let the build fail, when editing my CFLAGS to change -falign-funcions, I accidentally deleted the -fforce-addr flag. -falign-functions had no effect on succes or not. Compile-tests: -Os => FAILS -Os -falign-functions => FAILS -Os -fprefetch-loop-arrays => WORKS -O2 -fforce-addr => FAILS the -Os -fprefetch-loop-arrays is a bit strange... on every file, it gives the warning that it is not supported with -Os... I guess the ebuild should add -fprefetch-loop-arrays if -Os is detected, and it should filter -fforce-addr.
i have the same compilation problem. But i was using an -O3 flag. i tried using -O2 but the compilation error persists.. this is my emerge info: root@Valhalla ~ # emerge info Portage 2.0.50-r10 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20040619-r0, 2.6.8-gentoo-r1) ================================================================= System uname: 2.6.8-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.5.3 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -msse2 -O3 -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/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -msse2 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/mobile-linux/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X acpi alsa avi berkdb cdr crypt cups dvd encode esd foomaticdb gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 imlib java jpeg ldap libg++ libwww mad mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline samba sdl slang spell sse sse2 ssl svga tcpd tetex truetype usb wifi x86 xml2 xmms xv zlib"
*** Bug 62645 has been marked as a duplicate of this bug. ***
It compile with warnings using:"-Os -fprefetch-loop-arrays"
Compiles for me with -O3 when I change march pentium4 to pentium3... also works with -O3 on my athlon-xp, so it seems to be jumpy depending on -march...
i added a filter for -Os & -fforce-addr for now, see if that solves most problems.
Foser I can't build even with that filters... I Googled a bit and found http://gcc.gnu.org/ml/gcc-bugs/2004-09/msg00225.html I tried to filter -falign-functions and still can't build. Looked at http://www.coyotegulch.com/products/acovea/ and realised that -march=pentium4 inserts some flags that other -march's doesn't. Changed to Pentium3 and have no problem (O2). So the things to filter will be '-Os' '-fforce-addr' '-falign-functions' and 'pentium4'
there is a limit to what i will filter. In the end it is all gcc version/arch specific & we can't go filter it all. CFLAGS, especially exotic ones, are the responsibility of the user.