Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73342 - xine-lib-1_rc7 fails: mmx.h:74: error: PIC register `ebx' clobbered in `asm'
Summary: xine-lib-1_rc7 fails: mmx.h:74: error: PIC register `ebx' clobbered in `asm'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-04 07:31 UTC by Selecter
Modified: 2004-12-29 21:15 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch: fix PIC register `ebx' clobbered in `asm' compile failure (xine-lib-1.0-ebx-pix.patch,2.50 KB, patch)
2004-12-29 12:43 UTC, Allen Ibara
Details | Diff
new ebuild (xine-lib-1.0-r1.ebuild,8.02 KB, text/plain)
2004-12-29 12:44 UTC, Allen Ibara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Selecter 2004-12-04 07:31:30 UTC
make[4]: Leaving directory `/var/tmp/portage/xine-lib-1_rc7/work/xine-lib-1-rc7/src/post/planar'
Making all in goom
make[4]: Entering directory `/var/tmp/portage/xine-lib-1_rc7/work/xine-lib-1-rc7/src/post/goom'
if /bin/sh ../../../libtool-nofpic --mode=compile --tag=CC i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../include -I../../../include -I../../../src -I../../../src/xine-engine -I../../../src/xine-engine -I../../../src/xine-utils  -I../../../src/input -I../../../src/input    -I../../../lib -DHAVE_MMX   `echo -mtune=pentiumpro -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4  -mpreferred-stack-boundary=2 -fexpensive-optimizations -fschedule-insns2 -fno-strict-aliasing -ffast-math -funroll-loops -finline-functions -Wall -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE  -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g3 -O3 -march=pentium4 -ffast-math -fstrength-reduce -fstrict-aliasing -pipe -fno-web -funit-at-a-time -mno-sse2 -mno-sse3 -ffunction-sections | sed -e 's/-fomit-frame-pointer//g;s/-Os//g'` -MT mmx.lo -MD -MP -MF ".deps/mmx.Tpo" -c -o mmx.lo mmx.c; \
then mv -f ".deps/mmx.Tpo" ".deps/mmx.Plo"; else rm -f ".deps/mmx.Tpo"; exit 1; fi
mkdir .libs
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../include -I../../../include -I../../../src -I../../../src/xine-engine -I../../../src/xine-engine -I../../../src/xine-utils -I../../../src/input -I../../../src/input -I../../../lib -DHAVE_MMX -mtune=pentiumpro -O3 -pipe -falign-functions=4 -falign-loops=4 -falign-jumps=4 -mpreferred-stack-boundary=2 -fexpensive-optimizations -fschedule-insns2 -fno-strict-aliasing -ffast-math -funroll-loops -finline-functions -Wall -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g3 -O3 -march=pentium4 -ffast-math -fstrength-reduce -fstrict-aliasing -pipe -fno-web -funit-at-a-time -mno-sse2 -mno-sse3 -ffunction-sections -MT mmx.lo -MD -MP -MF .deps/mmx.Tpo -c mmx.c -o .libs/mmx.o
mmx.h: In function `mmx_supported':
mmx.h:74: error: PIC register `ebx' clobbered in `asm'
make[4]: *** [mmx.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/xine-lib-1_rc7/work/xine-lib-1-rc7/src/post/goom'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/xine-lib-1_rc7/work/xine-lib-1-rc7/src/post'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/xine-lib-1_rc7/work/xine-lib-1-rc7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xine-lib-1_rc7/work/xine-lib-1-rc7'
make: *** [all] Error 2

!!! ERROR: media-libs/xine-lib-1_rc7 failed.
!!! Function src_compile, Line 149, Exitcode 2
!!! Parallel make failed
!!! If you need support, post the topmost build error, NOT this status message.

Reproducible: Always
Steps to Reproduce:




nasm-0.98.38

Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9y i686)
=================================================================
System uname: 2.6.9y i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
Gentoo Base System version 1.6.6
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Dec  3 2004, 21:19:04)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r1, 2.14.90.0.8-r1
sys-devel/libtool:   1.5.10
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-g3 -O3 -march=pentium4 -ffast-math -fstrength-reduce -fstrict-aliasing
-pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /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="-g -O3 -march=pentium4 -ffast-math -fstrength-reduce -fstrict-aliasing
-pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg distlocks nostrip sfperms"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo
http://ftp.du.se/pub/os/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 arts avi bitmap-fonts crypt cups debug encode f77 fam
flac gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod
mmx mmx2 motif mozilla mpeg ncurses nls nptl nptlonly nvidia oggvorbis opengl
pam pdflib perl png ppds python qt quicktime readline real sdl slang spell sse
sse2 ssl tcpd tiff truetype unicode userlocales x86 xml xml2 xv zlib linguas_ru"
Comment 1 Selecter 2004-12-04 08:28:11 UTC
>>> Unpacking xine-lib-1-rc7.tar.gz to /var/tmp/portage/xine-lib-1_rc7/work
 * Applying xine-lib-1_rc7-2.6.patch ...                                                                              [ ok ]
 * Patching ${S}/ltmain.sh ...
 *   Applying portage-1.4.1.patch ...
 *   Applying max_cmd_len-1.5.0.patch ...
 * Applying uClibc/libtool patches ...
 * Applying xine-lib-1_rc7-pic.patch ...                                                                              [ ok ]
