diff --git a/CMakeLists.txt b/CMakeLists.txt index 75ae599cc..a613afb1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/doc/21-development.md b/doc/21-development.md index f645527c7..e0a9f6b57 100644 --- a/doc/21-development.md +++ b/doc/21-development.md @@ -1365,13 +1365,13 @@ are best effort and sometimes out-of-date. Git Master may contain updates. #### CentOS 7 ```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 <$HOME/.rpmmacros <