]> granicus.if.org Git - icinga2/commitdiff
Fix el5 build.
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 18 Dec 2013 11:54:49 +0000 (12:54 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 18 Dec 2013 14:16:00 +0000 (15:16 +0100)
Fixes #5033

CMakeLists.txt
INSTALL
icinga2.spec

index 6b34f66f604262020c27b5f3e548842efca2112e..4c613401bb7ec7622dfe7715bbc075946c69860c 100644 (file)
@@ -16,6 +16,8 @@
 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 cmake_minimum_required(VERSION 2.6)
+set(BOOST_MIN_VERSION "1.41.0")
+
 project(icinga2)
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
@@ -59,7 +61,8 @@ if(WIN32)
   add_definitions(-DBOOST_ALL_NO_LIB)
 endif()
 
-find_package(Boost 1.41.0 COMPONENTS thread system program_options regex REQUIRED)
+find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS thread system program_options regex REQUIRED)
+
 link_directories(${Boost_LIBRARY_DIRS})
 include_directories(${Boost_INCLUDE_DIRS})
 
diff --git a/INSTALL b/INSTALL
index f599bf8b73df2af8b596bee7db2aba5cab675925..325f4498b33a3a1278ddfbc7f3b6665cc27e6914 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -26,11 +26,17 @@ parentheses):
 * Boost library and header files (boost-devel on RHEL, libboost-all-dev
                                   on Debian)
 * GNU bison (bison)
-* GNU flex (flex)
+* GNU flex (flex) >= 2.5.35
 * optional: Doxygen (doxygen)
 * optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian)
 * optional: Python (python-devel on RHEL, python-dev on Debian)
 
+Note: RHEL5 ships an ancient flex version. Updated packages are available for
+example from the repoforge buildtools repository.
+
+http://mirror.hs-esslingen.de/repoforge/redhat/el5/en/{i386,x86_64}/buildtools/
+
+
 User Requirements
 -----------------
 
index 535c67e9568aee05149a60e82637d78af7556274..82412e4b849c8baed3cbb2c23df4e23347c977b9 100644 (file)
@@ -60,7 +60,7 @@ BuildRequires: openssl-devel
 BuildRequires: gcc-c++
 BuildRequires: libstdc++-devel
 BuildRequires: cmake
-BuildRequires: flex
+BuildRequires: flex >= 2.5.35
 BuildRequires: bison
 BuildRequires: %{apachename}
 
@@ -219,12 +219,18 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
             -DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
 %if "%{_vendor}" == "redhat"
 %if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5"
+# Boost_VERSION 1.41.0 vs 101400 - disable build tests
+# details in https://dev.icinga.org/issues/5033
 CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost141 \
  -DBOOST_INCLUDEDIR=/usr/include/boost141 \
- -DBoost_ADDITIONAL_VERSIONS='1.41;1.41.0'"
+ -DBoost_ADDITIONAL_VERSIONS='1.41;1.41.0' \
+ -DBoost_NO_SYSTEM_PATHS=TRUE \
+ -DBUILD_TESTING=FALSE \
+ -DBoost_NO_BOOST_CMAKE=TRUE"
 %endif
 %endif
-cmake $CMAKE_OPTS . 
+
+cmake $CMAKE_OPTS .
 
 make %{?_smp_mflags}