How To Install flang on Fedora 34

flang is a Fortran language front-end designed for integration with LLVM a Fortran language front-end designed for integration with LLVM

Introduction

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

What is flang

Flang is a ground-up implementation of a Fortran front end written in modern C++. flang 12.0.0 1.fc34 x86_64 6.7 M flang-12.0.0-1.fc34.src.rpm updates a Fortran language front-end designed for integration with LLVM https ASL 2.0 with exceptions Flang is a ground-up implementation of a Fortran front end written in modern C++.

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

Install flang 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 flang using dnf by running the following command:

sudo dnf -y install flang

Install flang 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 flang using yum by running the following command:

sudo yum -y install flang

How To Uninstall flang on Fedora 34

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

sudo dnf remove flang

flang Package Contents on Fedora 34

/usr/bin/f18
/usr/bin/flang
/usr/bin/tco
/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/c2eb9ec5e85d9876d23c0f70e0e07174288153
/usr/lib/.build-id/34
/usr/lib/.build-id/34/401556c89791f306e5a54ae593412cd48df196
/usr/lib/.build-id/41
/usr/lib/.build-id/41/4e51ceb5bc275aced86960a8903b975c237f17
/usr/lib/.build-id/60
/usr/lib/.build-id/60/ce168e9bd5ea1a9b5139b05e722cf7aabc0a55
/usr/lib/.build-id/8a
/usr/lib/.build-id/8a/454ae69603bc34e18908ca8e7abc838a05b68c
/usr/lib/.build-id/be
/usr/lib/.build-id/be/764e4154d4c84b01421bf2d886a99dfd283050
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/9da560820fe903fa1ab57634fce470b32298ee
/usr/lib/.build-id/e1
/usr/lib/.build-id/e1/57cae95940c52f8b432b1a9595474d1ceba34b
/usr/lib/.build-id/e6
/usr/lib/.build-id/e6/368f556ce9f1eac5b8ea707143c1863223190e
/usr/lib/.build-id/ea
/usr/lib/.build-id/ea/3659e9ea1946412128f322a6235a2efbab4eae
/usr/lib64/libFIROptimizer.so.12
/usr/lib64/libFortranCommon.so.12
/usr/lib64/libFortranDecimal.so.12
/usr/lib64/libFortranEvaluate.so.12
/usr/lib64/libFortranLower.so.12
/usr/lib64/libFortranParser.so.12
/usr/lib64/libFortranRuntime.so.12
/usr/lib64/libFortranSemantics.so.12
/usr/share/licenses/flang
/usr/share/licenses/flang/LICENSE.txt
/usr/bin/f18
/usr/bin/flang
/usr/bin/tco
/usr/lib/.build-id
/usr/lib/.build-id/15
/usr/lib/.build-id/15/b3d394229151515cf482e41981481461593704
/usr/lib/.build-id/1b
/usr/lib/.build-id/1b/e0c3bfc0bdf8273a754432b6da2a139a089e54
/usr/lib/.build-id/3d
/usr/lib/.build-id/3d/dc72057512392f4fd26380731eb4086a618b78
/usr/lib/.build-id/4e
/usr/lib/.build-id/4e/ffb21be21b03142c474af238afcfa981b540ad
/usr/lib/.build-id/53
/usr/lib/.build-id/53/b7aadf6172eb1cce5e383df424a4b972bc7f55
/usr/lib/.build-id/74
/usr/lib/.build-id/74/d5010e1a89a7bf22bf98c9cece252423f0501c
/usr/lib/.build-id/84
/usr/lib/.build-id/84/89668567e67d91e9d54e8542c8a666351167c4
/usr/lib/.build-id/97
/usr/lib/.build-id/97/5701ef191c4dcc94449c92f7585b00ba425e3f
/usr/lib/.build-id/a3
/usr/lib/.build-id/a3/a6a6ebd89f8060bbe8d56f548b062073fe86cc
/usr/lib/.build-id/f2
/usr/lib/.build-id/f2/995ddab4b7e22f68f53f81aae052909e435e9d
/usr/lib/libFIROptimizer.so.12
/usr/lib/libFortranCommon.so.12
/usr/lib/libFortranDecimal.so.12
/usr/lib/libFortranEvaluate.so.12
/usr/lib/libFortranLower.so.12
/usr/lib/libFortranParser.so.12
/usr/lib/libFortranRuntime.so.12
/usr/lib/libFortranSemantics.so.12
/usr/share/licenses/flang
/usr/share/licenses/flang/LICENSE.txt
/usr/bin/f18
/usr/bin/flang
/usr/bin/tco
/usr/lib/.build-id
/usr/lib/.build-id/29
/usr/lib/.build-id/29/9779a3e621a8e11ed10c5fa364c2562f6f7140
/usr/lib/.build-id/37
/usr/lib/.build-id/37/91ec47ce6cf20f56e4eeba89339a75eaf7189e
/usr/lib/.build-id/39
/usr/lib/.build-id/39/c4d3129d2f7e831b1ed3a3c49987ca61a32386
/usr/lib/.build-id/71
/usr/lib/.build-id/71/07873c26c6269d15c9e624ce67e66907ecf1de
/usr/lib/.build-id/7c
/usr/lib/.build-id/7c/9ffd102e36047ccd8d76189161f7f4dc1469cd
/usr/lib/.build-id/e5
/usr/lib/.build-id/e5/cbcfe5d58c366c9fb8cf16bf74d0f56ad606eb
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/38053720082b7bf722d0a555ca238c431e050a
/usr/lib/.build-id/e8/a8d9df604ba9bd4be76ac0d7df04161c56c866
/usr/lib/.build-id/ee
/usr/lib/.build-id/ee/a12cb6b5fcc2648881ce004744b3de6332c023
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/6f14e11db832e4044f9d562addead31e45ce7b
/usr/lib64/libFIROptimizer.so.12
/usr/lib64/libFortranCommon.so.12
/usr/lib64/libFortranDecimal.so.12
/usr/lib64/libFortranEvaluate.so.12
/usr/lib64/libFortranLower.so.12
/usr/lib64/libFortranParser.so.12
/usr/lib64/libFortranRuntime.so.12
/usr/lib64/libFortranSemantics.so.12
/usr/share/licenses/flang
/usr/share/licenses/flang/LICENSE.txt
/usr/bin/f18
/usr/bin/flang
/usr/bin/tco
/usr/lib/.build-id
/usr/lib/.build-id/37
/usr/lib/.build-id/37/2e15ade87232bc3434537d960109fc6d06f324
/usr/lib/.build-id/4e
/usr/lib/.build-id/4e/c2e35fbb197b2cdc98c2930dfd236b66f7c430
/usr/lib/.build-id/50
/usr/lib/.build-id/50/ae0d03eeba31c115b083b10fd7fba0a2908f0b
/usr/lib/.build-id/5c
/usr/lib/.build-id/5c/8375af0cf65d0c6fd1af12552de00b2544bbea
/usr/lib/.build-id/79
/usr/lib/.build-id/79/e8bec567b55098e78c26c21acc18c7dc1c7c16
/usr/lib/.build-id/a1
/usr/lib/.build-id/a1/d63a9e5b0b90d35140f28f825bd5d6f27f2d33
/usr/lib/.build-id/a7
/usr/lib/.build-id/a7/e889177b4ec4a8d7450cea5da300301a1ded3e
/usr/lib/.build-id/be
/usr/lib/.build-id/be/30e4bf23c5fcdc550dc3f6bed158336025a0be
/usr/lib/.build-id/c7
/usr/lib/.build-id/c7/f1c4e50e3cf78becb1bc98d344bd6fcb631ecd
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/c0f94d5510ab4b9ab1d68bea1deb1b09907a88
/usr/lib/libFIROptimizer.so.12
/usr/lib/libFortranCommon.so.12
/usr/lib/libFortranDecimal.so.12
/usr/lib/libFortranEvaluate.so.12
/usr/lib/libFortranLower.so.12
/usr/lib/libFortranParser.so.12
/usr/lib/libFortranRuntime.so.12
/usr/lib/libFortranSemantics.so.12
/usr/share/licenses/flang
/usr/share/licenses/flang/LICENSE.txt

References

Summary

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