Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134745 - media-libs/xine-lib: xineplug_decode_mpeg2.so: undefined symbol: constants (when compiled with USE="altivec")
Summary: media-libs/xine-lib: xineplug_decode_mpeg2.so: undefined symbol: constants (w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-29 04:19 UTC by Steffen
Modified: 2006-06-06 09:04 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen 2006-05-29 04:19:27 UTC
Hello everybody,

If I compile media-libs/xine-lib-1.1.2_pre20060328-r7 with USE="altivec" I get the following error when trying to use the mpeg2 decoder:

kaffeine --verbose:
load_plugins: cannot open plugin lib
/usr/lib/xine/plugins/1.1.2/xineplug_decode_
mpeg2.so: /usr/lib/xine/plugins/1.1.2/xineplug_decode_mpeg2.so: undefined
symbol: constants

This is a problem because not every mpeg2 file can be played with the ffmpeg decoder, for example mpeg2 ts files which are used with DVB...

Without USE="altivec" the error is gone and the plugin (and thus watching DVB(-T) video) works, but is of course slower... ;-)

Please also have a look at my other bugreport, it may be related...
http://bugs.gentoo.org/show_bug.cgi?id=134631

Thanks for your help,

Steffen

P.S.: If you need more information or a tester for patches, just tell me! :)

My emerge --info + xine-lib USE:

[ebuild   R   ] media-libs/xine-lib-1.1.2_pre20060328-r7  USE="X aac alsa
altivec dvd fbcon ffmpeg flac mad nls opengl theora vcd vorbis xv -a52 -aalib
-arts -asf -debug -directfb -dts -dxr3 -esd -gnome -imagemagick -ipv6 -libcaca
-mng -modplug -oss -samba -sdl -speex -v4l -vidix -xinerama" VIDEO_CARDS="-i810
-via" 0 kB

Portage 2.1_rc3 (default-linux/ppc/ppc32/2006.0/G4, gcc-4.1.1, glibc-2.3.6-r4,
2.6.16-gentoo-r8-macmini ppc)
=================================================================
System uname: 2.6.16-gentoo-r8-macmini ppc 7447A, altivec supported
Gentoo Base System version 1.12.0
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r1
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mtune=G4 -mcpu=G4 -maltivec -mabi=altivec -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/devel/env /usr/kde/devel/share/config
/usr/kde/devel/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo
/etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -mtune=G4 -mcpu=G4 -maltivec -mabi=altivec -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.gentoo.mesh-solutions.com/gentoo"
LANG="de_DE.UTF-8"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/kde-live /usr/local/overlays/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="ppc X aac alsa altivec apache2 apm bash-completion bitmap-fonts bluetooth
bonobo bzip2 cairo cdparanoia cdr cli crypt cups dri dv dvb dvd dvdr dvdread
encode exif fam fastcgi fbcon ffmpeg flac foomaticdb ftp gif glitz gpm gs gtk2
gtkhtml idn ieee1394 imap isdnlog jabber jack javascript jpeg kde
kdeenablefinal libg++ libwww mad matroska motif mp3 mpeg mysql ncurses nls nptl
ogg opengl pam pcre pdf pdflib perl php png pppd python qt readline reflection
ruby session skey sockets socks5 spell spl ssl svg tcpd theora threads tidy
tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vorbis wifi
xcomposite xine xml xorg xv xvid zlib elibc_glibc input_devices_keyboard
input_devices_mouse kernel_linux linguas_de linguas_en userland_GNU
video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 PaX Team 2006-05-29 07:56:39 UTC
from a quick look, the culprit is probably in src/libmpeg2/idct_altivec.c that has inline asm versions of some functions. i'm not sure what the point of this asm is as the comment on top says that it was basically generated by gcc itself...

anyway, one explanation for the missing symbol could be that some optimization in gcc 3.4+ simply omits the 'constants' array from the object file as it is not actually used for any meaningful purpose, as far as the compiler is concerned (note that there's a feeble attempt at introducing a dummy 'use' by reading out the first member, but gcc is smarter than that ;-). proper solution would be to add 'constants' to the input constraints of the asm block, or better, not use this old gcc generated asm at all, i can hardly imagine that it's better than what a current compiler can generate.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-06-06 02:08:11 UTC
Thanks for reporting, I was able to get lu_zero rewriting the altivec code so that it works correctly, so it's fixed in -r11 now.
Comment 3 Steffen 2006-06-06 09:04:06 UTC
Thanks Diego and lu_zero and the PaX Team,

I just tried it and it works like a champ!

No Textrels are left in -r11 and the Altivec code works great,
the CPU usage dropped significantly!

Greetings,

Steffen

(In reply to comment #2)
> Thanks for reporting, I was able to get lu_zero rewriting the altivec code so
> that it works correctly, so it's fixed in -r11 now.
>