Compiling CNS: gfortran: error: test_f.o: No such file or directory

Hi, I know this is specific to CNS but I was hoping someone might be able to help here. I’m unable to compile CNS. My cns_solve_env is correct. Running “sudo make install compiler=gfortran” from my cns_solve_1.3 directory, I get the following error.

C compiler passes test
compiling: gfortran -fdefault-integer-8 -w -fallow-argument-mismatch -O3 -funroll-loops -ffast-math -static
gfortran: error: unrecognized command line option ‘-fallow-argument-mismatch’; did you mean ‘-Wno-argument-mismatch’? linking: gfortran -w -static-libgfortran
gfortran: error: test_f.o: No such file or directory
/bin/sh: 1: ./test_f: not found
***** ERROR: problem with Fortran compiler ***** make[3]: *** [Makefile:18: fortran-test] Error 2
make[2]: *** [Makefile:205: compiler-test] Error 2
make[1]: *** [Makefile:68: compiler-test] Error 2
compiler problems - stopping installation
please check compilers before retrying installation
make: *** [Makefile:38: install] Error 1

I can’t see anything pointing to test_f so I don’t know where to look. My linux archtecture (intel-x86_64bit-linux) is supported.

This problem seemed related to this thread since I was running bash. I tried to chsh into csh, but no luck. I tried copying that script and sourcing it under bash, but I get the same error. Is there something I need to source when moving to csh?

Try following the installation instructions from the following site:

It is for haddock3, but can be followed as well for haddock2.4/5 (simply change the location of the cns1.3 files provided with haddock when you have to copy those to your CNS source directory).