Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 78404
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: media-video herd <media-video@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: krolden <jorre_vdb@hotmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ccUWnj5K.out output file of compilation text/plain krolden 2005-01-17 12:45 0000 92.13 KB Details
motion.c-pic.patch Fixes allow motion.c to build patch Kevin F. Quinn (RETIRED) 2005-01-29 06:29 0000 18.62 KB Details | Diff
motion.c-pic.patch Same as before, but with #ifdefs to preserve original code on non-pic patch Kevin F. Quinn (RETIRED) 2005-01-29 08:18 0000 19.54 KB Details | Diff
mjpegtools-1.6.2-mmx-fPIC.patch Full patch, enabling simd-accel stuff with PIC. patch Kevin F. Quinn (RETIRED) 2005-02-09 11:04 0000 25.31 KB Details | Diff
mv-mj-ebuild.patch Patch to 1.6.2-r3 ebuild, to apply PIC patch and fix other related ebuild problems patch Kevin F. Quinn (RETIRED) 2005-02-09 11:24 0000 3.30 KB Details | Diff
mjpegtools-picebuild.patch Updated patch to 1.6.2-r3 latest version (1.15), and fix gtk logic error patch Kevin F. Quinn (RETIRED) 2005-02-26 09:22 0000 2.62 KB Details | Diff
mjpegtools-1.6.2-r3.ebuild-PIC.patch Patch against 1.6.2-r3 ebuild v1.21 patch Kevin F. Quinn (RETIRED) 2005-04-14 05:37 0000 1.70 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 78404 depends on: Show dependency tree
Bug 78404 blocks: 77694
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-01-17 12:42 0000
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"

------- Comment #1 From krolden 2005-01-17 12:45:50 0000 -------
Created an attachment (id=48775) [details]
output file of compilation

Suggested by portae to include this file.

------- Comment #2 From Kevin F. Quinn (RETIRED) 2005-01-29 06:29:08 0000 -------
Created an attachment (id=49827) [details]
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.

------- Comment #3 From solar 2005-01-29 07:59:52 0000 -------
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 

------- Comment #4 From Kevin F. Quinn (RETIRED) 2005-01-29 08:18:52 0000 -------
Created an attachment (id=49839) [details]
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.

------- Comment #5 From Kevin F. Quinn (RETIRED) 2005-02-09 11:04:07 0000 -------
Created an attachment (id=50843) [details]
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.

------- Comment #6 From Kevin F. Quinn (RETIRED) 2005-02-09 11:24:06 0000 -------
Created an attachment (id=50845) [details]
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.

------- Comment #7 From solar 2005-02-16 19:00:45 0000 -------
video herd. ping..

------- Comment #8 From Kevin F. Quinn (RETIRED) 2005-02-26 09:22:52 0000 -------
Created an attachment (id=52188) [details]
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.

------- Comment #9 From César Fernández 2005-03-01 10:04:58 0000 -------
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"

------- Comment #10 From Bart Lauwers (RETIRED) 2005-03-08 08:29:52 0000 -------
patch works for me

------- Comment #11 From Mike Nerone 2005-04-12 21:38:10 0000 -------
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.

------- Comment #12 From Kevin F. Quinn (RETIRED) 2005-04-13 04:10:25 0000 -------
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.

------- Comment #13 From Jan Brinkmann (RETIRED) 2005-04-13 10:27:41 0000 -------
Kevin, would be nice if you could update the patch once again. I'll review it
then and I'm inclined to apply it.

------- Comment #14 From Kevin F. Quinn (RETIRED) 2005-04-14 05:37:54 0000 -------
Created an attachment (id=56250) [details]
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).

------- Comment #15 From Jan Brinkmann (RETIRED) 2005-04-17 12:37:44 0000 -------
hmm, just one thing. the pic useflag shouldnt be used, only by some toolchain
packages.

------- Comment #16 From solar 2005-04-17 13:34:11 0000 -------
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.

------- Comment #17 From Jan Brinkmann (RETIRED) 2005-04-17 13:58:46 0000 -------
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!

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug