Xbox Frontend Compile with SVN

From MythTV Official Wiki
Revision as of 16:59, 13 August 2006 by Antone (talk | contribs) (Add experimental (etch) branch of Xebian to sources: Added fix for apt MMap out of room error)

Jump to: navigation, search


  • based on the email by AJM who noted down the steps he used
  • original WIKI by Richard Dale Feb 2006

Xbox Frontend Compile with SVN HOWTO

This HOWTO assumes that you are using the Xebian 1.1.4 xbox edition.

Install Xebian 1.1.4

Use the Xebian Howto for details.

Approximate time needed for this step: 30 minutes

Xebian Stable - Run an update then an upgrade

Approximate time for this step: 15 minutes (requires around 90MB of downloads)

By default, Xebian 1.1.4 uses the stable respositories. Let's get all of the modules updated in the stable distribution then upgrade any stable modules too. To do this update then upgrade, Xebian looks at the file /etc/apt/sources.list then contacts the Internet to download the modules.

Xebian 1.1.4 is based upon Debian 3.1. Unfortunately Xebian didn't update the apt sources correctly to remove the Debian non-US sources which are now obsolete. Xebian appears to have the .AT (Austrian) mirrors preconfigured too.

You should be logged in as root.

If you are in the US, edit the file /etc/apt/sources.list so it looks like this:

 deb stable main contrib non-free
 deb-src stable main contrib non-free
 deb stable/updates main contrib non-free
 deb-src stable/updates main contrib non-free

If you not in the US, it will be far quicker if you use a local mirror site. See the Debian Mirrors page.

For example, in Australia, I use:

 deb stable main contrib non-free
 deb-src stable main contrib non-free
 deb stable/updates main contrib non-free
 deb-src stable/updates main contrib non-free

After modifying the sources, run:

apt-get update


apt-get upgrade

During the upgrade, you will be asked whether you wish to Use the kernel framebuffer device interface for xserver-xfree86. Say Yes. Here's why: The Xebian 1.1.4 distribution had it enabled in the file /etc/X11/XF86Config-4, so we think you should too.

Add experimental (etch) branch of Xebian to sources

In this step we tell Xebian to use the experimental branch of Xebian for obtaining our prerequisite modules for MythTV. This experimental branch is required for us to compile MythTV SVN. We will also add the Marillat source, which is required for MythTV.

Edit /etc/apt/sources.list and add the following lines if you are a US user:

 deb testing main contrib non-free
 deb-src testing main contrib non-free
 deb sid main contrib non-free
 deb-src sid main contrib non-free

 deb sid main
 deb-src sid main

If you're a non-US see the previous step for mirror sites. eg. For Australia, I used:

 deb stable main contrib non-free
 deb-src stable main contrib non-free
 # Security
 deb stable/updates main contrib non-free
 deb-src stable/updates main contrib non-free
 # Etch
 deb etch main contrib non-free
 deb-src etch main contrib non-free
 # Marillat
 deb sarge main
 deb-src sarge main
 deb etch main
 deb-src etch main

Run apt update to get the new package lists

apt-get update

Approximate time for this step: 5 minutes

Note: If you receive an error such as "E: Dynamic MMap ran out of room", try creating the file /etc/apt/apt.conf.d/00Cache with the following contents:

APT::Default-Release "stable";
APT::Cache-Limit "141943904";

Then execute an apt-get clean and apt-get update.

Install dependencies for building MythTV

MythTV relies on a number of libraries (eg for displaying graphics images, decoding MP3 soundtracks etc.). We can run the following to get most of the dependencies:

apt-get install libdbd-mysql-perl libdbi-perl libmysqlclient12 libnet-daemon-perl libplrpc-perl mysql-client mysql-common pwgen ttf-freefont
apt-get install qt3-dev-tools liblame-dev liblame0 liblircclient-dev alsa-oss libqt3-mt-dev libqt3-mt-dev gcc g++ libqt3-mt-mysql libqt3-i18n
apt-get install subversion
apt-get install distcc
apt-get install libqt3-compat-headers 
apt-get install xmltv 

When I was trying to figure out dependencies I also installed/upgraded the following. I'm not sure if all of them are required though.

