4. System Configuration Requirements for Compiling MythTV.
Before you compile MythTV from the current source tarball or from subversion, you may need to modify your system configuration in a few ways.
In general, if you install MythTV from pre-packaged binaries for your Linux distribution/version, you don't need to be too concerned about the issues in this section of the HOWTO - the install script for the packages should take care of them. However, this section is still recommended reading which may help if the packager skipped a step in their packaging.
4.1 Software requirements for compiling MythTV
General requirements
MythTV is written in C++ and requires a fairly complete, but standard,
compilation environment, including a recent g++ compiler, make
, and
appropriate header files for shared libraries. Any standard Linux
distribution should be able to install a suitable compilation environment
from its packaging system. Section 3.2 of this HOWTO provides some details
of how to install the required environment for many distributions.
Subsequent sections of this chapter address the few oddities that you may have to adjust by hand before you compile MythTV.
The reference compilation system for MythTV is Ubuntu.
4.2 Shared-Library requirements for MythTV
Modifying /etc/ld.so.conf
The runtime manager for shared libraries, /lib/ld.so, gets
information about the locations and contents of shared libraries from
/etc/ld.so.cache
, a file created by ldconfig from
information in /etc/ld.so.conf
. Because MythTV installs some
shared libraries in /usr/local/lib
, that directory needs to be
added to the list of directories for ld.so to search when doing
runtime linking of programs, if it is not already there.
You do this, as root, by editing /etc/ld.so.conf
, then
running ldconfig. There are many ways to do this; one that
works is to enter this series of commands:
$ su -
# echo /usr/local/lib >> /etc/ld.so.conf
# /sbin/ldconfig
# exit
$
4.3 Environment variable requirements for MythTV
General requirements
QT libraries and binaries
The compiler needs to be able to locate QT binaries and libraries in order to compile MythTV. QTDIR needs to be set and the directory holding the QT binaries needs to be added to your PATH. Your distribution may already be making these changes as a part of the installation of the software prerequisites detailed earlier.
One way to do this is as follows:
Open a shell and execute the following:
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/usr/lib/qt3/bin:/home/mythtv/bin:/usr/lib/qt3/bin
$ echo $QTDIR
/usr/lib/qt3
$ which qmake
/usr/lib/qt3/bin/qmake
For Mandriva, you should see a value like /usr/lib/qt3
for
QTDIR
and /usr/lib/qt3/bin
should be in $PATH.
For Gentoo, you should see a value like /usr/qt/3
for QTDIR
and /usr/qt/3/bin
should be in $PATH.
If you don't, do not proceed past this step until you have resolved this error. You may need to manually specify the QTDIR and PATH at the shell prompt before compiling.
Also, check that there has been a link created in
/usr/lib/qt3/mkspecs
(/usr/share/qt3/mkspecs
for Debian)
called default
. If not, you'll get errors during the compile. See
the Troubleshooting Section for more information.
Distribution-Specific Notes
Mandriva
The following instructions work for Mandriva using
bash as the shell, and may be applicable for a distribution which
uses /etc/profile.d
.
As root, create the following file in /etc/profile.d
The example
filename is "mythtv.sh". Use what you feel is appropriate.
Open a shell, and switch to superuser mode.
$ su
# cd /etc/profile.d
cat > mythtv.sh
export QTDIR=/usr/lib/qt3
export PATH=$PATH:/usr/lib/qt3/bin
^D
# chmod a+x mythtv.sh
# exit
$ exit
The last two commands are to exit out of the shell. This way, when you next
open a shell your new commands
will take effect.
Device Permissions
MythTV will need access to the video4linux devices on your system. By default, your distribution may restrict access to these devices to the logged-in user, so if you will be automatically starting mythbackend from a script rather than an interactive terminal session you will need to make some adjustments.
NOTE: The following instructions are accurate for Mandriva.
Check for a file called /etc/security/console.perms
. Open the file
in your favorite text editor and look for a line that has:
<console> 0600 <v4l> 0600 root.video
and replace it with
<console> 0666 <v4l> 0666 root.video
What we're doing is allowing read and write access to the files in the video4linux directory.
Next Previous Contents