QA Notice: USE Flag 'pic' not in IUSE for media-libs/xine-lib-1_rc7
>>> Source unpacked.
Comment 2 Selecter 2004-12-04 08:36:27 UTC
1) Edited an ebuild:

- use pic && epatch ${FILESDIR}/${P}-mmx.patch
+ epatch ${FILESDIR}/${P}-mmx.patch

and mmx patch was applied (mmx and pic was disabled)

2) Default ebuild

QA Notice: USE Flag 'pic' not in IUSE for media-libs/xine-lib-1_rc7

3) Adding pic to IUSE

"true" instead of 'QA Notice: USE Flag 'pic' not in IUSE for media-libs/xine-lib-1_rc7' and no mmx patch applied
Comment 3 Alexey Parshin 2004-12-10 10:41:16 UTC
same here :(
Comment 4 Tro 2004-12-14 22:17:26 UTC
Same here. I've tried the libtool fix script suggested in #70759, but it didn't make a difference.

Portage 2.0.51-r8 (default-linux/x86/2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9 i686)
=================================================================
System uname: 2.6.9 i686 Mobile Intel(R) Pentium(R) 4     CPU 2.80GHz
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov  6 2004, 18:01:00)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r1
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer -fstack-protector"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/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/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks moo sandbox sfperms"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://adelie.polymtl.ca/ http://gentoo.mirrors.pair.com/ http://gentoo.seren.com/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/poverlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 acpi aim alsa apm arts artswrappersuid avantgo avi berkdb bigger-fonts bitmap-fonts bootspla bootsplash bzlib cddb cdparanoia cdr cdromclient codecs crypt cups curl curlwrappers dba dbx debug divx4linux dv dvd dvdread emacs encode escreen exif f77 faac faad fam fbcon flac foomaticdb fortran freetype gd gdbm gif gimpprint gnutls gphoto2 gpm gs gstreamer gtk gtk2 gtkhtml icq idea imagemagick imap imlib ipv6 jabber java javascript jikes jpeg junit kde ldap libg++ libwww lm_sensors mad maildir mailwrapper md5sum mikmod mime motif mozilla moznocompose moznoirc moznomail moznoxft mp3 mpeg mpeg4 mplayer msn ncurses network nls nntp nvidia odbc oggvorbis ooo-kde opengl operanom2 oscar oss pam pcmcia pcre pda pdf pdflib perl png pnp povray prelude python qt quicktime radeon readline real ruby samba scanner sdl silc slang smime speedo spell ssl svga tcltk tcpd tidy tiff transcode truetype type1 unicode usb v4l vim-with-x wifi x86 xine xml xml2 xmlrpc xmms xscreensaver xv xvid xvmc zlib"
Comment 5 augury@vampares.org 2004-12-17 02:15:58 UTC
i think you can add it to the config file loading xine as a do-not-load but there is config for everything that loads it and its self though.
Comment 6 Tro 2004-12-29 10:30:33 UTC
Same problem persists with xine-lib-1.0. :(
Comment 7 Chris White (RETIRED) gentoo-dev 2004-12-29 10:54:54 UTC
Let me try something here... can you guys emerge sync to verify the latest xine-lib and then, manually editing the xine-lib 1.0 ebuild change this:

        $(use_enable opengl) \
        $(use_enable aac faad) \
        #$(use_with ffmpeg external-ffmpeg) \
        #$(use_with dvdnav external-dvdnav) \

to this:

        $(use_enable opengl) \
        $(use_enable aac faad) \
        #$(use_with ffmpeg external-ffmpeg) \
        #$(use_with dvdnav external-dvdnav) \
        --disable-ffmmx \

and tell me if it works.
Comment 8 Allen Ibara 2004-12-29 12:40:58 UTC
I hit this same error compiling xine-lib 1.0 (USE=hardened ~x86).

Rather than disable MMX I made a patch to fix this compile failure.
I've tested this patch and confirmed xine-lib builds and works at least on
my system. I will attach the patch and ebuild below, hopefully it will
work for others too.

Background:
As near as I can tell, gcc needs the ebx register for generating
posistion independent code. A few functions in goom (an audio visualization
plugin included within xine-lib) use inline asm statements which clobber ebx.
All the patch does is change these asm statements to avoid clobbering ebx. In
one case, it was necessary to save/restore ebx on the stack, for the others
it's possible to just use edx in place of ebx.
Comment 9 Allen Ibara 2004-12-29 12:43:07 UTC
Created attachment 47148 [details, diff]
Patch: fix PIC register `ebx' clobbered in `asm' compile failure
Comment 10 Allen Ibara 2004-12-29 12:44:40 UTC
Created attachment 47150 [details]
new ebuild
Comment 11 Tro 2004-12-29 17:54:46 UTC
Allen Ibara's patch and ebuild worked for me. :)
Comment 12 Chris White (RETIRED) gentoo-dev 2004-12-29 20:29:58 UTC
Comment on attachment 47150 [details]
new ebuild

Help if I could spell text/plain :).
Comment 13 Chris White (RETIRED) gentoo-dev 2004-12-29 21:15:56 UTC
Wiggy, works like a charm :).  Compiles on hardened gcc and works for me on rendering video and playing audio.  Thanks for posting!