I recently started using tetr, a user friendly program for setting up DFT calculations among other things. Tetr, has to be built on the users (unix) machine. A makefile is available, however, the objects used for the build are 32-bit fortran objects. This lead me into some problems with the build. I thought I would provide my solution here just in case anyone else is having the same issue.
My solutions was to just compile using the gfortran compiler (which can be installed from the Ubuntu software centre) using a 32-bit flag to force a 32 bit compile. However there are some issues with libraries which need to be solved. First you need to install some new 32 bit libraries with:
sudo apt-get install ia32-libs
sudo apt-get install lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
sudo apt-get install lib32asound2 lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev
sudo apt-get install g++-multilib
sudo apt-get install libgfortran3:i386
Then set up a coulple of symbolic links:
sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
sudo ln -s /usr/lib/i386-linux-gnu/libgfortran.so.3 /usr/lib/i386-linux-gnu/libgfortran.so
Then update LD_LIBRARY_PATH in /etc/profile with:
sudo gedit /etc/profile &
Add these 2 lines to the end of the file:
Save and exit gedit.
Finally replace the make file with THIS make file, and make like usual.