How To Install bear on Fedora 34

bear is Tool that generates a compilation database for clang tooling

Introduction

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

What is bear

Build ear produces compilation database in JSON format. This database describes how single compilation unit should be processed and can be used by Clang tooling.

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

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

sudo dnf -y install bear

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

sudo yum -y install bear

How To Uninstall bear on Fedora 34

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

sudo dnf remove bear

bear Package Contents on Fedora 34

/usr/bin/bear
/usr/bin/citnames
/usr/bin/intercept
/usr/lib/.build-id
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/5155ce4429d0f1b938266107ec1870c1fdc066
/usr/lib/.build-id/6e
/usr/lib/.build-id/6e/3149d6808ed67fe69fe65b50c047cd5a22dc83
/usr/lib/.build-id/7e
/usr/lib/.build-id/7e/b21feb4c70e3beec0f46029b8e52dace7cfd47
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/260342862f5108b9e4ed45fc79eede1d67d2c9
/usr/lib/.build-id/f6
/usr/lib/.build-id/f6/8cbf7c3998c2e761bdb1ab1c02ee60bfdededf
/usr/libexec/bear
/usr/libexec/bear/libexec.so
/usr/libexec/bear/wrapper
/usr/libexec/bear/wrapper.d
/usr/libexec/bear/wrapper.d/ar
/usr/libexec/bear/wrapper.d/as
/usr/libexec/bear/wrapper.d/bison
/usr/libexec/bear/wrapper.d/c++
/usr/libexec/bear/wrapper.d/cc
/usr/libexec/bear/wrapper.d/clang
/usr/libexec/bear/wrapper.d/clang++
/usr/libexec/bear/wrapper.d/cpp
/usr/libexec/bear/wrapper.d/ctangle
/usr/libexec/bear/wrapper.d/cweave
/usr/libexec/bear/wrapper.d/f77
/usr/libexec/bear/wrapper.d/flex
/usr/libexec/bear/wrapper.d/g++
/usr/libexec/bear/wrapper.d/gcc
/usr/libexec/bear/wrapper.d/ld
/usr/libexec/bear/wrapper.d/lex
/usr/libexec/bear/wrapper.d/lint
/usr/libexec/bear/wrapper.d/m2c
/usr/libexec/bear/wrapper.d/makeinfo
/usr/libexec/bear/wrapper.d/nm
/usr/libexec/bear/wrapper.d/objcopy
/usr/libexec/bear/wrapper.d/objdump
/usr/libexec/bear/wrapper.d/pc
/usr/libexec/bear/wrapper.d/ranlib
/usr/libexec/bear/wrapper.d/readelf
/usr/libexec/bear/wrapper.d/strip
/usr/libexec/bear/wrapper.d/tangle
/usr/libexec/bear/wrapper.d/tex
/usr/libexec/bear/wrapper.d/tex2dvi
/usr/libexec/bear/wrapper.d/weave
/usr/libexec/bear/wrapper.d/yacc
/usr/share/doc/bear
/usr/share/doc/bear/CODE_OF_CONDUCT.md
/usr/share/doc/bear/CONTRIBUTING.md
/usr/share/doc/bear/COPYING
/usr/share/doc/bear/INSTALL.md
/usr/share/doc/bear/README.md
/usr/share/licenses/bear
/usr/share/licenses/bear/COPYING
/usr/share/man/man1/bear.1.gz
/usr/share/man/man1/citnames.1.gz
/usr/share/man/man1/intercept.1.gz
/usr/bin/bear
/usr/bin/citnames
/usr/bin/intercept
/usr/lib/.build-id
/usr/lib/.build-id/6d
/usr/lib/.build-id/6d/646deab15fbb3904ea1b7621f9eb3c054af2c6
/usr/lib/.build-id/9b
/usr/lib/.build-id/9b/a5388e0393d4aea34f9944fa0e48b373c95131
/usr/lib/.build-id/be
/usr/lib/.build-id/be/554c0cf9978fc8c245894e037e3fc90611efd7
/usr/lib/.build-id/cf
/usr/lib/.build-id/cf/3ccc2859db9d3f2398713b480ea50e16e1b668
/usr/lib/.build-id/db
/usr/lib/.build-id/db/5b56e63d652b6ee43adc5ceb9622def44d1ca2
/usr/lib/.build-id/f4
/usr/lib/.build-id/f4/d3b3509235fdfe70fe0ec31569afa386a80d08
/usr/libexec/bear/er
/usr/libexec/bear/libexec.so
/usr/libexec/bear/wrapper
/usr/libexec/bear/wrapper.d
/usr/libexec/bear/wrapper.d/ar
/usr/libexec/bear/wrapper.d/as
/usr/libexec/bear/wrapper.d/bison
/usr/libexec/bear/wrapper.d/c++
/usr/libexec/bear/wrapper.d/cc
/usr/libexec/bear/wrapper.d/cpp
/usr/libexec/bear/wrapper.d/ctangle
/usr/libexec/bear/wrapper.d/cweave
/usr/libexec/bear/wrapper.d/f77
/usr/libexec/bear/wrapper.d/flex
/usr/libexec/bear/wrapper.d/g++
/usr/libexec/bear/wrapper.d/gcc
/usr/libexec/bear/wrapper.d/ld
/usr/libexec/bear/wrapper.d/lex
/usr/libexec/bear/wrapper.d/lint
/usr/libexec/bear/wrapper.d/m2c
/usr/libexec/bear/wrapper.d/makeinfo
/usr/libexec/bear/wrapper.d/nm
/usr/libexec/bear/wrapper.d/objcopy
/usr/libexec/bear/wrapper.d/objdump
/usr/libexec/bear/wrapper.d/pc
/usr/libexec/bear/wrapper.d/ranlib
/usr/libexec/bear/wrapper.d/readelf
/usr/libexec/bear/wrapper.d/strip
/usr/libexec/bear/wrapper.d/tangle
/usr/libexec/bear/wrapper.d/tex
/usr/libexec/bear/wrapper.d/tex2dvi
/usr/libexec/bear/wrapper.d/weave
/usr/libexec/bear/wrapper.d/yacc
/usr/share/doc/bear
/usr/share/doc/bear/CODE_OF_CONDUCT.md
/usr/share/doc/bear/CONTRIBUTING.md
/usr/share/doc/bear/COPYING
/usr/share/doc/bear/INSTALL.md
/usr/share/doc/bear/README.md
/usr/share/licenses/bear
/usr/share/licenses/bear/COPYING
/usr/share/man/man1/bear.1.gz
/usr/share/man/man1/citnames.1.gz
/usr/share/man/man1/intercept.1.gz

References

Summary

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