[syslog-ng] Error while making on Mac OS X Tiger

OpenMacNews OpenMacNews at speakeasy.net
Tue May 24 23:13:38 CEST 2005


hi tristan,

i'm building on OSX 10.4.1 ...

> gcc  -g -O2 -Wall -I/usr/local/include/libol -D_GNU_SOURCE   -o
> syslog-ng  main.o sources.o center.o filters.o destinations.o log.o
> cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o
> afinet.o afinter.o afuser.o afstreams.o afprogram.o afremctrl.o
> nscache.o utils.o syslog-names.o macros.o  -lresolv
> /usr/local/lib/libol.a -Wl,-Bstatic -lfl -lwrap    -Wl,-Bdynamic
> ld: unknown flag: -Bstatic
> make[3]: *** [syslog-ng] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all] Error 2
> make: *** [all-recursive] Error 1

you'll need to make a couple of changes to configure.in (see below) ... for 
completeness, i'm including my start-to-finish notes:

LIBOL

setenv LIBOL_LOC "http://www.balabit.com/downloads/syslog-ng/1.6/src-snapshot"
setenv LIBOL_VER "libol-0.3.16+20050524"

wget $LIBOL_LOC/$LIBOL_VER.tar.gz
gnutar zxvf $LIBOL_VER.tar.gz

unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND 
EXTRA_LDFLAGS EXTRA_LIBS LC_ALL LANG LINGUAS

cd /usr/ports/$LIBOL_VER

glibtoolize --force --copy
aclocal
automake --foreign --add-missing
autoheader
autoconf

./configure \
--prefix=/usr/local \
--enable-shared \
--enable-static

make
make install
unsetenv LIBOL_LOC LIBOL_VER

SYSLOG-NG

setenv SYSLOGNG_LOC 
"http://www.balabit.com/downloads/syslog-ng/1.6/src-snapshot"
setenv SYSLOGNG_VER "syslog-ng-1.6.7+20050524"

cd /usr/ports
wget $SYSLOGNG_LOC/$SYSLOGNG_VER.tar.gz
gnutar zxvf $SYSLOGNG_VER.tar.gz
cd /usr/ports/$SYSLOGNG_VER

NOTE: i'm building against an external BIND9 install ...

unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND 
EXTRA_LDFLAGS EXTRA_LIBS LC_ALL LANG LINGUAS
setenv LDFLAGS "-bind_at_load -L/usr/local/bind9/lib -llwres -lbind9"
setenv CPPFLAGS "-I/usr/local/bind9/include"

================================================================
(EDITOR) /usr/ports/$SYSLOGNG_VER/configure.in

@164
---	AC_CHECK_LIB(resolv, res_init)
+++	dnl AC_CHECK_LIB(resolv, res_init)
	dnl on Linux res_init is a macro
---	AC_CHECK_LIB(resolv, __res_init)
+++	dnl AC_CHECK_LIB(resolv, __res_init)



@301
	else
---		LD_START_STATIC=""
---		LD_END_STATIC=""
+++		LD_START_STATIC="-Wl,-dynamic"
+++		LD_END_STATIC="-Wl,-dynamic"
		AC_MSG_RESULT([no clues, linking everything dynamically, please send 
appropriate ld arguments to syslog-ng at lists.balabit.hu])
	fi

================================================================

glibtoolize --force --copy
aclocal
autoconf

./configure \
--prefix=/usr/local/syslog-ng \
--sysconfdir=/usr/local/etc/syslog-ng \
--enable-debug \
--enable-full-static=no \
--enable-tcp-wrapper

make
make install

% ls -al /usr/local/syslog-ng/sbin/syslog-ng
	-rwxr-xr-x  1 root staff 466124 May 24 14:04 sbin/syslog-ng

% otool -L /usr/local/syslog-ng/sbin/syslog-ng
	sbin/syslog-ng:
		/usr/local/bind9/lib/liblwres.1.dylib (compatibility version 4.0.0, current 
version 4.2.0)
		/usr/local/bind9/lib/libbind9.0.dylib (compatibility version 1.0.0, current 
version 1.5.0)
		/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)
		/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
88.0.0)


hth!

cheers,

richard


More information about the syslog-ng mailing list