Each new MacOS release brings some surprises when it comes to compiling syslog-ng. Just a couple of months ago, I provided you with a couple of pointers on how to compile syslog-ng on MacOS. Since then, MacOS Monterey was released and Homebrew was updated. So, here are some updated instructions for MacOS Monterey.
Let me quote my previous MacOS blog:
“The original syslog-ng MacOS installation guide is available at https://github.com/balabit/syslog-ng-gitbook/blob/master/chapters/chapter_0/section_3.md Yash made an updated version available at https://yash6866.gitbook.io/syslog-macos-testing/installation which has some additional information on openssl (syslog-ng does not compile yet with version 3.0). There is also a third guide, which is probably not up-to-date in every aspect, as it was written almost a year ago. However, this guide also describes how to start syslog-ng automatically, using a job definition: https://medium.com/macoclock/how-to-install-syslog-ng-on-macos-965127f1c05c”
I used the updated guide from Yash, but compiling syslog-ng failed. It seems that using the bundled libraries does not work anymore. You need to make sure that ivykis and json-c are installed on the system from Homebrew and you enable the system version when running configure.
Instructions
Install some development related packages:
brew install automake autoconf binutils glib autoconf-archive flex bison libtool pkg-config ivykis openssl pcre
Also install json-c:
brew install json-c
Make sure that the freshly installed bison is used, just as openssl 1.1:
export PATH=/usr/local/opt/bison/bin:$PATH export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH"
Note, that on ARM the path names are different.
Run configure:
./configure --disable-java --with-ivykis=system –with-jsonc=system
You can add any additional options here, as needed. For example, enable additional dependencies. Just make sure that these three settings are always there.
From here on, compiling and installing syslog-ng is the same as on other platforms.
After the installation, there are two important differences:
-
the default configuration does not work, as the system() source is not yet supported on MacOS
-
there is no startup script to start syslog-ng automagically on boot (see the third referred blog for details)
-
If you have questions or comments related to syslog-ng, do not hesitate to contact us. You can reach us by email or even chat with us. For a list of possibilities, check our GitHub page under the “Community” section at https://github.com/syslog-ng/syslog-ng. On Twitter, I am available as @PCzanik.