[syslog-ng] Error encountered while building syslog-ng-2.1.3 on RHEL3

Chanchal Verma cverma2 at csc.com
Fri Jan 9 14:55:41 CET 2009


Hi Kostyantyn,

I have checked that all required static libraries (.a) are available at 
/usr/lib location. I also created linked at /usr/local/lib for all 
requried libraries. It is giving same error messages.
Following libraries are checked available at /usr/lib:

libnsl.a
librt.a
libfl.a
libevtlog.a (Created linked from 
/opt/soe/local/syslog-ng-2.1.3/eventlog/lib/libevtlog.a)
libnet.a
libwrap.a

Here below is error messages:

-----------------------------------------------------------
Here below is error messge:

Compilation option:
[champ at ankit-lin syslog-ng-2.1.3]#  ./configure --enable-static-linking 
--prefix=/opt/soe/local/syslog-ng-2.1.3

Make works fine uptill (Pasted last few lines):
..
..
if gcc -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include   -I/opt/soe/local/
syslog-ng-2.1.3/eventlog/include/eventlog   -D_BSD_SOURCE -D__BSD_SOURCE 
-D__FAVOR_BSD -DHAVE_NET_ETHERNET_H  -D_GNU_SOUR
CE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O2 -Wall -MT globals.o 
-MD -MP -MF ".deps/globals.Tpo" \
  -c -o globals.o `test -f 'globals.c' || echo './'`globals.c; \
then mv -f ".deps/globals.Tpo" ".deps/globals.Po"; \
else rm -f ".deps/globals.Tpo"; exit 1; \
fi
rm -f libsyslog-ng.a
ar cru libsyslog-ng.a misc.o utils.o messages.o syslog-names.o cfg.o 
cfg-lex.o cfg-grammar.o macros.o filter.o logmsg.o l
ogpipe.o logsource.o driver.o sgroup.o dgroup.o center.o templates.o 
logreader.o logwriter.o affile.o afstreams.o afuser.
o afprog.o afsocket.o afunix.o afinet.o afinter.o children.o stats.o 
gsockaddr.o fdwrite.o fdread.o memtrace.o dnscache.o
 apphook.o serialize.o logqueue.o afsql.o alarms.o globals.o
ranlib libsyslog-ng.a
if gcc -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include   -I/opt/soe/local/
syslog-ng-2.1.3/eventlog/include/eventlog   -D_BSD_SOURCE -D__BSD_SOURCE 
-D__FAVOR_BSD -DHAVE_NET_ETHERNET_H  -D_GNU_SOUR
CE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O2 -Wall -MT main.o -MD 
-MP -MF ".deps/main.Tpo" \
  -c -o main.o `test -f 'main.c' || echo './'`main.c; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; \
else rm -f ".deps/main.Tpo"; exit 1; \
fi
gcc  -g -O2 -Wall   -o syslog-ng  main.o libsyslog-ng.a -static -lnsl -lrt 
 -lfl -L/usr/local/lib -lglib-2.0   -L/opt/soe
/local/syslog-ng-2.1.3/eventlog/lib -levtlog   -lnet -lwrap
make[2]: Leaving directory `/home/soetest1/syslog-ng-2.1.3/src'
make[1]: Leaving directory `/home/soetest1/syslog-ng-2.1.3'

Showing error message on standard output device:

main.o(.text+0x5ec): In function `setup_creds':
/home/soetest1/syslog-ng-2.1.3/src/main.c:324: Using 'initgroups' in 
statically linked applications requires at runtime t
he shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o)(.text+0x44d): In function `resolve_group':
/home/soetest1/syslog-ng-2.1.3/src/misc.c:283: Using 'getgrnam' in 
statically linked applications requires at runtime the
 shared libraries from the glibc version used for linking
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libwrap.a(options.o)(.text+0x53c): 
In function `group_option':
: Using 'endgrent' in statically linked applications requires at runtime 
the shared libraries from the glibc version used
 for linking
libsyslog-ng.a(misc.o)(.text+0x3ed): In function `resolve_user':
/home/soetest1/syslog-ng-2.1.3/src/misc.c:258: Using 'getpwnam' in 
statically linked applications requires at runtime the
 shared libraries from the glibc version used for linking
/usr/local/lib/libglib-2.0.a(gutils.o)(.text+0xbd8): In function 
`g_get_any_init_do':
/home/soetest1/glib-2.16.0/glib/gutils.c:1646: Using 'getpwuid' in 
statically linked applications requires at runtime the
 shared libraries from the glibc version used for linking
/usr/local/lib/libglib-2.0.a(gutils.o)(.text+0xbc8):/home/soetest1/glib-2.16.0/glib/gutils.c:1645: 
Using 'setpwent' in st
atically linked applications requires at runtime the shared libraries from 
the glibc version used for linking
/usr/local/lib/libglib-2.0.a(gutils.o)(.text+0xbe3):/home/soetest1/glib-2.16.0/glib/gutils.c:1647: 
Using 'endpwent' in st
atically linked applications requires at runtime the shared libraries from 
the glibc version used for linking
/usr/local/lib/libglib-2.0.a(gutils.o)(.text+0x9d1):/home/soetest1/glib-2.16.0/glib/gutils.c:1589: 
Using 'getpwnam_r' in
statically linked applications requires at runtime the shared libraries 
from the glibc version used for linking
/usr/local/lib/libglib-2.0.a(gutils.o)(.text+0xa10):/home/soetest1/glib-2.16.0/glib/gutils.c:1595: 
Using 'getpwuid_r' in
statically linked applications requires at runtime the shared libraries 
from the glibc version used for linking
libsyslog-ng.a(afinet.o)(.text+0x163): In function `afinet_resolve_name':
/home/soetest1/syslog-ng-2.1.3/src/afinet.c:103: Using 'getaddrinfo' in 
statically linked applications requires at runtim
e the shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o)(.text+0x1d1): In function `resolve_hostname':
/home/soetest1/syslog-ng-2.1.3/src/misc.c:166: Using 'gethostbyaddr' in 
statically linked applications requires at runtim
e the shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o)(.text+0xbd): In function `getlonghostname':
/home/soetest1/syslog-ng-2.1.3/src/misc.c:71: Using 'gethostbyname' in 
statically linked applications requires at runtime
 the shared libraries from the glibc version used for linking
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libnet.a(libnet_resolve.o)(.text+0x4dc): 
In function `libnet_name2addr6
':
: Using 'gethostbyname2' in statically linked applications requires at 
runtime the shared libraries from the glibc versio
n used for linking
libsyslog-ng.a(afinet.o)(.text+0xb2): In function `afinet_set_port':
/home/soetest1/syslog-ng-2.1.3/src/afinet.c:58: Using 'getservbyname' in 
statically linked applications requires at runti
me the shared libraries from the glibc version used for linking
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libwrap.a(hosts_access.o)(.text+0x862): 
In function `host_match':
: undefined reference to `yp_get_default_domain'
collect2: ld returned 1 exit status
make[2]: *** [syslog-ng] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
----------------------------------------------------

With Regards,
Chanchal Verma




Kostyantyn Gushtin <kgushtin at n-ix.com.ua> 
01/09/2009 06:08 PM

To
Chanchal Verma/GIS/CSC at CSC
cc

Subject
Re: [syslog-ng] Error encountered while building syslog-ng-2.1.3 on RHEL3






Chanchal Verma wrote: 

Hi Kostyantyn, 

Yes my compilation with --enable-dynamic-linking option works fine. I am 
facing problem while doing static compilation. I have followed the given 
steps but still getting error while doing 'make'. 
I am not sure how to use 'glib' option for compilation, I have 
libglib-2.0.a in '/usr/lib'. 
Now you really have problems with glibc :) . glib is just abstraction (on 
unix systems it use glibc). 
gcc  -g -O2 -Wall   -o syslog-ng  main.o libsyslog-ng.a -static -lnsl -lrt 
 -lfl -L/usr/local/lib -lglib-2.0   -L/opt/soe 
/local/syslog-ng-2.1.3/eventlog/lib -levtlog   -lnet -lwrap 
make[2]: Leaving directory `/home/soetest1/syslog-ng-2.1.3/src' 
make[1]: Leaving directory `/home/soetest1/syslog-ng-2.1.3' 



More information about the syslog-ng mailing list