From 85f1a19a57b2cbd9cf470e33552eedd928a3a67e Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Tue, 12 Mar 2019 15:21:53 +0100 Subject: [PATCH] el6: Explicitly link against librt The linker seems to have problems without. --- icinga2.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/icinga2.spec b/icinga2.spec index 20c1f53..8021fe5 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -323,6 +323,11 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true" %endif +%if (0%{?el6} || 0%{?rhel} == 6) +# Explicitly link against rt, because ld doesn't detect it automatically +CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_EXE_LINKER_FLAGS=-lrt" +%endif # el6 + %if "%{?boost_library}" != "" # Boost_NO_BOOST_CMAKE=ON - disable search for cmake # Boost_NO_SYSTEM_PATHS=ON - only search in specified locations