Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi

Wednesday, January 27, 2010

Compiling New GCC on Old RHEL 4

We're trying to run some new software that requires a fairly new version (4.4.2) of the gcc compiler, but we're on RHEL4. Solution? Compiling it myself. Usually, this isn't too much of a problem. Today I ran into a few snags. I thought I would post this quick and dirty solution to the problem in hopes of making it a little easier for somebody else if they ran into the same issue.
First, the new version of gcc requires mpfr and gmp. I had those installed from some previous work, so I pointed to them with the --with-gmp= and --with-mpfr= configure options. Configure seemed to work OK, but then it would bomb during the make with an error:
checking for suffix of object files... configure: error: in `/$HOME/gcc-4.4.2/i686-pc-linux-gnu/libgcc':
I was dumbfounded. After some looking, and several articles that appeared to be talking about something totally different, I decided to experiment with LD_LIBRARY_PATH, my old friend / nemesis. It seems that if I set LD_LIBRARY_PATH to the lib directories where I installed gmp and mpfr, the make works fine. For some reason, it wasn't enough to pass them as arguments to configure. Happily, this solved my problems. Go (con)figure!

Wednesday, January 13, 2010

Installing Firefox 3.5 in Red Hat Enterprise Linux 4

I've been struggling with this problem for quite a while now. Every time I decide it's time to do it, there's just enough pain and other things to make me decide to turn back. Today, it was time to plow through it and get things working. One of the things that made me decide is that I found rpm files for firefox 3.0, and I figured it couldn't be too much different.

To install the firefox 3.0 rpm, I needed the following rpms to be installed:

rpm -Uvh evolution28-glib2-2.12.3-6.el4.i386.rpm
rpm -Uvh evolution28-atk-1.12.2-4.el4.i386.rpm
rpm -Uvh evolution28-cairo-1.2.4-6.el4.i386.rpm
rpm -e seamonkey-nss
rpm -e seamonkey-nspr
rpm -Uvh nspr-4.7.3-1.el4.i386.rpm
rpm -Uvh nss-3.12.2.0-4.el4.centos.i386.rpm
rpm -Uvh evolution28-pango-1.14.9-7.el4.i386.rpm
rpm -Uvh evolution28-gtk2-2.10.4-25.el4.i386.rpm
rpm -Uvh firefox-3.0.7-3.el4.centos.i386.rpm

The first thing I found was that I needed to explicitly set my LD_LIBRARY PATH.

setenv LD_LIBRARY_PATH /usr/evolution28/lib:$LD_LIBRARY_PATH

Then, it was still giving me errors about some libdbus libraries, but it was just the wrong version. I tried an old trick, making soft links with the new names to the old libraries. For a moment, I thought I had won. However, after running once, if you shut down firefox, it will not start on subsequent invocations.
To get past this, I decided to install my own dbus library. I wanted to install it somewhere inconsequential, so that it would not interfere with any other tools.
I downloaded dbus-1.2.16.tar.gz, then extracted it.

./configure --prefix=/path/to/dbus/
make
make install
setenv LD_LIBRARY_PATH /path/to/dbus/:$LD_LIBRARY_PATH


This seems to have tamed the beast which is firefox 3.5 on Red Hat Enterprise 4 (RHEL4).
I will try to keep this post updated if I find other requirements.