Alas some of the wave propagation codes I use on my v10.04 and v11.10 Ubuntu Linux systems require the outdated g77 compiler.
However, g77 is no longer being maintained and was last made to support GCC 3.4. More recent Ubuntu versions use GCC 4.X and so dropped g77 from their default package manager lists. Took a little bit to figure out how to get the relevant stuff installed and working on these computers, as I still needed the GCC 4.X for other content on the machines. Here's what I did:
The overall summary is, to get g77 and its libraries you have to temporarily modify an apt-get repository list file, install g77 (which automatically also installs its GCC 3.4 dependencies which won't interfere with your gcc 4.x), and then set the repository file back to its original state. Also, there's an additional little fix to install g77 in Ubuntu 11.10 that wasn't in Ubuntu 10.04 (I haven't tried the versions of Ubuntu in between): a few libs moved location, so you simply use an environment variable to tell g77 where they are. Steps detailed below:
sudo vi /etc/apt/sources.list, then append the following lines to end of file:
## temporarily adding these to install G77 which is no longer supported:
deb http://hu.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://hu.archive.ubuntu.com/ubuntu/ hardy universe
deb http://hu.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://hu.archive.ubuntu.com/ubuntu/ hardy-updates universe
sudo aptitude update
sudo aptitude install g77 blcr-dkms: blcr-util: dkms: fakeroot: libcr0: libibverbs-dev: openmpi-common:
(Those entries with colons afterward prevent those packages from being removed to match the outdated setup, which we don't wish to do)
sudo vi /etc/apt/sources.list again and comment out those above lines at end of file.
sudo aptitude update
If you're running Ubuntu 11.10 (but this is not needed for 10.04; I don't know about versions in between, the error is about finding libs crt1.o, crti.o and lgcc_s):
Before running make (or g77 in general) you'll need to enter the following line in your shell (note this is bash style here, mod as needed for other shells):
(Note that is not the more common variable LD_LIBRARY_PATH...)
If you plan to do a lot of g77 compiles you might wish to add that LIBRARY_PATH line to your ~/.bashrc file, but for just one or two compiles I personally choose not to do so.
Note that executables made with this g77 may rely by default on shared object libraries of g77/gcc 3.4, so if you copy your executable over to other modern Linux systems (say another 10.04 or 11.10 box -- e.g. I use mine in a cluster), you may get a runtime error about shared object files. The solution is to install g77 on that other system as well by the same instructions above, so that the shared object files exist. It goes pretty quickly after the first time.