rrdPlugin.c has changed - yesterday, as part of the big html cleanup
(BMS0436). Most likely you missed the commit message in the interval.
Stanley's right, with the cvs you don't need to install rrdtools unless you
actually need the executable rrdtool itself to do extracts, etc. myrrd is a
frozen 1.0.45+ version and that's what ntop will use. I doubt there's any
difference between the rrd.h files of the two versions, but you should
locate & diff them to be sure... If you do have two versions, maybe you
should delete the one that came from the rrdtool you built so ntop doesn't
get confused.
The way I do changes is to do development in a work directory and - instead
of copying the work files and thus picking up everything in the work
directory, including private patches, etc. - build a .patch file. I then
apply the .patch to the cvs checkout directory.
I usually do one final copy & build of the (patched) cvs directory and
repeat the final tests. Occasionally, the patch applies but has problems -
the final compile tests catch these. Then I do the commit. This has worked
very well for me.
Now today, I was running out the door and skipped the final compile. But I
just pulled down the code and built it cleanly on RH9. So I'm pretty sure
it's something on your system.
rrdPlugin.c: In function `rrdMainLoop':
rrdPlugin.c:1600: parse error before `*'
rrdPlugin.c:1609: `maxHosts' undeclared (first use in this function)
rrdPlugin.c:1609: (Each undeclared identifier is reported only once
rrdPlugin.c:1609: for each function it appears in.)
rrdPlugin.c:1610: `len' undeclared (first use in this function)
rrdPlugin.c:1611: `tmpStats' undeclared (first use in this function)
1600-1609:
DomainStats **stats, *tmpStats, *statsEntry;
u_int maxHosts, len = 0;
Counter totBytesSent = 0;
Counter totBytesRcvd = 0;
if(dumpDomains) {
for(devIdx=0; devIdx<myGlobals.numDevices; devIdx++) {
// save this as it may change
maxHosts = myGlobals.device[devIdx].hostsno;
Oddly, that's NOT a part of the code I touched. It sure sounds like you
have a corrupted download - if you weren't doing a clean checkout I'd
suspect a bad merge.
DomainStats is defined - as usual - in globals-structtypes.h. If that
definition is munged, then you'd see something like your error messages.
1) I'd do another clean checkout - just to eliminate the possibility of a
corrupt download.
2) Check globals-structtypes.h:
typedef struct domainStats {
HostTraffic *domainHost; /* ptr to a host that belongs to the domain */
TrafficCounter bytesSent, bytesRcvd;
TrafficCounter tcpSent, udpSent;
TrafficCounter icmpSent,icmp6Sent;
TrafficCounter tcpRcvd, udpRcvd;
TrafficCounter icmpRcvd,icmp6Rcvd;
} DomainStats;
Now if the definition of HostTraffic or TrafficCounter is munged, you'll
have problems - but I'd be suspicious, though, that the corruption is in
rrdPlugin.c, or you would have seen problems long before in the compile
sequence - these are basic structural types all through ntop.
#ifdef WIN32
typedef __int64 Counter;
#else
typedef unsigned long long Counter;
#endif
typedef struct trafficCounter {
Counter value;
u_char modified;
} TrafficCounter;
I can't imagine that it's RH7.3 specific, but I haven't tried the code
recently on gcc 2.9x (and remember, the RH7.3 version is a bastardized beta
that wasn't supposed to be used anyway).
3) Can you try with a current gcc? I realize this is an SOB on RH7.3, but
it's time to upgrade anyway - 7.3 is no longer supported...
I still think the most likely problems are a bad checkout or an rrd.h
conflict.
-----Burton
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
> Of [EMAIL PROTECTED]
> Sent: Friday, February 06, 2004 8:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Ntop-dev] I'm stumped.
>
>
>
> Stanley,
>
> Thanks for the clarification. Unfortunately, even with rrdtool
> removed and
> the dependancies met, I still get the same error. This could be a new
> problem, but I did build from CVS about 12 hours ago on a
> different RH 7.3
> system and its working great. Perhaps its a new bug or, more likely, a
> problem on my system that I just don't understand. This system does have
> an old install of NTOP still on it, v 2..1.55 built from CVS 13
> months ago,
> but it is the install only. I have long since deleted the source tree and
> recently replaced it with tonight's CVS checkout. Thanks for the help.
>
> --
>
> J. Eric Josephson
> Director of Network and System Operations
> 978-720-2159
> mailto:[EMAIL PROTECTED]
>
>
>
> |---------+------------------------------------->
> | | Stanley Hopcroft |
> | | <[EMAIL PROTECTED]|
> | | lia.Gov.AU> |
> | | |
> | | 02/06/2004 08:52 PM |
> | | |
> |---------+------------------------------------->
>
> >-----------------------------------------------------------------
> --------------------------------------------------------|
> |
> |
> | To: [EMAIL PROTECTED]
> |
> | cc:
> |
> | Subject: Re: [Ntop-dev] I'm stumped.
> |
>
> >-----------------------------------------------------------------
> --------------------------------------------------------|
>
>
>
>
> Dear Sir,
>
> I hope I am not misreading your letter but the ntop since 2.2c (ie >=
> including all CVS) bundles RRD (an old one with the ntop source and
> compiles it with ntop [FYI this is what RRD used to do itself, but _no_
> longer does]).
>
> You don't need to install RRD for CVS ntop.
>
> OTOH if ntop fails to build because it fails while building its own rrd,
> this is an issue for the developers.
>
> Don't worry about rrd. Give the usual ntop build a crack and see how you
> go.
>
> You must however have all the _ntop_ dependencies eg
>
> . gd (include gd headers [.h])
>
> . gmake
>
> . gdbm
>
>
> Yours sincerely.
>
> --
> ------------------------------------------------------------------------
> Stanley Hopcroft
> ------------------------------------------------------------------------
>
> '...No man is an island, entire of itself; every man is a piece of the
> continent, a part of the main. If a clod be washed away by the sea,
> Europe is the less, as well as if a promontory were, as well as if a
> manor of thy friend's or of thine own were. Any man's death diminishes
> me, because I am involved in mankind; and therefore never send to know
> for whom the bell tolls; it tolls for thee...'
>
> from Meditation 17, J Donne.
>
>
>
>
>
> _______________________________________________
> Ntop-dev mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
>
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev