Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134631 - xine-lib TEXTREL in xineplug_decode_mpeg2.so with USE altivec
Summary: xine-lib TEXTREL in xineplug_decode_mpeg2.so with USE altivec
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-28 06:33 UTC by Steffen
Modified: 2006-06-06 02:08 UTC (History)
3 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-28 06:33:47 UTC
Hello everybody,

If I compile xine-lib-1.1.2_pre20060328-r7 (and older versions, sorry I don't know when this started...) with USE=altivec I get a TEXTREL in usr/lib/xine/plugins/1.1.2/xineplug_decode_mpeg2.so.
If compiled without altivec I get no TEXTREL...

This is a problem because watching DVB(-T) is not possible with Kaffeine because it uses xine-lib for decoding and if I try to watch a channel i only get sound and no video because xineplug_decode_mpeg2.so can't be loaded and thus ffmpeg is beeing used, but it can't handle MPEG2 TS (Transport Streams) thus the screen is blank... :(

If I compile xine-lib without Altivec everything works but it's a bit slow... ;-)

scanelf -qT /usr/lib/xine/plugins/1.1.2/xineplug_decode_mpeg2.so says:

xineplug_decode_mpeg2.so: constants [0x5B92] in (NULL: fake?) [0x250C]
xineplug_decode_mpeg2.so: constants [0x5B9A] in (NULL: fake?) [0x250C]
xineplug_decode_mpeg2.so: constants [0x5E96] in (NULL: fake?) [0x250C]
xineplug_decode_mpeg2.so: constants [0x5E9E] in (NULL: fake?) [0x250C]
/usr/lib/xine/plugins/1.1.2/xineplug_decode_mpeg2.so

With older xine-lib versions (and an older gcc-4*) i got nearly the same (a few weeks before):

kaffeine --verbose shows: 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

and scanelf -qT:
xineplug_decode_mpeg2.so: constants [0x6506] in mpeg2_idct_copy_altivec [0x64F4]
xineplug_decode_mpeg2.so: constants [0x650E] in mpeg2_idct_copy_altivec [0x64F4]
xineplug_decode_mpeg2.so: constants [0x680A] in mpeg2_idct_add_altivec [0x67F4]
xineplug_decode_mpeg2.so: constants [0x6812] in mpeg2_idct_add_altivec [0x67F4]

So is there anybody who has the knowledge to fix this? :)
If you need some other info's or have a patch which needs testing, I'm happy to help you!

Thanks! Steffen

P.S.: 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 solar (RETIRED) gentoo-dev 2006-05-28 07:00:19 UTC
Till gentoo/ppc takes the secure plt patches there is probably not much point 
in exploring this. TEXTREL's are pretty much write operation in a
normally read only section of memory which cause the runtime linker to
have to do the hussle to work around it. On ppc however the entire
PT_LOAD is RWE so trying to fix this almost seems moot.

PPC Team: (please explore these patches)
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg01134.html
http://sources.redhat.com/ml/binutils/2005-05/msg00391.html
Comment 2 solar (RETIRED) gentoo-dev 2006-05-28 11:45:11 UTC
Steffen,
You should also file a new bug for the undefined symbol problem in 
xineplug_decode_mpeg2.so. It's seperate from general textrels and
probably a valid bug that should be fixed upstream.
Comment 3 Steffen 2006-05-28 13:25:28 UTC
Hi solar,

(In reply to comment #2)
> Steffen,
> You should also file a new bug for the undefined symbol problem in 
> xineplug_decode_mpeg2.so. It's seperate from general textrels and
> probably a valid bug that should be fixed upstream.
> 

what do you mean? Isn't the undefined symbol error the TEXTREL?
Or are these two seperate things? I thought it's the same problem because both scanelf and kaffeine tell me about symbols/constants and the "undefined symbol: constants" error is gone if the textrel "constants" is gone (USE="-altivec")...

So do you mean that I found two different bugs?

Btw. the kaffeine error is the same with the current xine-lib-1.1.2_pre20060328-r7!

thx,

Steffen
Comment 4 PaX Team 2006-05-28 16:00:33 UTC
(In reply to comment #3)
> what do you mean? Isn't the undefined symbol error the TEXTREL?
> Or are these two seperate things?

they're different things indeed. textrels are reported by emerge but that's only a warning. they cause failure only when you're running with a PaX kernel that has NOELFRELOCS enabled (hardened does it, i think), otherwise you won't see any problems at runtime either.

> I thought it's the same problem because both
> scanelf and kaffeine tell me about symbols/constants and the "undefined symbol:
> constants" error is gone if the textrel "constants" is gone (USE="-altivec")...
> 
> So do you mean that I found two different bugs?

looks like ;-). why the textrel info is related to the missing symbol is a good question, my guess is that the code in question is written in ppc assembly and someone forgot to export symbols from it.
Comment 5 Steffen 2006-05-29 04:23:23 UTC
Hi solar,

(In reply to comment #4)
> (In reply to comment #3)
> > what do you mean? Isn't the undefined symbol error the TEXTREL?
> > Or are these two seperate things?
> 
> they're different things indeed. textrels are reported by emerge but that's
> only a warning. they cause failure only when you're running with a PaX kernel
> that has NOELFRELOCS enabled (hardened does it, i think), otherwise you won't
> see any problems at runtime either.
> 
> > I thought it's the same problem because both
> > scanelf and kaffeine tell me about symbols/constants and the "undefined symbol:
> > constants" error is gone if the textrel "constants" is gone (USE="-altivec")...
> > 
> > So do you mean that I found two different bugs?
> 
> looks like ;-). why the textrel info is related to the missing symbol is a good
> question, my guess is that the code in question is written in ppc assembly
> and someone forgot to export symbols from it.
> 

here is the new bugreport for the missing symbol you wanted me to report:
http://bugs.gentoo.org/show_bug.cgi?id=134745

Thanks,

Steffen
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-06-06 02:08:35 UTC
This is fixed together with bug #134745 in -r11.