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

Balazs Scheidler bazsi at balabit.hu
Mon Jan 12 20:23:12 CET 2009


On Mon, 2009-01-12 at 21:12 +0530, Chanchal Verma wrote:
> 
> Hi Balazs, 
> 
> Thanks for your expert advise. I have successfully compiled
> syslog-ng-2.1.3 with --enable-static-linking option. I were using old
> version of gcc (3.2.3) which causing compilation (make) fail. I
> upgraded my gcc to 4.1.2 to get rid of compilation errors. 
> 
> Though it is working fine till now, I have faced some error messages
> on standard video output while doing 'make'. I am not sure if this
> will impact new build syslog-ng application in terms of created
> problem in logging features. 
> 
> I am here pasting the error output: 
> 
> ************************************************* 
> macros.c: In function âresult_appendâ: 
> macros.c:137: warning: pointer targets in passing argument 2 of
> âg_string_append_lenâ differ in signedness 
> macros.c: In function âlog_macro_expandâ: 
> macros.c:149: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:218: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:238: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:246: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:268: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:413: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:432: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 
> macros.c:450: warning: pointer targets in passing argument 2 of
> âresult_appendâ differ in signedness 

these warnings are new in gcc 4.x and older syslog-ng versions didn't
compile warning-free on this new gcc version.

syslog-ng OSE 3.0 should be better in this regard.

The warnings above are spurious, e.g. there's no error.

> filter.c: In function âfilter_netmask_evalâ: 
> filter.c:452: warning: âaddr.s_addrâ may be used uninitialized in this
> function 

This can be a minor problem, the netmask() filter didn't always work
correctly. I've pushed a patch to syslog-ng OSE 3.0 to fix that. 

But it probably does not affect you though.

> logmsg.c: In function âlog_msg_parseâ: 
> logmsg.c:151: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:216: warning: pointer targets in passing argument 2 of
> âg_string_assign_lenâ differ in signedness 
> logmsg.c:224: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:242: warning: pointer targets in passing argument 1 of
> âstrlenâ differ in signedness 
> logmsg.c:283: warning: pointer targets in passing argument 2 of
> âg_string_assign_lenâ differ in signedness 
> logmsg.c:309: warning: pointer targets in passing argument 2 of
> âg_string_assign_lenâ differ in signedness 
> logmsg.c:335: warning: pointer targets in passing argument 2 of
> âg_string_assign_lenâ differ in signedness 
> logmsg.c:394: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:398: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:429: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:463: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:474: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:486: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:499: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:520: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:525: warning: pointer targets in assignment differ in
> signedness 
> logmsg.c:530: warning: pointer targets in passing argument 2 of
> âg_string_assign_lenâ differ in signedness 

Again, useless warnings which should be silenced in syslog-ng OSE 3.0.

> main.o(.text+0x133): In function `setup_creds': 
> /home/soetest1/syslog-ng-2.1.3/src/main.c:324: Using 'initgroups' in
> statically linked applications requires at runtime the shared
> libraries from the glibc version used for linking 
> libsyslog-ng.a(misc.o)(.text+0xc4): 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 
> libsyslog-ng.a(misc.o)(.text+0x144): 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 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
> +0xbe3):/home/soetest1/glib-2.16.0/glib/gutils.c:1647: Using
> 'endpwent' 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
> +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+0xcbb): In function
> `afinet_resolve_name': 
> /home/soetest1/syslog-ng-2.1.3/src/afinet.c:103: Using 'getaddrinfo'
> in statically linked applications requires at runtime the shared
> libraries from the glibc version used for linking 
> libsyslog-ng.a(misc.o)(.text+0x50a): In function `resolve_hostname': 
> /home/soetest1/syslog-ng-2.1.3/src/misc.c:166: Using 'gethostbyaddr'
> in statically linked applications requires at runtime the shared
> libraries from the glibc version used for linking 
> libsyslog-ng.a(misc.o)(.text+0x464): 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/local/lib/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 version used for linking 
> libsyslog-ng.a(afinet.o)(.text+0x6bb): In function `afinet_set_port': 
> /home/soetest1/syslog-ng-2.1.3/src/afinet.c:58: Using 'getservbyname'
> in statically linked applications requires at runtime the shared
> libraries from the glibc version used for linking 
> loggen.o(.text+0x6cc): In function `main': 
> /home/soetest1/syslog-ng-2.1.3/tests/loggen/loggen.c:236: Using
> 'getaddrinfo' in statically linked applications requires at runtime
> the shared libraries from the glibc version used for linking 

These are linking warnings, even if you link syslog-ng statically, it's
going to use the nss shared libraries in /lib in order to resolve
users/groups/services.

This is the result of your request to link syslog-ng statically.

-- 
Bazsi




More information about the syslog-ng mailing list