Installing MythTV SVN on Fedora

From MythTV Official Wiki
Revision as of 02:53, 29 July 2006 by Cjlemmon (talk | contribs) (Install packages)

Jump to: navigation, search



This guide is to help users of Fedora Core to compile MythTV using the Subversion (SVN) source code, to take advantage of the latest (bleeding edge) patches to MythTV.

This overview assumes you already have MythTV running via the guide at

This guide was developed with MythTV 0.19.1 and Fedora Core 4 in mind. Some of the steps are now being checked against Fedora Core 5 (mainly dependencies). Additions are welcome by users of other Fedora Core versions.

This guide was also built with the help of another wiki page Upgrading To SVN

Install prerequisites


You will need the atrpms and freshrpms repositories to be installed. See for details on how to do this.

 # cd /etc/yum.repos.d/
 # wget
 # wget

Setup a user called mythtv, and login to it

If you have not done so already, create a separate user called mythtv

# adduser mythtv
# passwd mythtv

Remove packages

We need to remove the MythTV packages installed when we followed the MythTV HOWTO. However, this keeps all of the libraries that we need to compile MythTV later.

# rpm -qa | grep myth | xargs rpm -e

Install packages

There are a number of development libraries and packages required to compile MythTV. The following commands should obtain them all.

# yum install gcc-c++ freetype-devel lame-devel qt-devel mysql-devel lirc-lib-devel subversion
# yum install mesa-libGLU-devel libXv-devel libXxf86vm-devel libXmu-devel qt-MySQL libXvMC-devel

Run the following to get the myth plugin dependencies

# yum install fftw2 fftw2-devel libid3tag libid3tag-devel libmad-devel flac-devel 
# yum install libcdaudio-devel SDL-devel cdparanoia-devel libexif-devel fftw3 fftw3-devel

If you get the following error message during the myth plugin dependencies installation:

Error: Missing Dependency: libid3tag = 0.15.0b is needed by package libid3tag-devel

this means that you have a library installed that is greater than the development library available (in this case libid3tag-devel is v0.15.0b but libid3tag 0.15.1-3.b is installed). To resolve this do:

# yum remove libid3tag

then run the above yum install and it should resolve the dependencies correctly.

After installing all dependencies, you will need to logout and login again so that paths required to compile are updated for your session.

Install MythTV source code

Now login as the mythtv user you created above.

Here we use subversion to obtain the latest source code.

 $ svn co
 $ svn co
 $ svn co

If you prefer to grab everything at once, you could do the following:

 $ mkdir mythtv
 $ svn co mythtv

This gives you the advantage of being able to cd to the mythtv directory and running svn update, which will update all of the subdirectories at once.

Compile the source code

Compile MythTV

Configure the destination of the package

The first step is to point MythTV to install at /usr/local instead of /usr just in case we already have various MythTV packages installed from using the MythTV Fedora HOWTO previously.

$ cd mythtv
$ ./configure --prefix=/usr/local

Note: there are a lot of additional command line options for the configure phase. Here's the full command line I used:

$ ./configure --prefix=/usr/local --enable-xvmc --arch=i686 --enable-proc-opt --enable-dvb 

To check them all out use ./configure --help

$ qmake PREFIX=/usr/local

Start the MythTV compile

$ make

Now install mythtv (you should still be logged in as root to do this):

# su
# make install

Now we'll ensure that the mythbackend will start automatically when the PC reboots:

# cd contrib
# cp etc.rc.d.init.d.mythbackend /etc/rc.d/init.d/mythbackend
# chmod a+x /etc/rc.d/init.d/mythbackend
# cp etc.sysconfig.mythbackend /etc/sysconfig/mythbackend
# /sbin/chkconfig --level 345 mythbackend on
# echo "/usr/local/lib" >> /etc/
# /sbin/ldconfig
# exit

Start the MythPlugins compile

$ cd ../mythplugins
$ ./configure
$ qmake
$ make

If you receive an error message of something like -lrfftw not found during the compile, you may need to do the following

$ su
# cd /usr/lib
# ln -s
# ln -s
# exit

then just do a make as before

After the make has completed successfully you need to install the plugins:

$ su
# make install

The web-based interface to MythTV (mythtweb) also needs to be installed:

# cd mythweb
# mkdir /var/www/html/mythweb
# cp -R * /var/www/html/mythweb


You are now ready to configure your MythTV system

$ su -
# mythtv-setup
# service mythbackend start

Applying SVN upgrades

One of the advantages of running SVN is that you can download the latest revision of MythTV. There are usually 5 or more updates a day to the MythTV source code.

What has changed since I last compiled MythTV?

