How To Install ftnchek on Fedora 34

ftnchek is Static analyzer for Fortran 77 programs

Introduction

In this tutorial we learn how to install ftnchek on Fedora 34.

What is ftnchek

ftnchek is a static analyzer for Fortran 77 programs. It is designed to detect certain errors in a Fortran program that a compiler usually does not. ftnchek is not primarily intended to detect syntax errors. Its purpose is to assist the user in finding semantic errors. Semantic errors are legal in the Fortran language but are wasteful or may cause incorrect operation. For example, variables which are never used may indicate some omission in the program; uninitialized variables contain garbage which may cause incorrect results to be calculated; and variables which are not declared may not have the intended type. ftnchek is intended to assist users in the debugging of their Fortran program. It is not intended to catch all syntax errors. This is the function of the compiler. Prior to using ftnchek, the user should verify that the program compiles correctly.

We can use yum or dnf to install ftnchek on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install ftnchek.

Install ftnchek on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install ftnchek using dnf by running the following command:

sudo dnf -y install ftnchek

Install ftnchek on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install ftnchek using yum by running the following command:

sudo yum -y install ftnchek

How To Uninstall ftnchek on Fedora 34

To uninstall only the ftnchek package we can use the following command:

sudo dnf remove ftnchek

ftnchek Package Contents on Fedora 34

/usr/bin/dcl2inc
/usr/bin/ftnchek
/usr/lib/.build-id
/usr/lib/.build-id/de
/usr/lib/.build-id/de/78541d84d5b2e5d689b4af74fcefdf4d441914
/usr/share/doc/ftnchek
/usr/share/doc/ftnchek/FAQ
/usr/share/doc/ftnchek/LICENSE
/usr/share/doc/ftnchek/PATCHES
/usr/share/doc/ftnchek/README
/usr/share/emacs/site-lisp/ftnchek
/usr/share/emacs/site-lisp/ftnchek/ftnchek.el
/usr/share/emacs/site-lisp/ftnchek/ftnchek.elc
/usr/share/ftnchek
/usr/share/ftnchek/dcl2inc.awk
/usr/share/man/man1/dcl2inc.1.gz
/usr/share/man/man1/ftnchek.1.gz

References

Summary

In this tutorial we learn how to install ftnchek on Fedora 34 using yum and dnf.