The Hard Way: Installing MythTV From SourceBeta
From MythTV Book
| Chapter Details |
|---|
| Credits |
|
Authors: Stewart Smith, Michael Still |
| Links |
|
Published version: The Hard Way: Installing MythTV From Source |
| Beta Chapter |
|---|
| Warning: This chapter is currently a beta. This means that the chapter hasn't had any review yet, and might be inaccurate. Please be cautious when implementing recommendations from this chapter. If you find problems with this chapter, then either fix them yourself, or send your comments to the editors. |
Introduction
In this chapter, we will show how to install the dependencies for MythTV such as the MySQL database; lirc, which is the remote control driver; and then MythTV itself. After this chapter, you will be ready to configure MythTV as discussed in the Configuration chapter, and record television as discussed in Recording TV and Performing Advanced TV Recording. By now, you should have installed Ubuntu Linux, as detailed in The Hard Way: Installing Ubuntu, and performed some basic checks that your hardware works.
We'll show how to build MythTV from source instead of using existing packages for several reasons: to get the right optimizations for your CPU; to allow you to customize what functionality is enabled inside MythTV itself and to be sure you get the most current stable version. If you want to run the absolutely latest code, then you should check out the Joining the MythTV Community chapter, which describes how to install development branches of the code.
Installing Prerequisites
Before you can build and install MythTV, you need to install some required software and libraries. As with the other instructions you’ll find in this book, we will show you how to install these prerequisites utilizing the tools within Ubuntu. If you’ve chosen to use a different operating system, the methods to complete the installs might differ.
| Using apt-get |
|---|
| Ubuntu (like the Debian Linux distribution it is derived from) uses a program called apt-get whose role is to help you install software. It does this by managing what dependencies (other pieces of software) are needed to run the piece of software you are installing and by installing those at the same time. It also keeps a database of all the software it has installed, which makes upgrading much easier later. It’s a command-line program, and we’ll show how to use it to install needed software throughout this book. You can also use the graphical interface to apt-get; it’s called Synaptic Package Manager, and you can find it in System ➤ Administration ➤ Synaptic Package Manager. For more information about Ubuntu packaging, check out one of the many excellent Ubuntu or Debian books that are available, or refer to some of the tutorial sites available for those distributions. |
Installing Subversion
The currently recommended way of fetching MythTV's source code is via the subversion (sometimes called SVN), which is the source control system used by the MythTV developers. First we need to install subversion, which you do like this:
$ sudo apt-get install subversion
Downloading MythTV's Source
Now we can download the source code for the latest released version of MythTV. You won’t compile it just yet, but you need the code for some of the other installation steps, so it is good to download it early. The latest version of MythTV is currently 0.21-fixes, although since the time of this writing, a newer version might have been released.
Why aren’t we using Ubuntu packages? In our experience, downloading from source will give you a more recent version of MythTV, and that gives you many improvements to the application (each release is consistently better). Additionally, you’ll get code that is optimized for your local system. Nothing is inherently wrong with the Ubuntu packages, however, so if you would rather install from packages, then feel free to do so.
To download the source, change directory to where you want to store the source code, and then run this command:
$ svn co http://svn.mythtv.org/svn/branches/release-0-21-fixes/ mythtv
The directory should now contain a directory called mythtv, which will itself look something like this (the ls command lists what's in the current directory):
$ cd mythtv$ ls
mfd mfe mythextras mythplugins myththemes mythtv themes themestringstoolSetting Up the MySQL Database Server
MythTV stores its recorded programs, other digital video and audio files, and themes on the Linux file system. All other information it keeps in a SQL database. This includes guide data downloaded from the Internet, the programs you have scheduled to record, the name of the theme you’ve selected for each graphical frontend, the programs you previously have recorded, and the TV channels you can receive as well as what they’re called. MythTV uses the MySQL database server to store this information. Luckily, MySQL is really easy to set up and get running with MythTV.
To install MySQL, you run this:
$ sudo apt-get install mysql-server
During package installation you'll be asked to set a root password for MySQL. Pick something secure, because the root user can do things like delete entire databases. After the package is installed, you’ll have a running MySQL server with a set of default options that will be fine for your MythTV setup.
Setting Up the Database Schema
You can now insert the default data into the MySQL database that MythTV will use. This includes setting up the schema, which is the layout of the tables that the data is stored within inside the database. You do this by running a little SQL script, which is provided with the MythTV source code, in the database subdirectory:
$ mysql -u root < mythtv/database/mc.sql
This sets up the database so that only connections from the machine on which MySQL is running will work. If you are going to run remote frontends, you’ll need to change this (you can use the graphical MySQL Administrator to make this easy). MySQL Administrator is installable using apt-get or Synaptic in the mysql-admin package; you can find it in Applications ➤ System Tools.
If you intend to make your MySQL server available to anyone other than the local machine, you should seriously consider setting a password for the root MySQL account as well. This is because this account has administrative access to the database server and can do things such as delete entire databases -- you obviously don’t want random people doing that. If you didn't set a root password when you installed the mysql-server package, you can find more information about setting a root password at the MySQL website.
Getting the Libraries Needed to Compile MythTV
You’ll need some extra software packages installed to compile MythTV. These include KDE development libraries along with libraries used for accessing TV capture cards. We’re again going to use apt-get to install software for us—in this case, the build dependencies (software needed to build this software) for MythTV. Fetch the required dependencies like this:
$ sudo apt-get install build-essential libmp3lame-dev libqt3-mt-mysql $ sudo apt-get build-dep mythtv
| liblame-dev vs libmp3lame-dev |
|---|
| When I first tried to fetch the build dependencies for MythTV, I got this error message: $ sudo apt-get install liblame-dev Reading package lists... Done Building dependency tree Reading state information... Done Package liblame-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libmp3lame-dev E: Package liblame-dev has no installation candidate If this happens to you, try installing the list of dependencies without liblame like this: $ sudo apt-get install autotools-dev ccache comerr-dev dpatch libartsc0 libartsc0-dev libasound2-dev libaudio-dev libaudio2 libavc1394-dev libcups2-dev libcupsys2-dev libdts-dev libdvb-dev libdvdnav-dev libdvdnav4 libdvdread-dev libdvdread3 libexpat1-dev libfaac-dev libfaac0 libfaad-dev libfaad0 libfftw3-3 libfftw3-dev libfontconfig1-dev libfreebob0 libfreetype6-dev libgcrypt11-dev libgif-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnutls-dev libgpg-error-dev libice-dev libid3tag0 libiec61883-dev libimlib2 libimlib2-dev libjack-dev libjack0 libjack0.100.0-dev libjpeg62-dev libkadm55 libkrb5-dev liblcms1-dev liblircclient-dev libltdl7-dev libmng-dev libmysqlclient15-dev libogg-dev libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libqt3-compat-headers libqt3-headers libqt3-mt libqt3-mt-dev libraw1394-dev libsm-dev libtasn1-3-dev libtiff4-dev libtiffxx0c2 libtool libungif4-dev libvorbis-dev libx11-dev libx264-59 libx264-dev libxau-dev libxcb-xlib0-dev libxcb1-dev libxcursor-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxt-dev libxv-dev libxvidcore4 libxvidcore4-dev libxvmc-dev libxvmc1 libxxf86vm-dev mesa-common-dev qt3-dev-tools texi2html x11proto-core-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-video-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev This resolved the problem for me. |
Setting Up the Shared Libraries
We’re going to install MythTV in the /usr/local directory, which keeps things separate from the other packages installed on the system. People familiar with Linux systems might choose to install MythTV elsewhere, or if you’ve decided to use some prebuilt packages, the decision will have been made for you. You need to tell the system that it might need to look in /usr/local for various libraries that you’ll install. To do this, run the following commands:
$ sudo -s # echo /usr/local/lib > /etc/ld.so.conf.d/mythtv.conf # /sbin/ldconfig # exit
In this case we started a shell as root with the -s flag to sudo. This was needed because we wanted to redirect standard output of the echo command to a file, which is harder to do in a single sudo invocation. Its also convenient because we needed to run more than one command.
Setting Up Your Remote Control
The next step is to setup your remote control. There are three main ways that people remotely control a MythTV frontend. They are:
- Using a wireless keyboard. This is attractive as it doesn't need any special configuration. There are a variety of wireless keyboards on the market, usually employing either line of sight infrared or radio technologies like Bluetooth.
- Using lirc to implement a full-blown remote control. This requires a fair bit of setup, and you need to do it before you compile MythTV. We will discuss this option extensively, because most remote control solutions involve using lirc as part of them.
- You can use the MythTV network control interface to control MythTV from a computer or PDA. In fact, you can also use Jabber and Google Talk instant messages to control MythTV via this interface. We discuss this in Controlling MythTV over the Network and On-Screen Displays.
Setting up lirc
The software package that will help you set up a complete remote control for MythTV is lirc. lirc is the Linux Infrared Remote Control package. It is flexible, which is really just away of saying that it can be quite complex. Although you can use a wireless keyboard as a remote for MythTV (and many people find that more convenient), here we’re talking about something that looks like a traditional TV/VCR hand held remote.
Many TV capture cards come with a remote control and infrared receiver that plugs into the TV card (see Figure 1 for some examples). You can also get USB remote controls quite easily that are well supported with lirc. This is a good, cheap, and easy way to get a remote control for your MythTV system.
We'll now discuss how lirc works, make sure MythTV has support for lirc, install the latest version of lirc, and create the configuration files for your remote control.
| Caution |
|---|
| lirc can be difficult to configure and get going exactly right. The reward of having an efficient-to- use remote is significant, though. Stewart spent about two hours getting everything set up exactly right. Your mileage might, of course, vary. |
Understanding How lirc Works
The job of lirc is to translate the infrared signals from the remote into commands and make them available to programs running on your machine. A kernel module interfaces with the hardware and provides a /dev/lirc device. A program called lircd (the lircdaemon) runs in the background and provides an interface for applications. You can use this interface in one of two ways. There is a program called irxevent that simply turns the remote control button presses into X Window System events (exactly like the keypresses or mouse movements that keyboards and mice generate). The only problem with this is if you need to map buttons on the remote to different keys in different applications (for example mythfrontend and xine).
The mapping between buttons on the remote and what they do is defined in the lirc configuration file -- .lircrc, which is stored in the user's home directory. This is an example of some of the settings in the .lircrc file:
begin
prog = mythtv
button = CH_UP
repeat = 4
config = Up
end
begin
prog = mythtv
button = CH_DOWN
repeat = 4
config = Down
end
begin
prog = mythtv
button = VOL_UP
repeat = 4
config = Right
endThe alternate -- and ideal -- way is to have each application you want to use the remote control with built directly with lirc support (in other words, have the applications compiled to include the lirc libraries needed to work with lirc). Both MythTV and Xine support this, and the xine that comes with Ubuntu is already compiled with lirc support.
Installing lirc
We’ll now show you the process of how to install lirc so that we can use the remote control that came with our TV capture card. Using other supported "remote dongles" (just an IR receiver, not attached to a TV tuner) is a similar experience. We’ve noted when there are differences between the two.
We have always installed lirc from source code, not from the packages provided with a Linux distribution (such as Ubuntu). This is to ensure that we get a more up-to-date, compatible, and (theoretically) less buggy system. Both authors have experienced problems with getting older versions of lirc to work correctly with their remote controls. New versions from the website have always "just worked", though.
The first step is to download the latest version of the lirc source code from the lirc website. At the time of writing, this was 0.8.4. Next, ensure you have the dependencies needed to build lirc installed. You will also need to install the dialog package, which isn't automatically part of the build dependencies, so install it too:
$ sudo apt-get install dialog $ sudo apt-get build-dep lirc
You also need to make sure you have the kernel headers installed and prepared (replace VERSION and RELEASE with what you worked out by reading the "Finding Your Current Kernel Version" sidebar). Follow these steps to install and build the kernel headers. It is important to follow these steps and not just use the Ubuntu linux-headers package, because it does not have all the required files for building lirc. You might have to redo these steps of installing lirc after certain updates to the kernel (the symptom being your remote control not working after a kernel upgrade).
$ sudo apt-get install linux-source-VERSION $ cd /usr/src $ sudo tar xjf linux-source-VERSION.tar.bz2 $ sudo ln -s /usr/src/linux-source-VERSION /lib/modules/RELEASE/build $ cd linux-source-VERSION $ cp /boot/config-RELEASE .config $ sudo make scripts prepare-all
| Finding Your Current Kernel Version |
|---|
| The uname program will tell you which version of the kernel you are running. Running uname -r from a terminal will give you output like "2.6.27-9-generic". This is the full release "name" (the -r is for release) of the kernel you are running. The actual meaning of the numbers isn’t significant here. However, the version is just the first three numbers (2.6.27), and this is the linux-source-VERSION that you’ll need to install. |
Extract the source code on your MythTV system:
$ tar xjf lirc-0.8.4.tar.bz2The j is for a file ending in .bz2. If yours ends in .gz, replace the "j" with a "z". This will create a directory named lirc-0.8.4 that contains the source code for lirc version 0.8.4. Go into the directory that contains the source, and run the lirc setup script:
$ cd lirc-0.8.4 $ ./setup.sh
You’ll now see a menu. Use the arrow keys to navigate, and press Enter to select. The first option is selecting the driver you want to use. Under this menu, you’ll see a variety of categories. Since we’re going to use the remote that came with our TV card, we’ll talk about that menu. If you’re using another kind of remote control, then you’ll need to specify the right option here for your specific remote (see Figure 2).
With luck, your TV card (or something similar to it) will appear in this menu. If it’s not obvious, look at the lirc table of supported devices at the lirc website (keep in mind that this can be out-of-date, so you might need to resort to web searches). Now that you’ve selected the driver, you can click Ok. You'll be taken to another screen where you select Save Configuration & Run Configure. This will cause lirc to prepare itself to compile. The configure step should go flawlessly. If there’s an error, make sure you have the prerequisites installed properly. At the end of the configure stage, it will tell you which kernel module you will be using. Write this down because you will need to add this to the /etc/modules file. Here is an example of the output:
... config.status: creating drivers/lirc_sir/Makefile config.status: creating drivers/lirc_streamzap/Makefile config.status: creating daemons/Makefile config.status: creating tools/Makefile config.status: creating doc/Makefile config.status: creating doc/man/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing default-1 commands You will have to use the lirc_gpio kernel module. Now enter 'make' and 'make install' to compile and install the package.
You can see here that this remote control uses the lirc_gpio kernel module. Next, run make to build lirc, and then install the built code:
$ make $ sudo make install
The install copies over the lirc files into the appropriate place under /usr/local. Now edit the /etc/modules file, and add the module mentioned earlier. That’s as simple as just adding the name of the module to the end of the file:
$ sudo gedit /etc/modules
Install the module (for example lirc_gpio):
$ sudo modprobe lirc_gpioAfter installing the module, the output from the dmesg command should indicate that the driver was loaded and something was either detected or enabled:
[17282870.488000] lirc_dev: IR Remote Control driver registered, at major 61 [17282972.708000] The bttv_* interface is obsolete and will go away, [17282972.708000] please use the new, sysfs based interface instead. [17282972.708000] lirc_gpio (-1): card type 0x22, id 0x6606107d [17282972.708000] lirc_dev: lirc_register_plugin: sample_rate: 0 [17282972.712000] lirc_gpio (0): driver registered
Now you can test and configure lirc so that you can use your remote with MythTV.
Using Remote Control Dongles: Remotes Not Connected to a TV Card
You’ll find yourself shopping for a remote control dongle if you have a MythTV frontend without a TV tuner or you want a different remote control from the one provided with your TV tuner. You can find the current list of supported dongles at the lirc website (at the time of writing, it is on the right, and you have to scroll down to see it). We recommend the Streamzap PC Remote Control device, which costs about $30 US on Amazon.com.
Testing Your lirc Installation
For this initial test, you'll first check that the driver is working, and then you’ll start the lirc daemon and test that the button codes are being correctly decoded. Once you have installed lirc, you should have a /dev/lirc0 device. You can check by using this:
$ ls -l /dev/lirc* crw-rw---- 1 root root 61, 0 2009-01-01 11:43 /dev/lirc0
You might think that since /dev/lirc0 has a zero in it you could have more than one remote control connected to the one system (perhaps /dev/lirc1, /dev/lirc2, and so on). You are correct -- you can. You might already have this if you have two TV tuner cards that both came with remote controls.
| Tip |
|---|
| If you're unsure whether your remote control is sending any signal (for example, the batteries could be flat), you can get a digital camera or camcorder (with an LCD screen) and point it at the remote. Cell phone cameras also work well. The LED that transmits the IR signal from the remote will glow white when it’s transmitting. If it doesn't glow, check the batteries. This works because digital cameras also capture a bit of the infrared spectrum of light. This trick doesn't work too well with digital SLRs, though, because most can't display a live preview image. |
Using the mode2 Program to Test the Driver
The next step is to use mode2 to test that your remote control is working. The mode2 program talks directly to the hardware device, getting back raw codes. The irw program you will use in a moment talks to the lirc daemon (lircd) and can decode this raw information. If you're using a remote control that came with a TV card, you will likely get similar output, because the hardware on the TV card does the decoding. With more universal IR receivers for remotes, mode2 will get raw pulses (see the same output), while irw will decode these pulses via lircd. So, running mode2 will tell you whether your hardware is hearing anything from your remote, and running irw will tell you whether the lirc daemon is correctly receiving and translating those pulses.
This is example output from running mode2and pressing some buttons:
$ sudo mode2 -d /dev/lirc0 code: 0xc03f30cf code: 0xc03f30cf code: 0xc03f30cf code: 0xc03f30cf code: 0xc03f08f7 code: 0xc03f08f7 code: 0xc03f08f7 code: 0xc03f08f7
In the previous example, we pressed some buttons on the remote, and when we did, several lines popped up on the screen ("code" followed by a code). This shows you that your remote control is sending an IR signal and the driver is receiving one. Remember, if you have built your own receiver and are not using one from a TV card, you will see raw input of pulse and gaps (shown next). Most TV cards decode the pulses into the codes themselves (as shown previously).
$ sudo mode2 -d /dev/lirc0 space 2681403 pulse 9058 space 4415 pulse 633 space 494 pulse 622 space 510 pulse 608
To quit this program, press Ctrl + C.
Configuring the lirc Daemon
The next step is to get the lirc daemon understanding what your remote is sending. For remotes that came with TV cards, it should be easy to find a /etc/lircd.conf file that somebody has already made and tested. If you have a custom remote and receiver, you can create your own lircd.conf using the irrecord program.
On the lirc website, there is now a remotes.tar.bz2 file. It contains all the supported configuration files. Odds are your remote has an existing configuration file, and it's in this archive. For example, we have a Leadtek Winfast TV Deluxe 2000. Inside the leadtek directory in the remotes.tar.bz2 file, you’ll find three possible configuration files. (You can browse the leadtek directory by double-clicking it and using the Gnome Archive Manager -- if you’re not running a Gnome environment, you can extract the archive by running tar xjf remotes.tar.bz2 from a command line.) After looking at each of these configuration files, we decided the RM-0010 configuration was the most appropriate for our remote. We concluded this by finding which configuration file had all the buttons listed that we could see on our remote control. The other configurations might work too (in our case they did), but only for a subset of the buttons.
Once you’ve found the configuration file, you need to copy it to /etc/lircd.conf, and since this is under the /etc directory, you'll need superuser privileges to do so. If you copied the file out of the archive to the desktop (by dragging and dropping it from Archive Manager or by clicking Extract), you can issue the following command:
$ sudo cp Desktop/lircd.conf.RM-0010 /etc/lircd.conf
Now you can start the lirc daemon, which will read the lircd.conf file and decode the signals from your remote control.
Starting lircd
You can start lircd manually like so:
$ sudo lircd -d /dev/lirc0
You need to specify the device for all the lirc processes as the default -- /dev/lirc -- isn’t available on more modern versions of the Linux kernel that create the files in /dev dynamically. You will be running one of these kernels unless you have specifically gone out of your way not to do so.
Unfortunately, lircd starts (or doesn't) silently. If, for example, you forgot to specify the device parameter with -d /dev/lirc0, you won’t get an error message; lircd just won't stay running. You can check whether you have an lirc drunning by checking the output:
$ ps -e|grep lirc 4841 ? 00:00:00 lirc_dev 14217 ? 00:00:00 lircd
Here you can see that we do have lircd running. If we didn't, the output would be more like this:
$ ps -e|grep lirc 4841 ? 00:00:00 lirc_dev
If you want to double-check and potentially see some error messages, you can tell lircd not to fork to the background. That is, run in the foreground, not letting you enter in any other commands until you press Ctrl + C to quit it. You can do this by supplying the -n flag (shorthand for --nodaemon) to lircd:
$ sudo lircd -n -d /dev/lirc0
You will probably want to have the lirc daemon start when your MythTV box starts. You will need to copy the contrib/lirc.debian file from the lirc source tree into /etc/init.d/ (possibly renaming it to just lirc and definitely editing it so the device file name is correct) and run the update-rc.d program like this:
$ sudo update-rc.d lirc defaultsThis is one of those spots that will differ greatly if you're not using Ubuntu; you’ll need to check your distribution's administrator guide to determine how to start it (try man chkconfig).
Using irw to Check Your lircd Configuration (/etc/lircd.conf)
The irw program uses the lirc daemon (lircd), which reads the /etc/lircd.conf file and translates these codes into button names. For example:
$ irw 00000000c03fc03f 00 FULLSCREEN RM-0010 00000000c03fc03f 01 FULLSCREEN RM-0010 00000000c03fc03f 02 FULLSCREEN RM-0010 00000000c03fc03f 03 FULLSCREEN RM-0010 00000000c03f08f7 00 CH_DOWN RM-0010 00000000c03f08f7 01 CH_DOWN RM-0010 00000000c03f08f7 02 CH_DOWN RM-0010 00000000c03f08f7 03 CH_DOWN RM-0010
To quit this program, press Ctrl + C. Now that you have the remote, the driver, and the lirc daemon all working, you can configure the .lircrc file for your remote.
Mapping Buttons on the Remote to Functionality
The .lircrc file maps buttons on the remote control to functionality in software. This will likely be different for each remote control and for each user's personal preference. By "user", we mean the user that the MythTV frontend runs as. Although you can theoretically have different setups for different logins and different remotes, it can be complicated.
For example, looking at our remote (see Figure 1 earlier in this chapter), we've decided that the volume, full screen, and channel buttons would be better arranged as the arrow keys and the Enter key for the purposes of MythTV. The following .lircrc snippet does this:
begin
prog = mythtv
button = CH_UP
repeat = 4
config = Up
end
begin
prog = mythtv
button = CH_DOWN
repeat = 4
config = Down
end
begin
prog = mythtv
button = VOL_UP
repeat = 4
config = Right
end
begin
prog = mythtv
button = VOL_DOWN
repeat = 4
config = Left
end
begin
prog = mythtv
button = FULLSCREEN
repeat = 4
config = Space
endConfiguring lirc for MythTV
You are going to want to map buttons on your remote to functions in MythTV. These don't have to be what is written on the remote. In fact, we've mapped only one button on our remote to the function that's written on the button. This can lead to some confusion for guests picking up the remote, but we've mapped it so that the commonly used functions are easy to access and near each other -- the most important being the arrow keys (see the leftmost remote in Figure 1 and the previous configuration snippet).
Finding Further Documentation for lirc
The the lirc website has pointers to a lot of resources on remote controls. Some documentation can be a bit out-of-date, so your mileage might vary on how much you have to tweak the instructions for your setup. However, it is a complete resource that covers most questions. Documentation on hardware compatibility, building your own receiver, and using lirc for sending infrared signals to other devices might prove invaluable for your setup.
Compiling MythTV
You are now ready to compile MythTV; this takes the source code you have downloaded and turns it into program files that are executable by the computer.
First, run the configure script to get MythTV configured for compilation. configure determines system-specific information; many open source developers use it to create packages that work on a large variety of systems. Here you can set some specific options about how you want MythTV to be built. The simplest method is to run the configure program without any options. This will look something like this:
$ cd mythtv $ ./configure # Basic Settings Compile type release Compiler cache yes DistCC no qmake /usr/bin/qmake-qt4 install prefix /usr/local runtime prefix /usr/local CPU x86_32 (model name : Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz) ... # Bindings bindings_perl yes bindings_python yes Creating libs/libmythdb/mythconfig.h and libs/libmythdb/mythconfig.mak
If you are going to be using a DVB card (the digital TV broadcast specification used in most of the world, but not in the United States) or a remote control, you’ll need to specify some options to configure. For initial simplicity, we’ll just continue with enabling DVB support by specifying --enable-dvb and --enable-proc-opt (which is recommended by the MythTV configure script when enabling DVB because of the extra CPU required to process digital television). If you’re using lirc for remote control, you need to also use --enable-lirc as well. Running configure with these options, the command should look something like this:
$ ./configure --enable-dvb --enable-proc-opt --enable-lirc
Now we're ready to compile:
$ makeLots of output will now be printed to the screen, as each part of MythTV is built. How long this takes will vary based on the speed of your machine, the number of processors in your machine, and the speed of your disks. It took around 15 minutes on one of our machines. After it has completed, you can install MythTV by executing "make install" with the appropriate permissions -- this means running make install with sudo, like this:
$ sudo make install
All the files needed by MythTV will now be copied into directories under /usr/local/. Its now time to move on to installing plugins. We need a new version of the plugins even if we previously had a version of MythTV installed because the plugins use internal components of MythTV which change between releases. We described how to install the plug-ins in Installing Other Plug-Ins. To save you digging around in that chapter, I'll briefly describe the process again. Change directory to the one you checked the plugins out to, and then run these commands:
$ sudo apt-get build-dep mythplugins
| liblame-dev vs libmp3lame-dev again! |
|---|
| I again had problems with liblame-dev and libmp3lame-dev conflicting, although this will hopefully be fixed by the time you read this. If you have a problem like that described in the sidebar above, then try just installing the components you need, like this: $ sudo apt-get install cvs fftw-dev fftw2 gawk gcc-4.2-base gettext-kde kdelibs-data kdelibs4-dev kdelibs4c2a kdesdk-scripts libaa1-dev libacl1-dev libart-2.0-dev libarts1-dev libarts1c2a libaspell-dev libattr1-dev libaudiofile-dev libavahi-client-dev libavahi-common-dev libavahi-qt3-1 libavahi-qt3-dev libbz2-dev libcaca-dev libcdaudio-dev libcdaudio1 libcdparanoia0-dev libcucul-dev libdbus-1-dev libdirectfb-dev libdirectfb-extra libesd0-dev libexif-dev libflac-dev libgfortran2 libidn11-dev libilmbase-dev libjasper-dev liblua50 liblua50-dev liblualib50 liblualib50-dev libmad0 libmad0-dev libmpich1.0gf libmyth-0.21-0 libmyth-dev libncurses5-dev libopenexr-dev libpcre3-dev libpcrecpp0 libqt3-mt-mysql libsasl2-dev libsdl1.2-dev libslang2-dev libsysfs-dev libtag1-dev libvisual-0.4-dev libxml2-dev libxslt1-dev lua50 |
$ cd ../mythplugins $ ./configure --enable-transcode --enable-vcd --enable-aac --enable-festival Configuration settings: qmake /usr/bin/qmake-qt4 MythArchive plugin will be built MythBrowser plugin will be built MythControls plugin will be built MythFlix plugin will be built MythGallery plugin will be built ... $ make ... $ sudo make install ...
Finally, you need to install the themes you just downloaded. Again, it’s a case of following the configure, make, make install pattern:
$ cd ../myththemes $ ./configure $ make $ sudo make install ...
Conclusion
In this chapter we've discussed installing lirc and MythTV from source, as an alternative to using MythBuntu. In the next chapter, Configuration, we'll cover initial configuration of MythTV, which is common to both MythBuntu and a custom compiled MythTV.



