Compiling error on macOS 10.14

(Henning Kessler) #1

I am trying to compile Icinga2 on a macOS 10.14 system and getting this error:

– Found FLEX: 2.5.35 Apple(flex-31) (Required is at least version “2.5.31”)
CMake Error at third-party/cmake/BoostTestTargets.cmake:56 (message):
NOTE: boost::test-based targets and tests cannot be added: boost >= 1.34.0
required but not found. (found: ‘1.71.0’ want >=103400) You may disable
BUILD_TESTING to continue without the tests.
Call Stack (most recent call first):
test/CMakeLists.txt:3 (include)

This is how I tried to compile it on macOS:

brew install wget git ccache boost cmake bison flex yajl openssl nagios-plugins

To create a group:

sudo dscl . -create /Groups/icinga;\
sudo dscl . -create /Groups/icinga PrimaryGroupID 498;\
sudo dscl . -create /Groups/GROUP Password \*

To create a user:

sudo dscl . -create /Users/icinga;\
sudo dscl . -create /Users/icinga UniqueID 498;\
sudo dscl . -create /Users/icinga UserShell /usr/bin/false;\
sudo dscl . -create /Users/icinga RealName 'Icinga pseudo user';\
sudo dscl . -create /Users/icinga NFSHomeDirectory /var/empty;\
sudo dscl . -create /Users/icinga PrimaryGroupID 498;\
sudo dscl . -create /Users/icinga Password \*



cd ~/Desktop/
git clone https://github.com/Icinga/icinga2.git
cd icinga2
git checkout tags/v2.11.2
mkdir debug
cd debug
export CC='ccache clang'; export CXX='ccache clang++'; export CCACHE_CPP2=yes
cmake -DCMAKE_BUILD_TYPE=Debug -DICINGA2_UNITY_BUILD=OFF -DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/icinga2 -DICINGA2_PLUGINDIR=/usr/local/sbin -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include ..

Any ideas why this happens?

Regards

Henning