[collectd] Compiling error with libiptc 4.9.3

Francesco Sordillo f.sordillo at cineca.it
Thu Jul 15 17:32:22 CEST 2010


Hi to all.

I'am trying to compile collectd 4.9.3 on SLES 10.3 but I get error 
(warning as error) messages with libiptc library.

I run this configuration:
-----------------------------------
./configure CFLAGS=-"DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'" 
--with-libiptc=/tmp/collectd-4.9.3/src/owniptc/ --enable-apache 
--enable-email --enable-dns --enable-debug"
-----------------------------------

and if I run "make", I obtain thi error.

---------------------------------
[ ... ]
make[4]: Leaving directory `/tmp/collectd-4.9.3/src/libcollectdclient'
make[3]: Leaving directory `/tmp/collectd-4.9.3/src/libcollectdclient'
Making all in owniptc
make[3]: Entering directory `/tmp/collectd-4.9.3/src/owniptc'
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I../../src    -Wall -Werror -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL' -c 
-o libip4tc.lo libip4tc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src -Wall -Werror 
"-DLT_LAZY_OR_NOW=RTLD_LAZY|RTLD_GLOBAL" -c libip4tc.c  -fPIC -DPIC -o 
.libs/libip4tc.o
cc1: warnings being treated as errors
In file included from libiptc.c:47,
                  from libip4tc.c:136:
xtables.h:67: warning: ‘struct xt_entry_match’ declared inside parameter 
list
xtables.h:67: warning: its scope is only this definition or declaration, 
which is probably not what you want
xtables.h:74: warning: ‘struct xt_entry_match’ declared inside parameter 
list
xtables.h:82: warning: ‘struct xt_entry_match’ declared inside parameter 
list
xtables.h:86: warning: ‘struct xt_entry_match’ declared inside parameter 
list
xtables.h:123: warning: ‘struct xt_entry_target’ declared inside 
parameter list
xtables.h:130: warning: ‘struct xt_entry_target’ declared inside 
parameter list
xtables.h:137: warning: ‘struct xt_entry_target’ declared inside 
parameter list
xtables.h:141: warning: ‘struct xt_entry_target’ declared inside 
parameter list
make[3]: *** [libip4tc.lo] Error 1
make[3]: Leaving directory `/tmp/collectd-4.9.3/src/owniptc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/collectd-4.9.3/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/collectd-4.9.3/src'
make: *** [all-recursive] Error 1
----------------------------------------

Googling I found that this messages are not "error" but "warning" and 
the flag "-Werror" is the cause. Now, the question are:

1. Why do I obtain this warning?
2. Why did the developer team have introduced the flag "-Werror". Are 
there any reasons?
3. Do I need any library to resolve the problem?
4. If I remove the flag "-Werror", may I get some error with collectd?

Thanks in advance.
Francesco.



More information about the collectd mailing list