0

I installed gfortran in Mac OS X Yosemite following the instruction given in this link. So first, I installed command line tools. I did this by clicking the install button that is offered when I tried to run $ make command because this command requires command line tools, I think. Then install gfortran. There was no abnormal message during the installation. Moreover, I tried compiling some simple codes and they were successful. However, when I execute $ man gfortran, the terminal application said that the manual for gfortran does not exist. Can someone find out what the reason is? Despite being able to compile some simple programs, I am worried if this actually indicates that certain part of the installation failed and prevents me to compile a certain more involved program in the future.

nougako
  • 234
  • 1
  • 8

3 Answers3

0

Some previous words on the same subject:

How to fix "No manual entry for gcc"?

You can down load the pdf or HTML which (to me) seems more useful than man here: https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gfortran.pdf

Community
  • 1
  • 1
Holmz
  • 714
  • 7
  • 14
0

The installer installs a link to gfortran in /usr/local/bin. This should echo in

$ ls -lth /usr/local/bin/gfortran
$ file /usr/local/bin/gfortran

Can you copy the output of these commands? If gfortran is there and is not found when typing

$ gfortran

at the command line, you must check your PATH environment variable (see https://en.wikipedia.org/wiki/PATH_%28variable%29).

Pierre de Buyl
  • 7,074
  • 2
  • 16
  • 22
  • Thanks for your response. The output of the first command is `lrwxr-xr-x 1 root wheel 32B Nov 14 11:50 /usr/local/bin/gfortran -> /usr/local/gfortran/bin/gfortran` While the second produces `usr/local/bin/gfortran: Mach-O 64-bit executable x86_64` Gfortran should be there since I am able to compile. – nougako Nov 24 '16 at 07:40
  • Hi, The installer just provides the binary as a symbolik link https://en.wikipedia.org/wiki/Symbolic_link and does not "set" the rest of the environment. If you have already a setting for MANPATH (i.e. `echo $MANPATH` does not return an empty line) you can set it as `export MANPATH=/usr/local/gfortran/share/man:$MANPATH`, else `export MANPATH=/usr/local/gfortran/share/man`). The man command should find the help for gfortran afterwards. Typing `gfortran --help` is also useful. – Pierre de Buyl Nov 24 '16 at 08:51
0

I was able to track down the man page on what I think is a properly installed gcc.

Mac: bin $ apropos gfortran
gfortran-7(1), gfortran(1) - GNU Fortran compiler
gfortran-9(1), gfortran(1) - GNU Fortran compiler
Mac: bin $ man gfortran-9

This gives the manual page for

Mac: man1 $ gfortran --version
GNU Fortran (Homebrew GCC 9.2.0_3) 9.2.0