cancel
Showing results for 
Search instead for 
Did you mean: 

help me install vnstat

SOLVED
Go to solution
Maaz
Valued Contributor

help me install vnstat

OS: SUSE Server 10

# rpm -q gcc
gcc-4.1.0-28.4

# tar -xzvf vnstat-1.4.tar.gz
# cd vnstat-1.4
# make
make -C src vnstat
make[1]: Entering directory `/opt/MonitoringSoftwares/vnstat-1.4/src'
gcc -O2 -c proc.c
proc.c: In function ‘parseproc’:
proc.c:105: warning: integer constant is too large for ‘long’ type
proc.c:106: warning: integer constant is too large for ‘long’ type
proc.c:107: warning: integer constant is too large for ‘long’ type
proc.c:109: warning: integer constant is too large for ‘long’ type
proc.c:109: warning: integer constant is too large for ‘long’ type
proc.c:135: warning: integer constant is too large for ‘long’ type
proc.c:136: warning: integer constant is too large for ‘long’ type
proc.c:137: warning: integer constant is too large for ‘long’ type
proc.c:139: warning: integer constant is too large for ‘long’ type
proc.c:139: warning: integer constant is too large for ‘long’ type
gcc -O2 -c db.c
db.c: In function ‘readdb’:
db.c:88: warning: integer constant is too large for ‘long’ type
gcc -O2 -c misc.c
gcc -O2 -o vnstat vnstat.c proc.o db.o misc.o
make[1]: Leaving directory `/opt/MonitoringSoftwares/vnstat-1.4/src'

Plz help me install, vnstat ? what should I do ?
Regards
Needee
5 REPLIES
Stuart Browne
Honored Contributor
Solution

Re: help me install vnstat

What? That looks like it compiled to me. No "Errors", just Warnings.

From there, a 'make install' should install it *shrug*.
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: help me install vnstat

Have you verified the INSTALL and README file, sometimes, a ./configure is required:

./configure
make
make install

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Maaz
Valued Contributor

Re: help me install vnstat

What? That looks like it compiled to me. No "Errors", just Warnings.
From there, a 'make install' should install it *shrug*.

Thanks Dear Stuart and Ivan for help

stuart you are right,
# make
all the above "warnings", then
# make install
Installed DONE :)

from past .. I have learned that during compilation if the "make[1]" as in the second line and last line of output... usually this is a failure

Any its DONE
Regards
Maaz
Tim Post
Occasional Visitor

Re: help me install vnstat

This warning is only gcc paranoia with the 32 bit long type, it should be quite safe to ignore.

If you want to squelch it, open vnstat.h and find this line :

#define FPOINT 4294967296

change it to read

#define FPOINT 42949672960ULL

Should then compile fine without warnings of any kind. I submitted a patch to the author regarding this, no idea if it will be applied.

I'm attaching the patch to this post.
Maaz
Valued Contributor

Re: help me install vnstat

Thanks everyone ;)

Regards
Maaz