Update Boost dependency to >= 1.48 (INSTALL.md, icinga2.spec)

Icinga 2 does not build with 1.41:

    /usr/include/boost/range/const_iterator.hpp:37:58: error: no type
    named 'const_iterator' in 'class boost::intrusive_ptr<icinga::Array>'
    ...
    /usr/include/boost/thread/locks.hpp:269:22: error: cannot bind
    'boost::unique_lock<boost::mutex>' lvalue to
    'boost::unique_lock<boost::mutex>&&'

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>

fixes #5188

This also refs #5177 as a partial fix for the dependencies, when not
using Icinga's boost packages.
This commit is contained in:
Markus Frosch 2017-04-24 16:59:08 +02:00 committed by Michael Friedrich
parent 4134f7fe42
commit 4a1186d46f
2 changed files with 17 additions and 8 deletions

View File

@ -32,7 +32,7 @@ parentheses):
* pkg-config
* OpenSSL library and header files >= 0.9.8 (openssl-devel on RHEL, libopenssl1-devel on SLES11,
libopenssl-devel on SLES12, libssl-dev on Debian)
* Boost library and header files >= 1.41.0 (boost-devel on RHEL, libboost-all-dev on Debian)
* Boost library and header files >= 1.48.0 (boost148-devel on EPEL for RHEL / CentOS, libboost-all-dev on Debian)
* GNU bison (bison)
* GNU flex (flex) >= 2.5.35
* recommended: libexecinfo on FreeBSD (automatically used when Icinga 2 is

View File

@ -117,7 +117,12 @@ BuildRequires: boost153-devel
# sles 11 sp3 requires packages.icinga.com
BuildRequires: boost153-devel
%else
BuildRequires: boost-devel >= 1.41
%if (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
# Requires EPEL repository
BuildRequires: boost148-devel >= 1.48
%else
BuildRequires: boost-devel >= 1.48
%endif
%endif
%endif
@ -291,25 +296,29 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
%endif
%if "%{_vendor}" == "redhat"
%if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
%if 0%{?build_icinga_org}
# Boost_VERSION 1.41.0 vs 101400 - disable build tests
# details in https://dev.icinga.com/issues/5033
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0'"
%else
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost148 \
-DBOOST_INCLUDEDIR=/usr/include/boost148 \
-DBoost_ADDITIONAL_VERSIONS='1.48;1.48.0'"
%endif
CMAKE_OPTS="$CMAKE_OPTS \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBUILD_TESTING=FALSE \
-DBoost_NO_BOOST_CMAKE=TRUE"
%endif
%if 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
CMAKE_OPTS="$CMAKE_OPTS -DBUILD_TESTING=FALSE"
%endif
%endif
%if "%{_vendor}" != "suse"
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_libdir}/nagios/plugins"
%else
%if 0%{?suse_version} < 1310
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
-DBoost_NO_SYSTEM_PATHS=TRUE \