I suggest you use the pre-compiled binaries from the CNS download site,
version 1.21. No compilation is needed.
For those who are having difficulty compiling cns v. 1.21 under Linux using gfortran 4.3 (fortran compiler fails test):
The problem seems to be the -malign-double switch. The documentation for gcc says that binary files compiled with this switch may not be compatible with those compiled without it (and probably won't link). Mine wasn't and it's quite possible that others also were not.. Here are three possible solutions:
1. Use the binary if you can (probably the best solution)
2. Drop the -malign-double switch. You can do this by editing
$CNS_SOLVE/instlib/ machine/supporte d/linux/arch_ env
and commenting out lines 27-30:
# set -malign-double flag on intel-based machines
#setenv CNS_MALIGN_I86 ""
#if ( $CNS_ARCH =~ *-i 86-* ) then
# setenv CNS_MALIGN_I86 "-malign-double"
Then run make install and things should work, hopefully. This will solve the compiler test problem on i686 processors, but not x64 ones.
3. Or you could re-compile the gfortran libraries using the -malign-double switch. I haven't bothered to do this, so I don't know how well it would work out.
-malign-double is supposed to give a small performance boost on Pentium processors at the expense of using more memory. Removing it may make CNS run more slowly, but probably won't affect anything else. After dropping this switch, CNS successfully compiled and linked. My installation passed all of the tests, but did run more slowly (on an older and slower computer with a rather small amount of memory) than Dr. Brunger's.
Hope this helps,
Axel T. Brunger
Investigator, Howard Hughes Medical Institute
Professor of Molecular and Cellular Physiology
Phone: +1 650-736-1031
Fax: +1 650-745-1463