0

Whilst attempting to make/compile the grafic package, I'm seeing this error after calling the make command within the grafic directory:

f77 -O2 -c grafic1.f
make: f77: No such file or directory
make: *** [grafic1.o] Error 1

I have XCode and all associated command line tools installed, what could be causing this error?

user3332704
  • 41
  • 2
  • 3
  • 1
    A lack of a Fortran compiler, not part of the standard distribution of Xcode nor of its related command-line tools, could be causing that error. Did you install a Fortran compiler ? – High Performance Mark Mar 03 '15 at 13:30

1 Answers1

2

This error is make telling you that you have no binary in your path called f77. There are two things you need to look at the fix this:

  1. Do you have a Fortran compiler installed? MacOS X/Xcode does not come pre-installed with one by default. The easiest options to install one are via third-party tools like macports or homebrew where you can install gfortran which may be a standalone package or may be part of the gcc package.

  2. Once you have a compiler installed, your makefile needs to know about it. Without seeing the makefile this is only an assumption, but if autotools are not used the fortran compiler is usually hardcoded in a variable called FC, e.g. you might see a line

    FC=f77
    

    and you would change this to

    FC=gfortran
    

    assuming gfortran is in your path.

Once you have a Fortran compiler installed and the makefile knows about it, you should be able to execute make successfully.

casey
  • 6,855
  • 1
  • 24
  • 37