[rrd-developers] Re: [PATCH] rrdtool 1.0.50 build on Ubuntu Breezy Badger

Tobias Oetiker oetiker at ee.ethz.ch
Sun Jan 15 14:35:24 MET 2006


Hi Blair,

thanks ... I am adding this to the 1.2 branch
and to the pending changes for 1.0.51

apropos ... there is an issue I am currently looking at, in
connection with 'multiple updates' ... since you wrote the original
code for this maybe you have some insight as to what is hitting us
here ... check out

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool-trac/ticket/8

cheers
tobi


Nov 27 Blair Zajac wrote:

> Hello,
>
> I'm still supporting rrdtool 1.0.50 on Ubuntu Breezy Badger with gcc 4.0.2 for
> my Orca data graphing package and needed the below patch to get it to compile.
> I'm sending this here for future reference in case anybody has trouble compiling
> it.  Without the patch, I received these compile errors.
>
>      $ cc -c -I.. -I../src -I../gd1.3 -D_REENTRANT -D_GNU_SOURCE
>      -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe
>      -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>      -DHAVE_CONFIG_H -O2 -DVERSION=\"1.000503\"
>      -DXS_VERSION=\"1.000503\" -fPIC "-I/usr/lib/perl/5.8/CORE"
>      -DPERLPATCHLEVEL=8 RRDs.c
>      In file included from ../src/rrd_tool.h:25,
>                       from RRDs.xs:13:
>      ../src/config_aux.h:8:1: warning: "strchr" redefined
>      In file included from /usr/include/string.h:417,
>                       from /usr/lib/perl/5.8/CORE/perl.h:731,
>                       from RRDs.xs:6:
>      /usr/include/bits/string2.h:396:1: warning: this is the location
>      of the previous definition
>      In file included from ../src/rrd_tool.h:25,
>                       from RRDs.xs:13:
>      ../src/config_aux.h:80:2: error: #error "Can't compile without
>      finite function"
>      ../src/config_aux.h:84:2: error: #error "Can't compile without
>      isinf function"
>
>
> Here's the patch:
>
> --- packages/rrdtool-1.0.50/perl-shared/RRDs.xs (revision 514)
> +++ packages/rrdtool-1.0.50/perl-shared/RRDs.xs (revision 515)
> @@ -10,8 +10,28 @@
>   }
>   #endif
>
> +/*
> + * rrd_tool.h includes config.h, but at least on Ubuntu Breezy Badger
> + * 5.10 with gcc 4.0.2, the C preprocessor picks up Perl's config.h
> + * which is included from the Perl includes and never reads rrdtool's
> + * config.h.  Without including rrdtool's config.h, this module does
> + * not compile, so include it here with an explicit path.
> + *
> + * Because rrdtool's config.h redefines VERSION which is originally
> + * set via Perl's Makefile.PL and passed down to the C compiler's
> + * command line, save the original value and reset it after the
> + * includes.
> + */
> +#define VERSION_SAVED VERSION
> +#undef VERSION
> +
> +#include "../config.h"
>   #include "../src/rrd_tool.h"
>
> +#undef VERSION
> +#define VERSION VERSION_SAVED
> +#undef VERSION_SAVED
> +
>   /* perl 5.004 compatibility */
>   #if PERLPATCHLEVEL < 5
>   #define PL_sv_undef sv_undef
>
>
> Regards,
> Blair
>
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list