[rrd-users] v1.3 on FreeBSD

Tobi Oetiker tobi at oetiker.ch
Sun Nov 18 23:35:07 CET 2007


Hi Steven,

look at the rrd_config.h file after runnning configure, and try
removing the HAVE_FADVISE and HAVE_MADVISE and HAVE_MMAP entries in
case you got them ... this should allow you to build a 'fancyless'
rrdtool ... then once you got this stable you could tro
re-enabeling stuff to see where the problem lies ... getting 1.3 to
work on FreeBSD would realy be a cool thing.

cheers
tobi

Today Steven Hartland wrote:

> Once installed it seems to crash when used via the perl interface with
> basic updates:
> #0  info_push (info=0x18046fe0, key=0x0, type=RD_I_VAL, value={u_cnt = 0, u_val = 0, u_str = 0x0, u_int = 0}) at rrd_info.c:55
> #1  0x18320922 in write_RRA_row (rrd_file=0x804b1c0, rrd=0xbfbfe960, rra_idx=4, rra_current=0xbfbfe92c, CDP_scratch_idx=40320,
>     pcdp_summary=0xbfbfe9b0, rra_time=1195366560) at rrd_update.c:1969
> #2  0x18321b6d in process_arg (step_start=0x4 <Address 0x4 out of bounds>, rrd=0xbfbfe960, rrd_file=0x804b1c0, rra_begin=7960,
>     rra_current=0xbfbfe92c, current_time=0xbfbfe930, current_time_usec=0xbfbfe934, pdp_temp=0x804b280, pdp_new=0x804b2c0,
>     rra_step_cnt=0x805b380, updvals=0x804b260, tmpl_idx=0x804b2a0, tmpl_cnt=5, pcdp_summary=0xbfbfe9b0, version=3,
>     skip_update=0x805b340, schedule_smooth=0xbfbfe938) at rrd_update.c:1888
> #3  0x183227d3 in _rrd_update (filename=0x804b020 "../docs/stats/machines/1497.rrd", tmplt=0x0, argc=1, argv=0x804c298,
>     pcdp_summary=0x18046fe0) at rrd_update.c:499
> #4  0x18322b16 in rrd_update_r (filename=0x804b020 "../docs/stats/machines/1497.rrd", tmplt=0x0, argc=1, argv=0x804c298)
>     at rrd_update.c:422
> #5  0x18322bff in rrd_update (argc=3, argv=0x804c290) at rrd_update.c:409
> #6  0x182f7bad in XS_RRDs_update () from /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/RRDs/RRDs.so
> #7  0x180f61c4 in Perl_pp_entersub () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
> #8  0x180ef1a9 in Perl_runops_standard () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
> #9  0x1809eb82 in perl_run () from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
> #10 0x08048fe2 in main ()
>
> ----- Original Message -----
> From: "Steven Hartland" <killing at multiplay.co.uk>
> To: <rrd-users at lists.oetiker.ch>
> Sent: Sunday, November 18, 2007 5:55 AM
> Subject: [rrd-users] v1.3 on FreeBSD
>
>
> > Anyone had any luck getting v1.3 to compile cleanly on FreeBSD?
> >
> > The first error was the one described here about
> > read-only variable 'ordering':
> > http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg02057.html
> >
> > Quite a simple fix.
> >
> > The next one however is:
> > rrd_open.c: In function `rrd_open':
> > rrd_open.c:178: warning: implicit declaration of function `madvise'
> > rrd_open.c:178: warning: nested extern declaration of `madvise'
> > rrd_open.c:178: error: `MADV_WILLNEED' undeclared (first use in this function)
> > rrd_open.c:178: error: (Each undeclared identifier is reported only once
> > rrd_open.c:178: error: for each function it appears in.)
> > rrd_open.c:178: error: `MADV_SEQUENTIAL' undeclared (first use in this function)
> > rrd_open.c:181: warning: nested extern declaration of `madvise'
> > rrd_open.c:181: error: `MADV_RANDOM' undeclared (first use in this function)
> > rrd_open.c:210: warning: nested extern declaration of `madvise'
> > rrd_open.c: In function `mincore_print':
> > rrd_open.c:290: warning: implicit declaration of function `mincore'
> > rrd_open.c:290: warning: nested extern declaration of `mincore'
> > rrd_open.c:300: warning: long int format, different type arg (arg 6)
> > rrd_open.c:307: warning: long int format, different type arg (arg 6)
> > rrd_open.c: In function `rrd_dontneed':
> > rrd_open.c:342: warning: nested extern declaration of `madvise'
> > rrd_open.c:343: error: `MADV_DONTNEED' undeclared (first use in this function)
> > rrd_open.c:365: warning: nested extern declaration of `madvise'
> > rrd_open.c: In function `rrd_flush':
> > rrd_open.c:504: warning: implicit declaration of function `fdatasync'
> > rrd_open.c:504: warning: nested extern declaration of `fdatasync'
> > rrd_open.c: At top level:
> > rrd_open.c:278: warning: 'mincore_print' defined but not used
> >
> > Which doesnt seem to be simple :(
> >
> >>From what I can tell these are defined in sys/mman.h but are guarded
> > by __BSD_VISIBLE which is automatically set in sys/cdefs.h depending
> > on the values of _ANSI_SOURCE and _C99_SOURCE and as the Makefile
> > is defining -std=c99 I assume this is why the are unavailable.
> >
> > Using the dirty hack of adding them in manually I then hit:
> > ./.libs/librrd.so: undefined reference to `fdatasync'
> >
> > It seems fdatasync doesnt exist on FreeBSD only fsync. My fix
> > here was to change fdatasync to fsync under #ifdef __FreeBSD__
> > in both rrd_open and rrd_create
> >
> > Any advice on these issues appreciated.
> >
> >    Regards
> >    Steve
> >
> > ================================================
> > This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the
> > event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any
> > information contained in it.
> >
> > In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
> > or return the E.mail to postmaster at multiplay.co.uk.
> >
> > _______________________________________________
> > rrd-users mailing list
> > rrd-users at lists.oetiker.ch
> > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> >
>
>
> ================================================
> This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.
>
> In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
> or return the E.mail to postmaster at multiplay.co.uk.
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902



More information about the rrd-users mailing list