Installing MythTV SVN on Ubuntu Breezy

From MythTV

Jump to: navigation, search

This is a Tutorial to installing MythTV on an Ubuntu Breezy Badger machine. Note, these instructions also worked on an Ubuntu Dapper machine and Hardy.

See Ubuntu Installation Guides for installing on other Ubuntu versions.

Contents

What Packages do I need to install first?

  1. build-essential
  2. qt3-dev-tools
  3. libqt3-mt-dev
  4. liblircclient-dev
  5. libasound2-dev
  6. libdts-dev
  7. libdvdnav-dev
  8. libxv-dev
  9. libxxf86vm-dev
  10. transcode
  11. libqt3-mt-mysql
  12. liblame-dev
  13. subversion
  14. libdvdread3-dev
  15. libsamplerate0
  16. libxvidcore4
  17. liba52-0.7.4-dev
  18. libfame-dev
  19. libcdio-dev

You will need to add the Ubuntu 5.10 multiverse and universe components to your /etc/apt/sources.list to get some of these packages. You can do this by adding the following line to /etc/apt/sources.list or editing it if you already have universe and main in your sources.lst. Adjust as necessary for your location or preferred mirror.

deb http://us.archive.ubuntu.com/ubuntu breezy universe main restricted multiverse

You can install these packages by doing:

sudo apt-get install build-essential qt3-dev-tools libqt3-mt-dev liblircclient-dev libasound2-dev libdts-dev
sudo apt-get install libdvdnav-dev libxv-dev libxxf86vm-dev transcode libqt3-mt-mysql liblame-dev subversion
sudo apt-get install libdvdread3-dev libsamplerate0 libxvidcore4 liba52-0.7.4-dev libfame-dev libcdio-dev
sudo apt-get install msttcorefonts

Or, if you wish to do it all in one apt-get command and walk away for a while, you can issue this command:

 sudo apt-get install libmad0-dev libid3tag0-dev \
 libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev\  
 fftw3-dev libfaad-dev libsmpeg-dev libmp4v2-dev qt3-dev-tools libqt3-mt-dev\
 liblircclient-dev libasound2-dev libdts-dev libdvdnav-dev libxv-dev libxxf86vm-dev\
 transcode libqt3-mt-mysql liblame-dev subversion libdvdread3-dev libsamplerate0\
 libxvidcore4 liba52-0.7.4-dev libfame-dev libcdio-dev msttcorefonts qt4-dev-tools\
 libqt4-dev libtag1-dev build-essential


  • For newer version of MythTV you will also need some QT4 bits:
sudo apt-get install qt4-dev-tools libqt4-dev


If you're compiling video drivers you might also want the linux-headers-xxxxxx package for your machine. You can install this by doing:

sudo apt-get install linux-headers-`uname -r`

You can install libdvdcss (on Feisty anyway) by:

/usr/share/doc/libdvdread3/install-css.sh


If you don't already have a mysql server in your network, you'll need to install that as well.