You should subscribe to the mythtv-commits mailing list. Subscribe to the list or browse a web interface.

After install of SVN I get an error message of shared library not found

Sometimes there will be a brand new library added to mythtv. On 26 March 2006, I had an issue with not found when trying to start mythbackend. By running:


before starting the mythbackend, this cleared the problem.

make clean / make distclean

Sometimes when there is an update, there will be a comment in there which says "make clean" or "make distclean". If you need to perform a make distclean, you will lose all of your previous ./configure parameters. It is recommended you keep your own compile parameters in a separate .sh file so you can easily rebuild if you need to perform a make distclean.

Here's a couple of scripts I use to make life easier:

--- ---
cd mythtv
make distclean
./configure --prefix=/usr/local --enable-xvmc --arch=i686 --enable-proc-opt --enable-dvb
qmake PREFIX=/usr/ocal
cd ../mythplugins
make distclean
--- ---
cd mythtv
make -j 2
cd ../mythplugins
make -j 2

'make clean' is only needed if you are re-'making' code which you have 'made' before. It cleans out any already-compiled '.o' files. It does not affect the configuration. 'make distclean' removes the configuration. If you upgrade often, then you do not need to do a 'distclean' often. I use the following script to delete my local code folders and download the new versions under /backup/usb. I use scripts to set the configuration so it is always the equivalent of 'distclean'. I have a PVR500, an HD3000 and use lirc on a Via motherboard, thus the particular config choices. (I copy the 'usb' folder to a usb key for transfer to my home for use on the mythbox).

Get a complete svn code set:

----- -----
Clears old svn code base and downloads complete new set.
cd /backup/usb
rm -rf myththemes
rm -rf mythplugins
rm -rf mythtv
svn co
svn co
svn co

I further automate the process by having my own config scripts to configure the three main myth subsystems and build all of them by calling one script. All of my configure scripts are saved in /usr/local/sbin. For curiosity, I write the date/time to a log file and display it at the end of the run. Running 'all-build' as root will configure, make and make install a complete Mythtv setup without further interaction. It is often the last thing I start before going to bed!

Build everything in one script.

cd /backup/usb
echo "Commence build" > /backup/usb/log.out
date >> /backup/usb/log.out
#  Clean out old config scripts and replace with good ones
rm -f /backup/usb/myththemes/
rm -f /backup/usb/mythplugins/
rm -f /backup/usb/mythtv/
cp /usr/local/sbin/ /backup/usb/myththemes
cp /usr/local/sbin/ /backup/usb/mythplugins
cp /usr/local/sbin/ /backup/usb/mythtv
echo "End cleanup and copy of configuration" >> /backup/usb/log.out
date >> /backup/usb/log.out
# Commence actual build process
echo "Commence Mythtv build" >> /backup/usb/log.out
cd /backup/usb/mythtv
make clean
make && make install
echo "End mythtv make" >> /backup/usb/log.out
date >> /backup/usb/log.out
echo "Commence myththeme build"
cd /backup/usb/myththemes
make clean
make && make install
echo "End mythplugins" >> /backup/usb/log.out
date >> /backup/usb/log.out
echo "Commence mythplugin build" >> /backup/usb/log.out
cd /backup/usb/mythplugins
make clean
make && make install
echo "End myththemes" >> /backup/usb/log.out
date >> /backup/usb/log.out
cd /backup/usb
cat log.out
# *******************************************

These are my configure files;

# ----
# configure for mythtv
# For Via Nehemiah cpu and unichrome-pro (xvmc capable) video chipset 
./configure --arch=c3-2 --enable-proc-opt --enable-audio-alsa --disable-audio-arts \
     --disable-audio-jack --disable-directfb --enable-lirc --enable-v4l --enable-ivtv \
     --disable-firewire --enable-dvb --dvb-path=/usr/include --disable-dvb-eit \
     --enable-xv --enable-xvmc --enable-xvmc-vld --enable-xvmc-pro      --enable-opengl-vsync \
# **************************************
#  ----
# configure for mythplugins
./configure  --prefix=/usr/local --enable-opengl --disable-mythbrowser \
    --disable-mythcontrols --enable-mythdvd --enable-transcode --enable-vcd \
    --disable-mythflix --disable-mythgallery --disable-exif --disable-new-exif \
    --disable-mythgame  --enable-mythmusic --enable-fftw --enable-sdl \
    --enable-aac --disable-mythnews --disable-mythphone --disable-festival \
    --enable-mythvideo --disable-mythweather
# **************************************
# **************************************
#  ---
# configure for mythplugins
./configure  --prefix=/usr/local

Updating your source code

Use the same svn commands as shown above to checkout the source trees. SVN is smart enough to download only the files that have been updated.