Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75818 - mplayer-1.0pre6 fails to build
Summary: mplayer-1.0pre6 fails to build
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-27 10:07 UTC by Brian O'Reilly
Modified: 2005-02-18 02:59 UTC (History)
1 user (show)

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


Attachments
mplayer-osd.patch (mplayer-osd.patch,284 bytes, patch)
2005-01-03 17:04 UTC, Chris White (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian O'Reilly 2004-12-27 10:07:44 UTC
doing a system upgrade, mplayer schedule for update. The ebuild fails
spectacularly in the compiler:

In file included from aclib.c:108:
aclib_template.c: In function `fast_memcpy_SSE':
aclib_template.c:202: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:203: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:224: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:225: warning: use of cast expressions as lvalues is deprecated
aclib_template.c: In function `mem2agpcpy_SSE':
aclib_template.c:427: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:428: warning: use of cast expressions as lvalues is deprecated
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include  -march=k8 -pipe -frename-registers -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I. -I.. -I../osdep -I/usr/include/freetype2 -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include   -DMPG12PLAY  -o osd.o osd.c
{standard input}: Assembler messages:
{standard input}:582: Error: can't encode register '%ch' in an instruction requiring REX prefix.
{standard input}:583: Error: can't encode register '%ah' in an instruction requiring REX prefix.
{standard input}:584: Error: can't encode register '%dh' in an instruction requiring REX prefix.
make[1]: *** [osd.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/mplayer-1.0_pre6/work/MPlayer-1.0pre6/libvo'
make: *** [libvo/libvo.a] Error 2

system info:

infiltrator ~ # gcc -v
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/specs
Configured with: /var/tmp/portage/gcc-3.4.3-r1/work/gcc-3.4.3/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3 --host=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-shared --enable-threads=posix --enable-multilib --disable-libgcj --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)


infiltrator ~ # emerge info
Portage 2.0.51-r8 (gcc34-amd64-2004.1, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r12 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r12 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov  7 2004, 15:10:38)]
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-r2
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
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/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/env.d"
CXXFLAGS="-march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/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 amd64 apm arts avi berkdb bitmap-fonts bonobo cdparanoia cdr crypt cups dvd encode f77 foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml guile imlib jabber jack jpeg kde ldap libg++ libwww maildir mikmod motif mozilla mpeg multilib ncurses network nls oggvorbis opengl oss pam pda pdflib perl pic png postgres python qt quicktime readline sdl slang spell ssl tcltk tcpd tetex truetype xine xml2 xmms xv zlib"



Reproducible: Always
Steps to Reproduce:
1. emerge mplayer
2.
3.

Actual Results:  
build fails

Expected Results:  
mplayer should have built and installed
Comment 1 Chris White (RETIRED) gentoo-dev 2004-12-27 19:57:18 UTC
Hmm ok.. that is indeed spectacular.  Try manually editing out the line with "append-flags -frename-registers" in the ebuild and see if it works.  This was supposed to fix some quicktime weirdness but I need to make sure it's not causing funky stuff on other systems.
Comment 2 Brian O'Reilly 2005-01-02 10:38:11 UTC
modified ebuild, as per your request, but still getting compiler failures:

