The first problem is that there are some warnings that with -Wall turn into errors. For this I will attach a patch taken from upstream CVS. The next problem is this: i386/dsputil_mmx.c: In function `transpose4x4': i386/dsputil_mmx.c:618: error: can't find a register in class `GENERAL_REGS' while reloading `asm' I didn't get past that one yet, so there may be more. Portage 2.0.53_rc5 (default-linux/x86/2004.2/gcc34, gcc-3.4.4, glibc-2.3.5-r2, 2.6.12 i686) ================================================================= System uname: 2.6.12 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.12.0_pre9 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [disabled] dev-lang/python: 2.2.3-r5, 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 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 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O0 -pipe -g3 -ggdb3" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /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/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O0 -pipe -g3 -ggdb3" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig cvs digest distlocks fixpackages nostrip sfperms sign strict" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://ftp.easynet.nl/mirror/gentoo/" LANG="en_US.UTF-8" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/home/griffon26/cvs-wa/gentoo-x86" PORTDIR_OVERLAY="/usr/portage_overlay" SYNC="rsync://10.0.0.1/gentoo-portage" USE="X a52 alsa apache2 avi bitmap-fonts bonobo browserplugin cdr crypt cscope curl dba debug dedicated dga disablexmb dts dvd dvdread emboss encode ethereal faad fam fastcgi fbcon ffmpeg flac font-server freetds freetype gd gdbm gif gpm graphviz gstreamer gtk gtk2 imagemagick imlib ipv6 jikes jpeg libwww mad matroska mcal memlimit mikmod mmx mmxext motif mozilla mp3 mpeg mpi mysql mythtv ncurses nls nocd ogg oggvorbis opengl pam pdflib perl plotutils png pnp qt quicktime readline samba sdl slang snmp sse sse2 ssl subversion svga tcltk tcpd test tiff truetype truetype-fonts trusted type1-fonts unicode usb userlocales vorbis win32codecs wmf wxwindows x86 xml xml2 xmms xosd xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS
Created attachment 70963 [details, diff] Fixes warnings about unused functions and pointer type conversions
No need to CC me, I'm on media-video. Try adding -fomit-frame-pointer, probably -O0 on x86 doesn't get along well with PIC.
Could you attach the complete build log? It looks like it might be a problem with MMX support and Intel, based off of my googling so far.
architecture limitation. add -02 -fomit-frame pointer and it will work.
Diego, -O0 doesn't work, regardless of -fomit-frame-pointer -O1 and -O2 do work, also regardless of -fomit-frame-pointer I guess -O0 has to be filtered, unless somebody's gonna modify the asm. If this is an architecture limitation as Luca says, should it be conditional? Also, forget about the patch I attached... I confused -Wall with -Werror and because of -j4 didn't notice that the actual error was the one in transpose4x4 all along. The patch fixes only harmless warnings. Andy, not sure what you're looking for but here is the context: i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/cputest.o i386/cputest.c i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/dsputil_mmx.o i386/dsputil_mmx.c i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/mpegvideo_mmx.o i386/mpegvideo_mmx.c i386/dsputil_mmx.c: In function `transpose4x4': i386/dsputil_mmx.c:618: error: can't find a register in class `GENERAL_REGS' while reloading `asm' i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/idct_mmx.o i386/idct_mmx.c i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/motion_est_mmx.o i386/motion_est_mmx.c i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/simple_idct_mmx.o i386/simple_idct_mmx.c i686-pc-linux-gnu-gcc -g -Wall -Wno-switch -march=pentium4 -O0 -pipe -g3 -ggdb3 -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -msse -c -o i386/fft_sse.o i386/fft_sse.c make[1]: *** [i386/dsputil_mmx.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/ffmpeg-0.4.9_p20050906/work/ffmpeg-0.4.9-p20050906-static/libavcodec' make: *** [lib] Error 2
That's interesting, as from my googling, I've found -02 has issues too. But yeah, it looks as if the culprit is i386 arch limitations using certain optimizations... I think a filter of the flags might be the best way to tackle this.
Created attachment 70982 [details, diff] Patch to filter -O0 Try this sucker out.
I haven't looked at the Makefiles yet, but since i386/dsputil_mmx is in an arch dependent directory already, maybe it is possible to put arch dependent CFLAGS in the Makefile to prevent arch dependent things in the ebuild. Just a thought.
Probably the pic friendly patch that we are pushing upstream could solve that too. ANYWAY -O0 is the perfect way to have a non functional software =/
I am experiencing this problem with -O2: i686-pc-linux-gnu-gcc -O2 -march=i686 -fomit-frame-pointer -pipe -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20051216/work/ffmpeg-0.4.9-p20051216-shared'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -DPIC -c -o i386/idct_mmx_xvid.o i386/idct_mmx_xvid.c i386/h264dsp_mmx.c: In Funktion
I am experiencing this problem with -O2: i686-pc-linux-gnu-gcc -O2 -march=i686 -fomit-frame-pointer -pipe -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20051216/work/ffmpeg-0.4.9-p20051216-shared'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -DPIC -c -o i386/idct_mmx_xvid.o i386/idct_mmx_xvid.c i386/h264dsp_mmx.c: In Funktion »h264_h_loop_filter_luma_mmx2«: i386/dsputil_mmx.c:621: Fehler: in der Klasse »GENERAL_REGS« konnte während des Neuladens von »asm« kein Register gefunden werden emmerge info: Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-4.0.2, glibc-2.3.6-r2, 2.6.14-gentoo-r5 i686) ================================================================= System uname: 2.6.14-gentoo-r5 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Gentoo Base System version 1.12.0_pre12 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 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-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~overlay ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe" DISTDIR="/files/portage/distfiles" FEATURES="autoconfig buildpkg confcache cvs distlocks sandbox sfperms userpriv usersandbox" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.romnet.org/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LANG="C" LC_ALL="C" LINGUAS="de en" PKGDIR="/files/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/files/portage/local /usr/local/gentoo-php-overlay/production-ready /usr/local/gentoo-php-overlay/experimental" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X a52 aac aalib acl acpi alsa apache2 arts audiofile avi bash-completion berkdb bidi bitmap-fonts browserplugin bzip2 cdb cdda cdio cdparanoia crypt crypto cups curl dga distcache dri dts dvd dvdread edl emboss expat fam fbcon ffmpeg firefox flac font-server foomaticdb fortran freetype gd gdbm gif glitz glut glx gmp gnome gnutls gpm gstreamer gtk gtk2 hal httpd idn imagemagick imlib ipv6 javascript jpeg kde kdeenablefinal lcms ldap libcaca libg++ libwww live lm_sensors lua lzo mad matroska mikmod mmx mmxext mng mono mozilla mp3 mpeg musicbrainz mysql ncurses network nls nptl nptlonly nsplugin ogg oggvorbis openal opengl pam pcmcia pcre pdflib perl php png python qt quicktime readline rtc ruby samba sdl slang speedo spell sse sse2 ssl stream svg tcltk tcpd tga theora tiff truetype truetype-fonts type1 type1-fonts udev unicode usb vcd vhosts vlm vorbis wifi win32codecs wxwindows xfs xine xinerama xml2 xosd xprint xv xvid zlib elibc_glibc kernel_linux linguas_de linguas_en userland_GNU video_cards_radeon" Unset: ASFLAGS, CTARGET, LDFLAGS, MAKEOPTS
well this might not be the appropriate place for this but i am getting this exact error if i try to compile ffmpeg with gcc-4.1.0_beta20051230....... using gcc-3.4.5 it compiles fine i686-pc-linux-gnu-gcc -Wall -Wno-switch -O2 -march=athlon-xp -pipe -fomit-frame-pointer -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -I'/var/tmp/portage/ffmpeg-0.4.9_p20051216/work/ffmpeg-0.4.9-p20051216-shared'/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC -DPIC -c -o i386/idct_mmx_xvid.o i386/idct_mmx_xvid.c i386/h264dsp_mmx.c: In function 'h264_h_loop_filter_luma_mmx2': i386/dsputil_mmx.c:621: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' make[1]: *** [i386/dsputil_mmx.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/ffmpeg-0.4.9_p20051216/work/ffmpeg-0.4.9-p20051216-shared/libavcodec' make: *** [lib] Error 2 !!! ERROR: media-video/ffmpeg-0.4.9_p20051216 failed. !!! Function src_compile, Line 121, Exitcode 2 !!! shared failed !!! If you need support, post the topmost build error, NOT this status message. rommel@JaiBaba ~ $ emerge info Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-4.1.0-beta20051230, glibc-2.3.6-r2, 2.6.14-gentoo-r6 i686) ================================================================= System uname: 2.6.14-gentoo-r6 i686 AMD Athlon(tm) 64 FX-57 Processor Gentoo Base System version 1.12.0_pre12 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 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-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X aac alsa apm asf audiofile avi berkdb bitmap-fonts bzip2 cdparanoia cdr crypt cups curl dbus dga directfb dlloader dvd dvdr dvdread eds emboss encode esd exif expat fam fbcon ffmpeg flac foomaticdb fortran gdbm gif gimp glut gmp gnome gpm gstreamer gtk gtk2 hal idn imagemagick imlib ipod ipv6 jpeg lcms libg++ libwww lm_sensors mad matroska mikmod mjpeg mmx mmxext mng motif mozilla mp3 mpeg mpg4 mplayer mysql ncurses nls nptl nsplugin nvidia ogg oggvorbis openal opengl oss pam pcre pda pdf pdflib perl png python quicktime readline reiser4 reiserfs rhythmbox sdl spell sse ssl svg svga tcpd tiff transcode truetype truetype-fonts type1-fonts udev usb v4l vorbis win32codecs xine xml2 xmms xv xvid zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Addin -mmx to USE and "-mno-mmx -mno-sse" to CFLAGS helped - media-video/ffmpeg-0.4.9_p20051216 compiled fine with GCC 4.0.2
confirmed. Can you please fix this in the ebuild?
well with 4.0.2 the newest ffmpeg fails....ffmpeg-0.4.9_p20060302.... but USE="-mmx" fixes this...and it compiles with both 4.0.2 and 4.1.0-pre20060223 no need to change cflags here Portage 2.1_pre5-r2 (default-linux/x86/2005.1, gcc-4.0.2, glibc-2.3.6-r3, 2.6.16-rc2-git5 i686) ================================================================= System uname: 2.6.16-rc2-git5 i686 AMD Athlon(tm) 64 FX-57 Processor Gentoo Base System version 1.12.0_pre16 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5-r2, 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 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-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe -msse -msse2 -mfpmath=sse -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe -msse -msse2 -mfpmath=sse -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="en" MAKEOPTS="-j30" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X aac acpi aim aimextras alsa apm applet artworkextra asf audacious audiofile avi bash-completion berkdb bitmap-fonts buttons cairo cddb cdio cdparanoia cdrom chroot ck-plus cpudetection crypt css cups dbus dga dio directfb dlloader dpms dvb dvd dvdr dvdread eds emboss encode fbcon ffmpeg flac foomaticdb fortran gdbm gif gimp gnome gpm gstreamer gtk gtk+ gtk2 hal imagemagick imlib ipod ipv6 jpeg lavc libg++ libwww lm_sensors mad mikmod mjpeg mmx mmxext mono motif mozilla mp3 mpeg mpeg2 mpg4 mplayer ncurses nls nptl nsplugin nvidia ogg oggvorbis opengl oss pam pda pdf pdflib perl png python qt quicktime readline real reiser4 reiserfs rhythmbox sdl spell sse ssl svg svga tcpd transcode truetype truetype-fonts type1-fonts usb v4l vlm vorbis win32codecs wma wmv xine xml2 xmms xv xvid zlib elibc_glibc input_devices_evdev input_devices_vesa input_devices_void input_devices_fbdev input_devices_vga input_devices_keyboard input_devices_tseng input_devices_v4l input_devices_joystick input_devices_mouse input_devices_nv kernel_linux linguas_en userland_GNU video_cards_nv video_cards_nvidia"Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS
happens here only with gcc 4.1.0, 3.4.x works fine
Is this still true on the last snapshot?
works for me now in the latest snapshot, thanks.