# Compiling CNS: gfortran: error: test\_f.o: No such file or directory

**URL:** <https://ask.bioexcel.eu/t/compiling-cns-gfortran-error-test-f-o-no-such-file-or-directory/5183>\
**Category:** Uncategorized\
**Created:** [July 8, 2024, 10:56pm UTC](https://ask.bioexcel.eu/t/compiling-cns-gfortran-error-test-f-o-no-such-file-or-directory/5183 "2024-07-08T22:56:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gractor](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@gractor](https://ask.bioexcel.eu/u/gractor)\
**Post date:** [July 8, 2024, 10:56pm UTC](https://ask.bioexcel.eu/t/compiling-cns-gfortran-error-test-f-o-no-such-file-or-directory/5183/1 "2024-07-08T22:56:58Z")

</div>

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](https://www.mail-archive.com/ccp4bb@jiscmail.ac.uk/msg27616.html) 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?

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [July 9, 2024, 3:01pm UTC](https://ask.bioexcel.eu/t/compiling-cns-gfortran-error-test-f-o-no-such-file-or-directory/5183/2 "2024-07-09T15:01:42Z")

</div>

Try following the installation instructions from the following site:

[https://www.bonvinlab.org/haddock3/CNS.html](https://www.bonvinlab.org/haddock3/CNS.html)

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).

---

<div class="post-metadata">

**Author:** ![gractor](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@gractor](https://ask.bioexcel.eu/u/gractor)\
**Post date:** [July 18, 2024, 7:06pm UTC](https://ask.bioexcel.eu/t/compiling-cns-gfortran-error-test-f-o-no-such-file-or-directory/5183/3 "2024-07-18T19:06:32Z")

</div>

Thank you. As it turns out, we had an older version of gfortran that came with Ubuntu 20.04 and had to reinstall (not update/upgrade) before it would work.