apt-get install xlibs xlibs-data xfwp x-dev xvkbd 
apt-get install libxft-dev libxft1 libxft2 libxi-dev libxi6 libxmu-dev libxmu6 
apt-get install libxaw7 libxext-dev libxext6 libxmuu1 libxp6 libxpm4 
apt-get install libxrandr-dev libxrandr2 libxt-dev libxt6 libxtrap6 libxtst6 libxv-dev libxv1 
apt-get install xaw3dg xfonts-100dpi xfonts-75dpi
apt-get install xvfb xfs xlibmesa-dri libxxf86vm1 libxxf86vm-dev xfonts-scalable xfonts-base  x-window-system 
apt-get install imlib1 libc6-dev libncurses5-dev libasound2-dev
apt-get install libfreetype6 libfreetype6-dev libstdc++5 libstdc++5-3.3-dev
apt-get install xlibmesa-gl xlibmesa-gl-dev libglib1.2 

If, during this process, you are asked which X Server to use, then there's probably been too many packages upgrade. You should elect xfree86 NOT xserver-org, as xserver-org hasn't yet been released as a working package for use with the xbox (as at 7 March 2006 anyway).

Then reboot for good measure since many of the fundamental libraries have been upgraded.

shutdown -r now

At this time, it may be an opportune time to backup your Xbox Xebian file system so you don't need to go through the above steps and downloads in the event of something bad happening. If you used the GameSave partition in the Xebian installation, you can boot back to your dashboard (which hopefully has an FTP server) then transfer the rootfs file from E:\debian\ to somewhere else.

The following _might_ need to be run as well - not sure yet

apt-get install alsa-base alsa-utils alsa-oss udev 

Approximate time for this step: 30 minutes (200+MB downloaded)

Install subversion and MythTV source code

Install subversion on the Xbox:

apt-get install subversion

Download MythTV source code SVN, plugins and themes /usr/src directory

 cd /usr/src
 mkdir mythtv
 cd mythtv
 svn co 
 svn co
 svn co

Install distcc (optional, but recommend)

The Xbox is underpowered and lacking RAM to do compiling. By using distcc we can use the resources of other Linux boxes on the network to compile MythTV.

Install distcc on your xbox by:

apt-get install distcc

You must start the distccd on the Xbox with:

distccd --daemon --allow

Install distcc on each of your other Linux systems. The binaries are small and can be downloaded from here. I had success with the Red Hat/Fedora DistCC RPMS

On each of your other Linux systems run the distcc server - note that this does not need to be run as root.

distccd --daemon --allow <insert xbox ip address>

On the Xbox that has the source code type

export DISTCC_HOSTS='localhost computer1 computer2' 

Replace computer1, computer2, etc., with the names of the computers or IP's on your network running the distcc server (distccd).

For future reference when you want to use distcc just add -j 6 CXX=distcc onto the make statement parameters.

Note, if you start getting strange error messages, you should ensure that gcc is the same version on both systems. gcc v3.x and v4.x and not compatible with distcc. I had to upgrade to gcc v4.0.2 on both systems and the errors went away.

Compile MythTV

cd mythtv
./configure --prefix=/usr/local --disable-backend 
make qmake 

If you are using distcc from the previous step. -j 4 is the number of simultaneous compilers to run. Running two per CPU in your distributed "cluster" seems to be the most efficient.

export DISTCC_HOSTS='localhost'
make -j 4 CXX=distcc 

otherwise use the following (and be prepared to wait quite a long time):


Once the compile is complete:

make install

Since we have installed MythTV in various parts of /usr/local, we have to tell Xebian to look for shared libraries (such as libmyth) in this folder. Edit /etc/ and add the following line


Then run the command


Then let's logout of root for now too


Compile MythTV Plugins

cd ../mythtvplugins
./configure --disable-all --enable-(what applications you want on your front end) 
make qmake

then run the following if you use distcc:

make -j 4 CXX=distcc 

otherwise just:


then to install

make install

Install MythTV Themes

The themes are really just a file copy process.

cd ../myththemes

Edit the file and add the line to the TOP of the file:

make install

Configure MythTV

Start the mythtv frontend

$ mythfrontend

It should give you a stack of errors. After it does so, kill mythfrontend then edit the file /home/live/.mythtv/mysql.txt Change the line DBHostName= so it reflects the IP address of your back end... eg:


If you use digital sound, you need to go into the setup and change your sound device from /dev/dsp to ALSA:digital

If you use a recent SVN (approximately later than 1 March 2006), the Open GL Painter used for the menus doesn't work with the Xbox very well. When you start mythfrontend use the following command line instead:

mythfrontend -O UseOpenGLPainter=0