If .configure gives you "support will not be included" messages

  • Use view or your favourite way of browsing text files, to look at the configure file.
  • Find the first part of the message you're getting (e.g. AAC for message AAC support will not be included in MythMusic)
  • You will see a variable name that gets tested (e.g. $aac in the following lines

if test "$aac" = "no" ; then
       echo "        AAC           support will not be included in MythMusic"
  • Search for $aac or whatever variable you are interested in- it could be $sdl (for the search use the name inc the $ sign)
  • You will get to something like this

if test "$aac" != "no" ; then
   aac="no"
   if has_library libfaad ; then
       if has_library libmp4ff ; then
           if has_header faad.h ; then
               aac="yes"

  • Now you know that the files you are looking for are libfaad, libmp4ff, and faad.h.
  • Install apt-file using Synaptic or apt-get install apt-file
  • Search for the files using

apt-file search libfaad

  • ...and hopefully you get some results

apt-file search libfaad
libfaad2-0: usr/lib/libfaad.so.0
libfaad2-0: usr/lib/libfaad.so.0.0.0
... (snip)
libfaad2-dev: usr/lib/libfaad.a
libfaad2-dev: usr/lib/libfaad.so
... (snip)
libvlc0-dev: usr/lib/vlc/libfaad.a
libvlc0-dev: usr/lib/vlc/libfaad_pic.a

  • So you know to install libfaad2-0 and libfaad2-dev (and maybe libvlc0-dev... can't hurt to install it anyway) using synaptic or the package manager of your choice.
  • The above was a BAD example, because the configure file says it was disabled anyway by default! But the idea is the important thing.

aac="no" # compile fails w/libfaad v2.0

What Packages do I need to install for the plugins?

MythMusic

  1. libmad0-dev
  2. libid3tag0-dev http://cvs.sourceforge.net/viewcvs.py/*checkout*/faac/faad2/common/mp4ff/mp4ff_int_types.hev
  3. libvorbis-dev
  4. libflac-dev (c++ instead?, no)
  5. libcdaudio0-dev
  6. libcdparanoia0-dev
  7. fftw3-dev (if you get message FFTW support will not be included in MythMusic)
  8. libfaad2-d (Currently broken, use --disable-faac) (or libfaad2-dev?)
  9. libsmpeg-dev (if you get message SDL support will not be included in MythMusic)
  10. libfaad2-dev libmp4v2-dev (if you get message AAC support will not be included in MythMusic)
  11. libtag1-dev (if you get message MythMusic requires taglib)

To install these packages run

sudo apt-get install libmad0-dev libid3tag0-dev libvorbis-dev libflac-dev libcdaudio-dev libcdparanoia0-dev
sudo apt-get install fftw3-dev libfaad2-dev libsmpeg-dev libmp4v2-dev libtag1-dev

Also download this header file:

sudo wget http://faac.cvs.sourceforge.net/*checkout*/faac/faad2/common/mp4ff/mp4ff_int_types.h -P /usr/local/include


Gallery

  1. libtiff4-dev
  2. libexif-dev
sudo apt-get install libtiff4-dev libexif-dev

Browser

  1. kdelibs4-dev

For opengl support

  1. libglut3-dev?

For xvmc support

  1. libxvmc-dev?

mysql

  1. mysql-client
  2. mysql-server
  3. libmysqlclient15-dev

nuvexport

  1. libwww-perl
  2. libtimedate-perl

How do I download the source code?

Create yourself a suitable directory to hold it.

Note: If installing into /usr/local (or anywhere in /usr) do NOT put the source in /usr/... locate it in a completely different directory, such as your home directory. If you do locate the source in the same dir qmake produces soft references (../../ and so on), this causes checkinstall to miss a few items such as headers etc when creating the package.

If you want the latest-and-greatest, bleeding edge release type:

svn co http://svn.mythtv.org/svn/trunk/mythtv
svn co http://svn.mythtv.org/svn/trunk/mythplugins
svn co http://svn.mythtv.org/svn/trunk/myththemes

If you'd like to get the stable 0.20 branch, do this instead:

svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/mythtv
svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/mythplugins
svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/myththemes

Once you have a checkout, you can just do a svn update at any time to update it to the most recent revision.

How do I compile the source code?

Change in to the, for example mythtv directory, and

./configure --prefix=/usr/local

The prefix tells the build to install to /usr/local. By default MythTv gets installed to /usr which should only be touched by ubuntu packages. /usr/local doesn't contain any distribution specific files - so if you ever wanted to get rid of mythtv you could just delete whatever is in there.

Note: You can install to /usr/local if you are in the staff group. So there is no need to do this as root which gives you extra safety. Strongly recommended!


You might like to change some of the default options. You can either edit the configure file (which could get overwritten by a newer version if you checkout a later version of the code) or you could

./configure --help

Then note which flags you'd like to change from the default ones (for example, to enable DVB-T or XvMC).


Note: There is a problem with the libdts-dev package on AMD-64. There are two ways to solve it. One is to disable DTS support so the command looks like:

./configure --prefix=/usr/local --disable-dts

The other is to build as normal, but first shuffle around the DTS libraries:

sudo mv /usr/lib/libdts.a /usr/lib/libdts.a_nonpic

sudo mv /usr/lib/libdts_pic.a /usr/lib/libdts.a


Once you're happy you have 2 choices- first, you can use "make install" which will put mythtv files wherever it likes on your system, making it very hard to uninstall or go back to using a standard Ubuntu mythtv package at a later time, or you can use "checkinstall" to build and install a Debian (=Ubuntu) .deb package. If you use checkinstall then it is very easy to uninstall your customised version, and move forward to a later version, or to a standard Ubuntu mythtv package.

First option- let make put files all over your filesystem

Probably best to use synaptic or dpkg or whatever to remove any Ubuntu mythtv packages that are installed before you do this.

make
sudo make install

Second option- use checkinstall to create and install a .deb package

You can install to /usr and will later be able to cleanly remove all of the mythtv packages to install the latest version:

./configure --prefix=/usr
You'll need to install checkinstall using synaptic or dpkg or apt-get.
make
sudo checkinstall

Make sure version and release are set to numeric values, or it will fail with some bogus error message. Take the other defaults for leaving files out etc. If you don't want the mythtv deb package to be installed, just start synaptic before running checkinstall, and then checkinstall will create the .deb file but won't be able to install it. Then you can install it manually using synaptic or dpkg -i. Of course, you can then also cleanly uninstall it using these utilities (or any other utilities that deal with deb packages)!


Now you're on your own. Read the docs, they will answer 99% of your questions.

the previous authors left the HOWTO here basically an rtfm eh? This might help you out now after your installed.

Potential Gotchas

  1. When I run mythtv-setup I get an error about not being able to find a library.

Solution: Ubuntu handles libraries a little strangely, and it doesn't look for libraries in /usr/local/lib by default. Create a file in your /etc/ directory called ld.so.conf:

sudo nano /etc/ld.so.conf

Then add this line to the file

/usr/local/lib

Save that file

If you don't want to modify system files in Edgy, you can do the following:

sudo nano /etc/ld.so.conf.d/mythtv.conf

Then add this line to the file

/usr/local/lib

Once you're done adding /usr/local/lib (using any method), run ldconfig

sudo ldconfig

That should solve many library problems with compiled programs in Ubuntu

Personal tools