Linux Installation Notes
Notes on installing ESPACE 2.6.1 on Linux RedHat 4.2 and 5.0
Ole Hansen, 11 June 1998
last updated 27 March 1999
System Requirements
ESPACE is fully supported on current versions of Linux. It has been tested
with the RedHat distributions 4.2, 5.0, 5.1, and 5.2 as well as with
SuSe 5.1. All 2.0.x kernel versions and higher should work.
To be able to compile ESPACE on you own Linux system, you will need the
following software:
- Absoft FORTRAN F77 v4.4 (included in Pro Fortran 5.0)
- GNU make 3.74
- CERNLIB
- libf2c or libg77
Regarding CERNLIB and libf2c/g77, the situation is a little
complicated because the exact versions of these packages you will need
depend on which kind of Linux system you are running:
- RedHat 4.2 (and presumably other distributions using libc5):
EITHER
- CERNLIB 97a
- libf2c 0.22 (the standard libf2c that comes with the distribution)
(the libf2c that comes with g77 0.5.21 will also work).
OR
- CERNLIB 98
- libf2c from g77 0.5.21 or libg77 from g77 0.5.22
(your default libf2c will not work and you will
need to install g77).
- RedHat 5.0 (and presumably other distributions based on glibc):
- CERNLIB 98, compiled with egcs for RedHat 5.0
- libf2c from g77 0.5.21 or libg77 from g77 0.5.22
(your default libf2c will not work and you will
need to install g77).
If you use the "standard" CERNLIB 98 (compiled with g77), ESPACE will
link and run, and you will be able to analyze data correctly, but the
KUIP interface will be partly broken and you won't be able to exit
ESPACE gracefully.
Here is where you can get these software packages:
CERNLIB 97a: asisftp.cern.ch:cernlib/pc_linux/97a/tar
file cernlib.tar.gz
CERNLIB 98 egcs: asisftp.cern.ch:cernlib/pc_linux/98/other.ports
file rh50.egcs102.lib.tar.gz
g77: sunsite.unc.edu:pub/Linux/devel/lang/fortran
ESPACE also requires a number of system libraries to be present to link
correctly. A typical list (for RedHat 5.0 with g77 0.5.22) is given here:
libXt.so.6 => /usr/X11R6/lib/libXt.so.6
libX11.so.6 => /usr/X11R6/lib/libX11.so.6
libg77.so.0 => /usr/lib/libg77.so.0
libm.so.6 => /lib/libm.so.6
libc.so.6 => /lib/libc.so.6
libSM.so.6 => /usr/X11R6/lib/libSM.so.6
libICE.so.6 => /usr/X11R6/lib/libICE.so.6
Makefile and Environment Variables
Depending on your configuration, you will need to change the Linux
section of the top-level Makefile. The Makefile contains some comments
by Jeff Templon that should be helpful. I find that I do not need
his "kludge" on RedHat 5.0 with g77 0.5.22. The Makefile in
the distribution is configured for RedHat 4.2 with g77 and
will work on ifarml1/2.
If you have g77 0.5.21 or earlier, the g77-enabled library will be called
libf2c, but if you have 0.5.22 (the current version), the library
will be called libg77. By default, the Makefile will try to link with
libf2c. You should edit this if you have libg77.
The Absoft compiler is usually installed as the default "f77" command.
If that is true on your system then the Makefile will call this
compiler correctly. On some systems, the Absoft compiler has a different
name, however. (You may judge... ;) For example, on the ifarml1/2
machines at JLab, it is /usr/lib/Af77. In this case you will need to
put a link called "f77" pointing to Af77 in a directory in you PATH.
On ifarml1/2, I did 'ln -s /usr/bin/Af77 ~ole/bin/f77'. Alternatively,
you can go and change a number of Makefiles ...
Important:
The compiler provides the option to optimize the code for PentiumPro
(including Pentium II) machines. The corresponding command line
flag is -B100. Likewise, there is a Pentium optimization option, -B101.
Since most of us will be working with Pentium Pro/II machines,
-B100 is enabled by default in the distributed Makefile. If you have a
Pentium or less, you will need to comment out the appropriate lines.
You might be able to compile the code with the Portland Group f77 compiler,
but that has never been tested. You will most certainly have to
change the top-level Makefile.
Before you compile, please make sure that the following environment
variables are set: (assuming your CERNLIB is in /cern/pro/lib and your
ESPACE is in /home/myname/espace):
CERN=/cern (or your CERNLIB directory)
CERN_ROOT=/cern/pro
CERN_LEVEL=pro
OSNAME=Linux
HALLA_DIR=/home/myname/espace (or your ESPACE directory)
Also, please make sure that your 'perl' is located in /usr/local/bin.
On RedHat systems, perl is usually in /usr/bin, so you need to make
a link: ln -s /usr/bin/perl /usr/local/bin/perl. If you do not
do this, sfmakedepend will fail with 'command not found'.
You might get warnings about misaligned variables u1,v1,w, never used
variables, and "Can't find file ...". You can ignore these messages.
They should no longer occur with ESPACE 2.7 or later.
Binary distributions
If you do not have the Absoft F77 compiler on your own system, you can do
code development on ifarml1/2 and the copy the executable to your system.
I can run the executable created on ifarml2 under RedHat 4.2 on my
RedHat 5.0 system without problems.
The precompiled, official version of ESPACE is in
/work/halla/software/bin/Linux/espace. It was compiled on ifarml2
and should run under RedHat 4.2 and 5.0.
Brief notes on installing g77 0.5.22
- Get the tar file from a Linux ftp site.
- (optional) save your original gcc: cp /usr/bin/gcc /usr/bin/gcc.orig
- Become superuser, go to the top-level directory, and extract the
g77 tar file.
- Now you have a new gcc which understands Fortran. To check, type
gcc --version. You should see 2.7.2.3.f.2
- Unfortunately, the installation is not yet compete. You must copy
a number of missing files into the loader directory as follows:
Go to /usr/lib/gcc-lib/i486-linux/2.7.2.3 and type
cp -iR ../../i386-redhat-linux/* .
Answer "no" to any questions about overwriting a file.
- Your new gcc/g77 compilers should now work.
- If you get messages such as "crtbegin.o not found", make sure the
file exists in /usr/lib/gcc-lib/i486-linux/2.7.2.3
Maintained by Ole Hansen
(ole@jlab.org)
Last modified: Mon Mar 29 15:20:00 1999