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-automaticto 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.xIf 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
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.
rpm -q gcc glibcto find out which compilers you are using. Submitted results with different combinations are tabulated below:
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.1This 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'