cc -c -I../libvo -I../../libvo -I/usr/X11R6/include  -march=k8 -pipe -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I. -I.. -I../osdep -I/usr/include/freetype2 -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include   -DMPG12PLAY  -o aclib.o aclib.c
In file included from aclib.c:108:
aclib_template.c: In function `fast_memcpy_SSE':
aclib_template.c:202: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:203: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:224: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:225: warning: use of cast expressions as lvalues is deprecated
aclib_template.c: In function `mem2agpcpy_SSE':
aclib_template.c:427: warning: use of cast expressions as lvalues is deprecated
aclib_template.c:428: warning: use of cast expressions as lvalues is deprecated
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include  -march=k8 -pipe -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I. -I.. -I../osdep -I/usr/include/freetype2 -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include   -DMPG12PLAY  -o osd.o osd.c
{standard input}: Assembler messages:
{standard input}:582: Error: can't encode register '%ch' in an instruction requiring REX prefix.
{standard input}:583: Error: can't encode register '%ah' in an instruction requiring REX prefix.
{standard input}:584: Error: can't encode register '%dh' in an instruction requiring REX prefix.
make[1]: *** [osd.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/mplayer-1.0_pre6/work/MPlayer-1.0pre6/libvo'
make: *** [libvo/libvo.a] Error 2
Comment 3 Chris White (RETIRED) gentoo-dev 2005-01-02 19:52:42 UTC
Ok, this is really hard to explain, but I'll try...  Apparently the ch register in amd64 systems cannot be used as an operhand if the REX register is being in use.. from what I understand, the REX register holds a bit that tells whether the operand is 32 or 64 bit.  ASM strangeness at its best!  More information here:

http://www.tortall.net/projects/yasm/wiki/AMD64

as for the fix though.. that will be interesting, as I haven't really had to deal with 64 bit asm.  If any of the amd64 team can explain things better/can deal with the code better, please stand up :P.
Comment 4 Chris White (RETIRED) gentoo-dev 2005-01-03 17:04:31 UTC
Created attachment 47538 [details, diff]
mplayer-osd.patch

Try this patch here.  Add:

epatch ${FILESDIR}/${PN}-osd.patch

somewhere in src_unpack.
Comment 5 Chris White (RETIRED) gentoo-dev 2005-01-29 23:20:53 UTC
Need test request.
Comment 6 Homer Parker (RETIRED) gentoo-dev 2005-02-01 16:10:00 UTC
My mplayer-1.0pre6 worked fine before the patch, afterwards I get:

cc -I../libvo -I../../libvo -I/usr/X11R6/include  -march=k8 -mtune=k8 -O2 -pipe -frename-registers -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib64/glib/include -I/usr/X11R6/include -I. -I/usr/include/freetype2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib64/glib/include -I/usr/X11R6/include  -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include       -o mencoder mencoder.o mp_msg-mencoder.o cpudetect.o codec-cfg.o spudec.o playtree.o playtreeparser.o asxparser.o vobsub.o subreader.o sub_cc.o find_sub.o m_config.o m_option.o parser-cfg.o m_struct.o edl.o unrarlib.o libao2/afmt.o divx4_vbr.o libvo/aclib.o libvo/osd.o libvo/sub.o libvo/font_load.o libvo/font_load_ft.o xvid_vbr.o parser-mecmd.o libmpcodecs/libmpencoders.a -lmp3lame -lvorbis -logg libmpcodecs/libmpcodecs.a   libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a -ldvdread libavcodec/libavcodec.a libavformat/libavformat.a   -lvorbis -logg   -lfaad  -lmp3lame -lvorbis -logg -lxvidcore -lm  -lpng -lz -lz -ljpeg -lasound -ldl -lpthread /usr/lib/libxmms.so.1 -export-dynamic  -L/usr/lib64 -Wl,--rpath -Wl,/usr/lib64 -lfreetype -lz   -lnsl  -lgif  -lsmbclient  -L/usr/lib64 -lfontconfig    mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a     -lpthread -ldl    -lm
libvo/osd.o(.text+0x3): In function `vo_draw_alpha_yv12':
: undefined reference to `vo_draw_alpha_yv12_X86'
libvo/osd.o(.text+0x13): In function `vo_draw_alpha_yuy2':
: undefined reference to `vo_draw_alpha_yuy2_X86'
libvo/osd.o(.text+0x23): In function `vo_draw_alpha_uyvy':
: undefined reference to `vo_draw_alpha_uyvy_X86'
libvo/osd.o(.text+0x33): In function `vo_draw_alpha_rgb24':
: undefined reference to `vo_draw_alpha_rgb24_X86'
libvo/osd.o(.text+0x43): In function `vo_draw_alpha_rgb32':
: undefined reference to `vo_draw_alpha_rgb32_X86'
collect2: ld returned 1 exit status
make: *** [mencoder] Error 1
make: *** Waiting for unfinished jobs....
libvo/libvo.a(osd.o)(.text+0x3): In function `vo_draw_alpha_yv12':
: undefined reference to `vo_draw_alpha_yv12_X86'
libvo/libvo.a(osd.o)(.text+0x13): In function `vo_draw_alpha_yuy2':
: undefined reference to `vo_draw_alpha_yuy2_X86'
libvo/libvo.a(osd.o)(.text+0x23): In function `vo_draw_alpha_uyvy':
: undefined reference to `vo_draw_alpha_uyvy_X86'
libvo/libvo.a(osd.o)(.text+0x33): In function `vo_draw_alpha_rgb24':
: undefined reference to `vo_draw_alpha_rgb24_X86'
libvo/libvo.a(osd.o)(.text+0x43): In function `vo_draw_alpha_rgb32':
: undefined reference to `vo_draw_alpha_rgb32_X86'
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1


emerge --info
Portage 2.0.51-r15 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.10-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Jan 30 2005, 21:39:15)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4, 1.8.5-r3
sys-devel/binutils:  2.15.90.0.1.1-r3, 2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -mtune=k8 -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-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/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -mtune=k8 -fomit-frame-pointer -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox"
GENTOO_MIRRORS="ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://mirrors.tds.net/gentoo ftp://gentoo.ccccom.com"
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="amd64 X acpi alsa bash-completion berkdb bitmap-fonts bonobo bzip2 bzlib cdr crypt css cups dga directfb divx4linux dvd dvdread encode esd ethereal exif f77 fam fbcon flac foomaticdb fortran gdbm geoip gif gimpprint gmp gnome gnomedb gphoto2 gps gstreamer gtk gtk2 gtkhtml howl icq ieee1394 imagemagick imap imlib jabber jp2 jpeg lzw lzw-tiff memlimit mozilla moznocompose moznoirc moznomail mpeg mpi msession msn multislot ncurses nls no-old-linux nodrm nptl nptlonly offensive oggvorbis opengl oscar oss pam pcmcia pcntl pcre pdflib perl pic png pnp posix ppds pthreads python quicktime readline samba sasl sdl session slp speex spell ssl sysvipc szip tcltk tcpd tidy tiff truetype truetype-fonts type1-fonts usb userlocales vim-with-x wxwindows xml2 xmms xpm xrandr xv xvid xvmc yahoo zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 7 Reimar Döffinger 2005-02-18 02:59:03 UTC
From what I can see, the code that uses the ch etc registers is only compiled in when mmx and/orr mmx2 support is disabled. Maybe post your config.h (and if #define HAV_MMX 1 is not contained, try to find out why and/or also post your configure.log)