Compiling syslog-ng 3.0.1 on Solaris 10

By Alasdair Lumsden on 30 Jan 2009

This one was giving me an endless amount of pain, until I realised it was to do with the fact it was trying deperatly hard to compile against static versions of libraries that Solaris only provides dynamically (or something along those lines!).

The Glib Solaris 10 package is too old to be used so we’ll need to grab the latest version of glib and compile this up – it’s fairly easy. You’ll also need to grab and compile libevent (The one written by the author of syslog-ng, not the Linux kernel related dooderywhatsit). Then we can compile up syslog. It doesn’t like Sun Studio, and you’ll want to set –disable-static-linking.


export CFLAGS="-I/opt/local/include -I/usr/sfw/include -I/opt/sfw/include"
export LDFLAGS="-L/opt/local/lib -R/opt/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -R/opt/sfw/lib"
export CC=gcc
export CXX=g++
./configure --prefix=/opt/ec --enable-ssl --enable-pcre --disable-ipv6 --disable-static-linking --enable-dynamic-linking --disable-glibtest 
gmake install

These things are harder than they should be.