1
0
mirror of https://github.com/Icinga/icinga2.git synced 2025-04-08 17:05:25 +02:00

Require GCC 6.3+

This commit is contained in:
Alexander A. Klimov 2021-12-14 18:42:38 +01:00
parent ca394efe83
commit 9284e67aa2
2 changed files with 12 additions and 27 deletions

@ -383,8 +383,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
OUTPUT_VARIABLE _ICINGA2_COMPILER_VERSION
)
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.7.0")
message(FATAL_ERROR "Your version of GCC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (GCC >= 4.7.0 is required).")
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "6.3.0")
message(FATAL_ERROR "Your version of GCC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (GCC >= 6.3.0 is required).")
endif()
endif()

@ -1365,13 +1365,13 @@ are best effort and sometimes out-of-date. Git Master may contain updates.
#### CentOS 7 <a id="development-linux-dev-env-centos"></a>
```bash
yum -y install gdb vim git bash-completion htop
yum -y install gdb vim git bash-completion htop centos-release-scl
yum -y install rpmdevtools ccache \
cmake make gcc-c++ flex bison \
cmake make devtoolset-11-gcc-c++ flex bison \
openssl-devel boost169-devel systemd-devel \
mysql-devel postgresql-devel libedit-devel \
libstdc++-devel
devtoolset-11-libstdc++-devel
groupadd icinga
groupadd icingacmd
@ -1412,8 +1412,8 @@ Fourth, depending on your likings, you may add a bash alias for building,
or invoke the commands inside:
```bash
alias i2_debug="cd /root/icinga2; mkdir -p debug; cd debug; cmake $I2_DEBUG ..; make -j2; sudo make -j2 install; cd .."
alias i2_release="cd /root/icinga2; mkdir -p release; cd release; cmake $I2_RELEASE ..; make -j2; sudo make -j2 install; cd .."
alias i2_debug="cd /root/icinga2; mkdir -p debug; cd debug; scl enable devtoolset-11 -- cmake $I2_DEBUG ..; make -j2; sudo make -j2 install; cd .."
alias i2_release="cd /root/icinga2; mkdir -p release; cd release; scl enable devtoolset-11 -- cmake $I2_RELEASE ..; make -j2; sudo make -j2 install; cd .."
```
This is taken from the [centos7-dev](https://github.com/Icinga/icinga-vagrant/tree/master/centos7-dev) Vagrant box.
@ -2173,7 +2173,7 @@ Icinga application using a dist tarball (including notes for distributions):
* cmake >= 2.6
* GNU make (make) or ninja-build
* C++ compiler which supports C++11
* RHEL/Fedora/SUSE: gcc-c++ >= 4.7 (extra Developer Tools on RHEL5/6 see below)
* RHEL/Fedora/SUSE: gcc-c++ >= 6.3 (extra Developer Tools on RHEL7 see below)
* Debian/Ubuntu: build-essential
* Alpine: build-base
* you can also use clang++
@ -2442,33 +2442,18 @@ The following packages are required to build the SELinux policy module:
* selinux-policy (selinux-policy on CentOS 6, selinux-policy-devel on CentOS 7)
* selinux-policy-doc
##### RHEL/CentOS 6
##### RHEL/CentOS 7
The RedHat Developer Toolset is required for building Icinga 2 beforehand.
This contains a modern version of flex and a C++ compiler which supports
C++11 features.
This contains a C++ compiler which supports C++14 features.
```bash
cat >/etc/yum.repos.d/devtools-2.repo <<REPO
[testing-devtools-2-centos-\$releasever]
name=testing 2 devtools for CentOS $releasever
baseurl=https://people.centos.org/tru/devtools-2/\$releasever/\$basearch/RPMS
gpgcheck=0
REPO
yum install centos-release-scl
```
Dependencies to devtools-2 are used in the RPM SPEC, so the correct tools
Dependencies to devtools-11 are used in the RPM SPEC, so the correct tools
should be used for building.
As an alternative, you can use newer Boost packages provided on
[packages.icinga.com](https://packages.icinga.com/epel).
```bash
cat >$HOME/.rpmmacros <<MACROS
%build_icinga_org 1
MACROS
```
##### Amazon Linux
If you prefer to build packages offline, a suitable Vagrant box is located