Install C/C++ Development Environment
Install the package group:
$ sudo dnf group install "Development Tools"
The installed gcc compiler is quite old. You may need to install a new build tool set:
$ sudo dnf install gcc-toolset-11-toolchain
scl-utils is used to manage this software, try:
$ scl list-collections
gcc-toolset-11
To use the toolset in a new shell session, run:
$ scl enable gcc-toolset-11 bash
This command will open a new shell. You can just do the following in the current shell:
$ . scl_source enable gcc-toolset-11
You can put the above command in your login scripts.
For rpmbuild, the tool itself and a gcc toolset plugin is needed:
$ sudo dnf install rpm-build
$ sudo dnf install gcc-toolset-11-annobin-plugin-gcc
Install other tools:
$ sudo dnf install autoconf automake libtool
Install clang tools (clang-format, clang-tidy, etc.):
$ sudo dnf install clang-tools-extra
Install build essenstial:
$ sudo apt satisfy build-essential
Install kernel headers if you need to compile kernel modules:
$ sudo apt satisfy linux-headers-$(uname -r)
Install other tools:
$ sudo apt install automake
$ sudo apt satisfy fakeroot devscripts
If you want to build deb packages, you need to install equivs:
$ sudo apt satisfy equivs
macOS has clang installed, but you can install a new version by:
$ brew install llvm
If gcc is required:
$ brew install gcc
You need to create symbol links manually:
$ ln -snf gcc-14 /usr/local/bin/gcc
$ ln -snf g++-14 /usr/local/bin/g++
$ pacman -S make