Next Previous Contents

4. Setting up paths, ldconfig and other shell variables.

There are modifications that need to be made to your system before you start compiling.

QTDIR needs to be set, and /usr/lib/qt3/bin must 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.

Also, check that there has been a link created in /usr/lib/qt3/mkspecs called default. If not, you'll get errors during the compile. See the Troubleshooting Section for more information.

4.1 Distribution-specific information.

Mandrake 9.0

The following instructions work for Mandrake 9.0 and 9.1 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. NOTE: ^D means press CTRL and d at the same time.

$ 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.

Red Hat Linux 8.0

Red Hat Linux 8.0 uses an unusual character encoding scheme which causes problems when running certain programs. As a result, whenever you run setup or mythfilldatabase you will have to set a variable to correct this problem. Failure to set this variable will result in a lot of UTF-8 errors.

There are two modifications that you can make to your system to avoid this problem. The first is a system wide solution, the second will only apply to your current user.

The global change is to modify the /etc/sysconfig/i18n file and set LANG="en_US". If you want the change to only affect a single user, you could create a file called ~/.i18n:

$ echo LANG="en_US" > ~/.i18n

4.2 Checking QTDIR and the PATH.

Open a new shell and switch to superuser mode.

$ su
# set

[lots of text]
QTDIR=/usr/lib/qt3
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/usr/lib/qt3/bin:/home/mythtv/bin:/usr/lib/qt3/bin
You should see QTDIR and /usr/lib/qt3/bin in your 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.

Next, we need to make sure that the libraries that we're building will be found when we need them.

4.3 Modifying /etc/ld.so.conf

Execute the following:

$ su -
# echo /usr/local/lib >> /etc/ld.so.conf
# /sbin/ldconfig
# exit
$ 


NOTE for Red Hat Linux 8.0 users:  It appears that Red Hat Linux 8.0
requires that the ldconfig command needs to be run twice. Red Hat will also
frequently "forget" about the path. It's recommended to run
/sbin/ldconfig after installing every package. Failing that, always
run it if you get an unexpected error about not finding libraries.


Next Previous Contents