Compiling syslog-ng 3.0.1 on Solaris 10
January 30th, 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 CPPFLAGS=$CFLAGS 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 gmake install
These things are harder than they should be.
Entry Filed under: General

3 Comments Add your own
1. Kenny | April 28th, 2009 at 2:16 pm
Hi,
first off, congratulations on getting syslog-ng installed on solaris10 :)
I’m having a lot of trouble myself
Would it be possible to provide a howto with a little more details?
Thanks a lot!
2. Eliezer Chavez | May 12th, 2009 at 7:09 pm
How i do to get glib 2.20 compiled with sun studio 12 in 64 bit?
3. Alasdair | May 13th, 2009 at 9:22 am
Hi Eliezer,
I just built a 32bit glib 2.20, but to compile 64bit binaries you normally just have to do:
export CFLAGS=”-m64″ LDFLAGS=”-m64 CXXFLAGS=”-m64″
It’s also worth putting the 64bit binaries and libraries in the Sun amd64 locations, eg /opt/blah/bin/amd64, /opt/blah/lib/amd64, which you can normally do with autoconf based projects using “./configure –prefix=/opt/blah –bindir=/opt/blah/bin/amd64 –sbindir=/opt/blah/sbin/amd64 –libdir=/opt/blah/lib/amd64″
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed