Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 81372

Summary: EBUILD: media-tv/mythtv-0.16.20050115 viaXvMC (cle266) support
Product: Gentoo Linux Reporter: Michael Trowbridge <deepshag>
Component: New packagesAssignee: Television related Applications in Gentoo's Portage <media-tv>
Status: RESOLVED FIXED    
Severity: major Keywords: InVCS
Priority: Low    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://sourceforge.net/project/shownotes.php?release_id=266463
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to fix the via XvMC support in ebuild mythtv-0.16.20050115.ebuild

Description Michael Trowbridge 2005-02-09 07:24:05 UTC
SYMPTOMS:  Ebuild appears to compile normally, free of errors, but when user attempts to play a recorded program or view live TV, mythfrontend crashes entirely, and returns error messages indicating that it failed to initialize the  XvMC control.

SCOPE:  Affects gentoo users running MythTV on an computer using the Via CLE266 hardware MPEG decoder.  Primary users of the Via Epia mini-ITX motherboard family.

This one took me a minute to track down, but there is an error in the use of sed to uncomment lines in the file settings.pro (located /var/tmp/portage/mythtv-0.16.20050115/work/mythtv/settings.pro).  It should be noted also that the settings.pro included with mythtv-0.16 is non-standard to start with, and not all of the via XvMC lines start out commented out, like they should (to make it like the nvidia XvMC lines).  

The original calls from the ebuild are (lines 131-140):
  if use cle266 ; then
    sed -e 's:#EXTRA_LIBS += -lviaXvMC -lXvMC:EXTRA_LIBS += -lviaXvMC -lXvMC:' \
      -i 'settings.pro' || die "enable cle266 sed failed"
  fi

  if ! use cle266 ; then
    sed -e 's:CONFIG += using_xvmc using_xvmc_vld:#CONFIG += using_xvmc using_xvmc_vld:' \
      -e 's:DEFINES += USING_XVMC USING_XVMC_VLD:#DEFINES += USING_XVMC USING_XVMC_VLD:' \
      -i 'settings.pro' || die "disable VLD XvMC sed failed"
  fi

Should be replaced with:
  if use cle266 ; then
    sed -e 's:#CONFIG += using_xvmc using_xvmc_vld:CONFIG += using_xvmc using_xvmc_vld:' \
      -e 's:#DEFINES += USING_XVMC USING_XVMC_VLD:DEFINES += USING_XVMC USING_XVMC_VLD:' \
      -e 's:#EXTRA_LIBS += -lviaXvMC -lXvMC:EXTRA_LIBS += -lviaXvMC -lXvMC:' \
      -i 'settings.pro' || die "enable cle266 sed failed"
  fi

  if ! use cle266 ; then # needed because nvidia and cle266 are not compatible
    sed -e 's:EXTRA_LIBS += -lviaXvMC -lXvMC:#EXTRA_LIBS += -lviaXvMC -lXvMC:' \
      -i 'settings.pro' || die "disable VLD XvMC sed failed"
  fi

I tested this ebuild after making these changes, and was able to successfully build mythtv 0.16 with viaXvMC support, and it acted normally (didn't crash as soon as it attempted an XvMC call).
Comment 1 Michael Trowbridge 2005-02-09 07:39:41 UTC
Created attachment 50831 [details, diff]
Patch to fix the via XvMC support in ebuild mythtv-0.16.20050115.ebuild
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2005-02-09 23:25:08 UTC
Thanks. In CVS.
Comment 3 Anders Hellgren gentoo-dev 2005-02-10 06:36:22 UTC
This fix breaks USE="nvidia -cle266", as the nvidia sed matches also the XvMC_VLD support. It results in the following settings.pro.

# XvMC support, modify as necessary.
CONFIG += using_xvmc
DEFINES += USING_XVMC
EXTRA_LIBS += -lXvMCNVIDIA -lXvMC

# XvMC_VLD support, modify as necessary. Incompatible with normal XvMC support.
CONFIG += using_xvmc using_xvmc_vld
DEFINES += USING_XVMC USING_XVMC_VLD
##EXTRA_LIBS += -lviaXvMC -lXvMC

Mythtv consequently fails to compile due to 

xvmc_render.h:13:36: X11/extensions/vldXvMC.h: No such file or directory

while compiling vmcvldvideo.c

The ! use cle266 case needs to be restored to its previous state.