Summary: | mjpegtools-1.6.2-r3 causes an "motion.c:143: internal compiler error: asm clobber conflict with output operand" when compiling | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | krolden <jorre_vdb> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kevquinn, mike, solar |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 77694 | ||
Attachments: |
output file of compilation
Fixes allow motion.c to build Same as before, but with #ifdefs to preserve original code on non-pic Full patch, enabling simd-accel stuff with PIC. Patch to 1.6.2-r3 ebuild, to apply PIC patch and fix other related ebuild problems Updated patch to 1.6.2-r3 latest version (1.15), and fix gtk logic error Patch against 1.6.2-r3 ebuild v1.21 |
Description
krolden
2005-01-17 12:42:02 UTC
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! |