perfwatcher / collectd-pw

Collectd patched for PerfWatcher
GNU General Public License v2.0
4 stars 6 forks source link

Compilation issue with 5.4.0 #9

Closed n-rodriguez closed 10 years ago

n-rodriguez commented 10 years ago

I try to compile collectd-pw 5.4.0 (with this tuto http://perfwatcher.org/installation_server.html) but I get this error during compilation :

/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -DPREFIX='"/usr"' -DCONFIGFILE='"/usr/etc/collectd.conf"' -DLOCALSTATEDIR='"/usr/var"' -DPKGLOCALSTATEDIR='"/usr/var/lib/collectd"' -DPIDFILE='"/usr/var/run/collectd.pid"' -DPLUGINDIR='"/usr/lib/collectd"' -DPKGDATADIR='"/usr/share/collectd"'  -Wall -Werror -g -O2 -MT procnetstat.lo -MD -MP -MF .deps/procnetstat.Tpo -c -o procnetstat.lo procnetstat.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -DPREFIX=\"/usr\" -DCONFIGFILE=\"/usr/etc/collectd.conf\" -DLOCALSTATEDIR=\"/usr/var\" -DPKGLOCALSTATEDIR=\"/usr/var/lib/collectd\" -DPIDFILE=\"/usr/var/run/collectd.pid\" -DPLUGINDIR=\"/usr/lib/collectd\" -DPKGDATADIR=\"/usr/share/collectd\" -Wall -Werror -g -O2 -MT procnetstat.lo -MD -MP -MF .deps/procnetstat.Tpo -c procnetstat.c  -fPIC -DPIC -o .libs/procnetstat.o
procnetstat.c: In function ‘read_statistics_from_cache’:
procnetstat.c:715:23: error: variable ‘name’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [procnetstat.lo] Error 1
make[3]: Leaving directory `/root/COLLECTD-PW/collectd-5.4.0.20131206/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/COLLECTD-PW/collectd-5.4.0.20131206/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/COLLECTD-PW/collectd-5.4.0.20131206/src'
make: *** [all-recursive] Error 1
feraudet commented 10 years ago

Hi Nicolas,

It's a warning treated as error. Until code is cleaned you can comment this variable on line 715 in src/procnetstat.c and do the same if any other occur.

A patch will be wrote asap.

Regards,

Cyril Feraudet

ymettier commented 10 years ago

Hello,

This is related to mainstream Collectd.

This issue was recently raised. See a workaround : https://github.com/perfwatcher/perfwatcher/issues/36#issuecomment-30918932

Regards, Yves