emerge -uD world suggested to upgrade to mjpegtools-1.6.2-r3 [ebuild U ] media-video/mjpegtools-1.6.2-r3 [1.6.1.90-r2] -3dnow +X +avi -debug -dv +gtk -mmx +quicktime +sdl -sse -yv12 0 kB results in motion.c: In function `calc_SAD_mmx': motion.c:143: internal compiler error: asm clobber conflict with output operand Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /var/tmp/portage/mjpegtools-1.6.2-r3/temp/cc7RnmCk.out file, please attach this to your bugreport. make[2]: *** [motion.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.2-r3/work/mjpegtools-1.6.2/yuvdenoise' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/mjpegtools-1.6.2-r3/work/mjpegtools-1.6.2' make: *** [all] Error 2 Reproducible: Always Steps to Reproduce: 1. emerge mjpegtools 2. 3. Expected Results: compiled and installed software Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.7 i686) ================================================================= System uname: 2.6.7 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2 /share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown / usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/sha re/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/gen eric/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qma il/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv usersa ndbox" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gent oo.tiscali.nl/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/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="X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups dvd encode esd f77 f am flac font-server foomaticdb fortran gdbm gif gnome gpg gpm gstreamer gtk gtk2 hardened imagemagick imlib ipv6 java jpeg junit libg++ libwww mad mikmod motif mozilla mpeg nas ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sqlite ssl svga tcltk tcpd tetex tiff truetyp e truetype-fonts type1-fonts x86 xml xml2 xmms xv zlib"
Created attachment 48775 [details] output file of compilation Suggested by portae to include this file.
Created attachment 49827 [details, diff] Fixes allow motion.c to build This is the well-known %%ebx PIC problem. The patch here swaps use of %%ebx with use of %%esi, for a change. Normally I'd push/pop ebx.
I can confirm that mjpegtools compiles with this and the patch from bug #77694 but I'm not sure how to confirm runtime. Perhaps we should wrapper the asm changes in #ifdef __PIC__\n\tNEW_CODE_HERE\n#else\nOLD_CODE_HERE\n#endif
Created attachment 49839 [details, diff] Same as before, but with #ifdefs to preserve original code on non-pic Just to be safe; avoid potentially breaking it where it already works.
Created attachment 50843 [details, diff] Full patch, enabling simd-accel stuff with PIC. This patch corrects a few missing PIC-ability issues in the asm of this package. This integrates the patch I supplied for motion.c here, the patch for deinterlace.c I supplied on bug #77694, and also patches a couple of the nasm '.s' files which generate text relocations due to non-PIC data. Ebuild modifications are needed to get the existing PIC patches to work, not just to apply this patch; ebuild patch to follow.
Created attachment 50845 [details, diff] Patch to 1.6.2-r3 ebuild, to apply PIC patch and fix other related ebuild problems This patch to the ebuild adds the patch in attachment id #50843 above. In addition, it sorts out some src_unpack problems: 1) patching configure.in (-nogtk and altivec-fix- patches) and the Makefile.am files (existing PIC patch) require autoreconf to be effective 2) the '-gcc34.patch' must be done after autoreconf as it patches configure rather than configure.in (it could be changed to modify configure.in, but for those that don't otherwise need autoreconf it's quicker to just patch configure). Lastly, the strip of fstack-protector that was added for earlier versions is removed from src_compile() as it builds fine here, and the unusual 'has_pie' section is removed - again, no problems here. I've built with "everything on" i.e. all use flags but -gtk (x86 p3 & athlon-xp, hardened/pic/pie), without problems.
video herd. ping..
Created attachment 52188 [details, diff] Updated patch to 1.6.2-r3 latest version (1.15), and fix gtk logic error Slight fix; got the logic upside down on gtk check. Updated to patch against current ebuild (where some of the src_unpack() issues have been mitigated recently by forcing the autoreconf stuff always - I've done things slightly differently here). Any comment (favourable or otherwise) from media-video would be appreciated.
It works: +3dnow +X +avi -debug -dv -gtk +mmx +pic +quicktime -sdl +sse -yv12 Portage 2.0.51.18 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.10-nitro4 i686) ================================================================= System uname: 2.6.10-nitro4 i686 AMD Athlon(TM) XP 1800+ Gentoo Base System version 1.6.9 ccache version 2.3 [enabled] CFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe"
patch works for me
Ahem...a fix for this would be nice. Anyone from media-video have a bit of time? Or hardened? Somebody? :) BTW...the ebuild patch no longer applies cleanly.
We've been waiting for media-video to respond for some time. If they show any interest, I'll re-work/re-check against current CVS.
Kevin, would be nice if you could update the patch once again. I'll review it then and I'm inclined to apply it.
Created attachment 56250 [details, diff] Patch against 1.6.2-r3 ebuild v1.21 Breakdown of changes: 1) Add "pic" to IUSE, so it can be used to conditionally apply the mmx patch 2) Add 'use pic && epatch ...' to apply the patch 3) Remove 'strip-flags -fstack-protector' - this was probably supposed to be filter-flags rather than strip-flags (which won't remove ssp on hardened systems). I haven't had any problems yet with ssp enabled. 4) Remove 'if has_pie' block. For info, the "right" way to do this is via 'filter-flags -fpie' but it's no longer necessary with this patch. The result is that on hardened systems, it builds PIC & PIE without any TEXTRELs instead of failing to build. On non-hardened systems, it should build exactly as before. The only 'use' flag I haven't built with is quicktime, but I don't think that should cause any trouble (see bug #85432).
hmm, just one thing. the pic useflag shouldnt be used, only by some toolchain packages.
Your right. This patch should be applied all the time and the option for mmx misbehaviors should be corrected for everybody. /usr/lib/libmplex2-1.6.so.0.2.2 and /usr/lib/libmpeg2encpp-1.6.so.0.2.2 both violate existing shared object q/a policy.
ok, thanks a lot guys. i've uploaded the patch to my devspace as it takes some time until it's available on all mirrors. i'll change SRC_URI in the ebuild in a few days to the mirror://gentoo location. thanks again!