IGNORE THIS PAGE

It has been superseded by the CCP4 For Linux page.

Just to set the record straight, I would like to state here and now that the problems people have been having on RedHat 7.1 and 7.2, and other linux distros, are not the fault of the compilers shipped with 7.1 or 7.2. (either 2.96rh, or 3.0).

There are some assumptions in some ccp4 code, which are technically invalid with the F77 spec, but have been traditionally incorrectly implemented in the majority of Fortran compilers. g77 is exceptional in interpreting the specifications correctly.

To compile ccp4 on Linux, simply add

-fno-automatic
to the XFFLAGS in all the makefiles.

The resulting code will give sensible results using the example refmac scripts. (Of course there may be smaller problems not picked up by this test, if so we now have a chance of finding them.)

To summarise: Redhat did good. We didn't.

CCP4 on RedHat 7.x

If you are running CCP4 on an out-of-box RedHat 7.x machine, CHECK YOUR INSTALLATION NOW. Your results may be unreliable. This may well apply to other Fortran packages, such as CNS, as well.

The first thing to try is the 'run-all' script in the $CEXAM/unix/runnable directory.

I have conflicting reports concerning RedHat 6.2, but the balance suggests it is OK. Some versions of Mandrake may also have problems.

RedHat 7.0 problems
RedHat 7.1 problems
Installing new compilers

CCP4 on RedHat 7.0

To be fair to RedHat and the developers, it looks like some of the problems are not strict Fortran, but they are tricks that work on every other platform.

Here is a test script: ftp://ftp.ysbl.york.ac.uk/pub/ccp4/rh7test.csh. A working logfile looks like this. A default RedHat 7 installation gives this, which is wrong. Please send me your logfiles, espcially for RedHat 6.X systems so I can find out where the problem started.

Refmac shows these problems most clearly, because it performs the most complex calculations, but most other programs are likely to be affected to a greater or lesser extent.

Use

 rpm -q gcc glibc
to find out which compilers you are using. Submitted results with different combinations are tabulated below:

System Results of rh7test.csh
Version gcc g77 glibc default
libccp4 -O
refmac -O0
optimised
libccp4 -O
refmac -O2
Notes
RedHat 6.0 base egcs-1.1.2-12 0.5.24 2.1.1-6 OK ?
RedHat 6.2 base egcs-1.1.2-30 0.5.24 2.1.3-15 OK? ? Conflicting reports
RedHat 7 base 2.96-54 ? 2.1.92-14 X ?
RedHat 7 glibc upgrade 2.96-54 ? 2.1.94-3 X ?
RedHat 7 up2date 2.96-69 0.5.26 2.2-12 X ? Multiple reports
RH 7 2.95 compiler 2.95.1 0.5.25 2.1.94-3 OK OK See below
RH 7 Portland compiler n/a n/a ? OK ?

I installed gcc-2.95.1 (an older version), which gives the correct results from the refmac5_tls.exam example script. Garib reports success with refmac even at -O2

I have made a tar file of the resulting binary distribution. This comes with no warrenty of any sort. If your local laws forbid `no warrenty' clauses, then you are forbidden from downloading this file. Otherwise, pick it up from: ftp://ftp.ysbl.york.ac.uk/pub/ccp4/ccp4-4.1.1-rh7.tar.gz (80Mb) This contains the entire distribution.


CCP4 on RedHat 7.1

This information was provided by Alun Ashton:

The default compilers (2.96-84) do not produce a working suite. If you upgrade to the latest RedHat packages (2.96-85), and reduce the optimisation level for compilation to '-O0' by editting the makefiles, then you get a suite which will almost run the 'run-all' test, although the results have not been checked at this point.

However, the recommended course is to install a working compiler. gcc 3.0 will compile the whole suite at default optimisation and give a working result.


Installing a new compiler

(without breaking your existing one)

Once you have a working C compiler, (i.e. you've upgraded 7.0 to 2.96-69 or 7.1 to 2.96-85), then the best thing to do is to compile and install a stable version, such as 2.95.3 or 3.0, in /usr/local/

For me this was as easy as downloading the tarballs from gcc.org (including cpp and g77, and also g++ and libstdc++ in my case), and doing a configure, make, make install. There is no interference with the rest of the system. 2.95.3 also seems about twice as fast (compiling) than 2.96-x.

Then set the following environment variables

 setenv CC /usr/local/bin/gcc
 setenv FC /usr/local/bin/g77
(for csh) or
 export CC=/usr/local/bin/gcc
 export FC=/usr/local/bin/g77
(for bash).

Finally, recompile ccp4 with 'make clean; configure --with-x linux; make'