[syslog-ng]Linking error

Aaron Jackson Aaron.Jackson@dc.gov
Fri, 27 Sep 2002 17:28:16 -0400


I just downloaded syslog-ng-1.5.21 and libol 0.3.3 and tried to compile 
them on a Solaris 8 gcc 2.95 system.  The build process stops with the 
following error:

gcc -DHAVE_CONFIG_H -I. -I/export/home/jackson/syslog-ng-1.5.21/src -I. 
     -g -
O2 -Wall -I/export/home/jackson/libol-0.3.3/src -D_GNU_SOURCE -c getopt1.c
gcc  -g -O2 -Wall -I/export/home/jackson/libol-0.3.3/src -D_GNU_SOURCE 
-o syslo
g-ng  main.o sources.o center.o filters.o destinations.o  log.o 
cfgfile.o cfg-gr
ammar.o cfg-lex.o affile.o afsocket.o afunix.o  afinet.o afinter.o 
afuser.o afst
reams.o afprogram.o afremctrl.o  nscache.o utils.o syslog-names.o 
getopt.o getop
t1.o -lpthread -ldoor  -lfl 
/export/home/jackson/libol-0.3.3/src/.libs/libol.a -
lsocket -lnsl -lxnet
Undefined                       first referenced
  symbol                             in file
res_init                            main.o
ld: fatal: Symbol referencing errors. No output written to syslog-ng
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `syslog-ng'
Current working directory /export/home/jackson/syslog-ng-1.5.21/src
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/jackson/syslog-ng-1.5.21/src
*** Error code 1
make: Fatal error: Command failed for target `all-recursive-am'
Current working directory /export/home/jackson/syslog-ng-1.5.21/src
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

I did a man res_init, and it appears that this function is a resolver 
library function.  So I added -lresolv to the Makefile and everything 
compiled OK.

Aaron Jackson