rrdtool 1.4.x without graphing support?

17 messages Options
Embed this post
Permalink
Ulf Zimmermann-2

rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Anyone got an idea how much work would be involved to build/patch rrdtool 1.4.x to remove graphing support? Library dependency for EL4 is just hell at this point. And as I need librrd, I am not sure how far I can work with a static build to work with collectd together.

 

Ulf.

 


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Ulf,

Yesterday Ulf Zimmermann wrote:

> Anyone got an idea how much work would be involved to build/patch
> rrdtool 1.4.x to remove graphing support? Library dependency for
> EL4 is just hell at this point. And as I need librrd, I am not
> sure how far I can work with a static build to work with collectd
> together.

you may want to try the appended patch.

cheers
tobi


>
> Ulf.
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900
Index: src/rrd_tool.c
===================================================================
--- src/rrd_tool.c (revision 1966)
+++ src/rrd_tool.c (working copy)
@@ -693,6 +693,7 @@
             free(data);
         }
     } else if (strcmp("xport", argv[1]) == 0) {
+#ifdef HAVE_RRD_GRAPH
         int       xxsize;
         unsigned long int j = 0;
         time_t    start, end, ti;
@@ -766,7 +767,11 @@
             printf("</%s>\n", ROOT_TAG);
         }
         free(vtag);
+#else
+       rrd_set_error("the instance of rrdtool has been compiled without graphcs");
+#endif
     } else if (strcmp("graph", argv[1]) == 0) {
+#ifdef HAVE_RRD_GRAPH
         char    **calcpr;
 
 #ifdef notused /*XXX*/
@@ -799,8 +804,11 @@
                 free(calcpr);
             }
         }
-
+#else
+       rrd_set_error("the instance of rrdtool has been compiled without graphcs");
+#endif
     } else if (strcmp("graphv", argv[1]) == 0) {
+#ifdef HAVE_RRD_GRAPH
         rrd_info_t *grinfo = NULL;  /* 1 to distinguish it from the NULL that rrd_graph sends in */
 
         grinfo = rrd_graph_v(argc - 1, &argv[1]);
@@ -808,7 +816,9 @@
             rrd_info_print(grinfo);
             rrd_info_free(grinfo);
         }
-
+#else
+       rrd_set_error("the instance of rrdtool has been compiled without graphcs");
+#endif
     } else if (strcmp("tune", argv[1]) == 0)
         rrd_tune(argc - 1, &argv[1]);
     else if (strcmp("flushcached", argv[1]) == 0)
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revision 1966)
+++ src/Makefile.am (working copy)
@@ -29,27 +29,30 @@
  rrd_nan_inf.c \
  rrd_rpncalc.c \
  rrd_utils.c \
- rrd_update.c
+ rrd_update.c    \
+ hash_32.c
 
 RRD_C_FILES = \
- hash_32.c \
- pngsize.c \
  rrd_create.c \
- rrd_graph.c \
- rrd_graph_helper.c \
  rrd_version.c \
  rrd_last.c \
  rrd_lastupdate.c \
  rrd_first.c \
  rrd_restore.c \
- rrd_xport.c \
- rrd_gfx.c \
  rrd_dump.c \
  rrd_flushcached.c \
  rrd_fetch.c \
  rrd_resize.c \
  rrd_tune.c
 
+if BUILD_RRDGRAPH
+RRD_C_FILES += rrd_graph.c \
+ rrd_graph_helper.c \
+ rrd_xport.c \
+ rrd_gfx.c \
+ pngsize.c
+endif
+
 noinst_HEADERS = \
  unused.h \
         gettext.h \
Index: configure.ac
===================================================================
--- configure.ac (revision 1966)
+++ configure.ac (working copy)
@@ -102,6 +102,13 @@
 AC_ARG_ENABLE(rrdcgi,AS_HELP_STRING([--disable-rrdcgi],[disable building of rrdcgi]),
 [],[enable_rrdcgi=yes])
 
+AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_graph functions]),
+[enable_rrdcgi=no],[enable_rrd_graph=yes])
+
+if test $enable_rrd_graph != no; then
+ AC_DEFINE([HAVE_RRD_GRAPH], [], [is rrd_graph supported by this install])
+fi
+
 dnl Check if we run on a system that has fonts
 AC_ARG_WITH(rrd-default-font,
 [  --with-rrd-default-font=[OPTIONS]  set the full path to your default font.],
@@ -510,19 +517,21 @@
 
 AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
 
+AM_CONDITIONAL(BUILD_RRDGRAPH,[test $enable_rrd_graph != no])
 
+
 CORE_LIBS="$LIBS"
 
-dnl EX_CHECK_ALL(z,          zlibVersion,               zlib.h,                 zlib,        1.2.3,  http://www.gzip.org/zlib/, "")
-dnl EX_CHECK_ALL(png,        png_access_version_number, png.h,                  libpng,      1.2.10,  http://prdownloads.sourceforge.net/libpng/, "")
-dnl EX_CHECK_ALL(freetype,   FT_Init_FreeType,          ft2build.h, freetype2,   2.1.10,  http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2)
-dnl EX_CHECK_ALL(fontconfig, FcInit,                    fontconfig.h, fontconfig,  2.3.1,  http://fontconfig.org/release/, /usr/include)
+if test $enable_rrd_graph != no; then
 EX_CHECK_ALL(cairo,      cairo_font_options_create,     cairo.h,                cairo-png,   1.4.6,  http://cairographics.org/releases/, "")
 EX_CHECK_ALL(cairo,      cairo_svg_surface_create,      cairo-svg.h,            cairo-svg,   1.4.6,  http://cairographics.org/releases/, "")
 EX_CHECK_ALL(cairo,      cairo_pdf_surface_create,      cairo-pdf.h,            cairo-pdf,   1.4.6,  http://cairographics.org/releases/, "")
 EX_CHECK_ALL(cairo,      cairo_ps_surface_create,       cairo-ps.h,             cairo-ps,    1.4.6,  http://cairographics.org/releases/, "")
+fi
 EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,                 glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
+if test $enable_rrd_graph != no; then
 EX_CHECK_ALL(pango-1.0,  pango_cairo_context_set_font_options,  pango/pango.h,  pangocairo,  1.17,    http://ftp.gnome.org/pub/GNOME/sources/pango/1.17, "")
+fi
 EX_CHECK_ALL(xml2,       xmlParseFile,                  libxml/parser.h,        libxml-2.0,        2.6.31,  http://xmlsoft.org/downloads.html, /usr/include/libxml2)
 
 if test "$EX_CHECK_ALL_ERR" = "YES"; then
@@ -932,6 +941,7 @@
 echo
 echo "          With MMAP IO: $enable_mmap"
 echo "      Build rrd_getopt: $build_getopt"
+echo "       Build rrd_graph: $enable_rrd_graph"
 echo "       Static programs: $staticprogs"
 echo "          Perl Modules: $COMP_PERL"
 echo "           Perl Binary: $PERL"

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Sebastian Harl

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi,

On Thu, Nov 05, 2009 at 05:53:20AM +0100, Tobias Oetiker wrote:
> Yesterday Ulf Zimmermann wrote:
> > Anyone got an idea how much work would be involved to build/patch
> > rrdtool 1.4.x to remove graphing support? Library dependency for
> > EL4 is just hell at this point. And as I need librrd, I am not
> > sure how far I can work with a static build to work with collectd
> > together.
>
> you may want to try the appended patch.

> +if BUILD_RRDGRAPH
> +RRD_C_FILES += rrd_graph.c \
> + rrd_graph_helper.c \
> + rrd_xport.c \
> + rrd_gfx.c \
> + pngsize.c
> +endif
[…]

NB: RRD_C_FILES is later used to specify the source files for librrd.

In case this patch is supposed to be included in RRDtool, please note
that it provides an easy way to build RRDtool with a different API /
ABI. Hence, it requires a different SONAME version (or even better: a
different SONAME -- which would be easier to implement as well).

Anyway, rather than including this (imho) somewhat hackish way, I'd
rather go for splitting the library as discussed before (librrd /
librrdgraph). I'm willing to provide a patch for that targeted at
RRDtool 1.5 (it will probably require a SONAME version bump, thus, it
should imho not be included in 1.4 -- I'd also provide patches for
reverse dependencies known to be affected by that).

Cheers,
Sebastian

--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin



_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

signature.asc (204 bytes) Download Attachment
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
In reply to this post by oetiker
> -----Original Message-----
> From: Tobias Oetiker [mailto:[hidden email]]
> Sent: Wednesday, November 04, 2009 8:53 PM
> To: Ulf Zimmermann
> Cc: [hidden email]
> Subject: Re: [rrd-users] rrdtool 1.4.x without graphing support?
>
> Hi Ulf,
>
> Yesterday Ulf Zimmermann wrote:
>
> > Anyone got an idea how much work would be involved to build/patch
> > rrdtool 1.4.x to remove graphing support? Library dependency for
> > EL4 is just hell at this point. And as I need librrd, I am not
> > sure how far I can work with a static build to work with collectd
> > together.
>
> you may want to try the appended patch.
>
> cheers
> tobi

Trying to look at the patch, I got another question. Configure.ac is set to check for glib-2.0, by using glib_check_version, which wasn't added until glib 2.6. EL4 unfortunatly only has glib 2.4.7. Trying to determine what functions from glib 2.x are used. Also the glib check is inside of the block of cairo and pango, is glib used for graphing too?

Ulf.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Ulf,

Today Ulf Zimmermann wrote:

> > -----Original Message-----
> > From: Tobias Oetiker [mailto:[hidden email]]
> > Sent: Wednesday, November 04, 2009 8:53 PM
> > To: Ulf Zimmermann
> > Cc: [hidden email]
> > Subject: Re: [rrd-users] rrdtool 1.4.x without graphing support?
> >
> > Hi Ulf,
> >
> > Yesterday Ulf Zimmermann wrote:
> >
> > > Anyone got an idea how much work would be involved to build/patch
> > > rrdtool 1.4.x to remove graphing support? Library dependency for
> > > EL4 is just hell at this point. And as I need librrd, I am not
> > > sure how far I can work with a static build to work with collectd
> > > together.
> >
> > you may want to try the appended patch.
> >
> > cheers
> > tobi
>
> Trying to look at the patch, I got another question. Configure.ac
> is set to check for glib-2.0, by using glib_check_version, which
> wasn't added until glib 2.6. EL4 unfortunatly only has glib
> 2.4.7. Trying to determine what functions from glib 2.x are used.
> Also the glib check is inside of the block of cairo and pango, is
> glib used for graphing too?

glib is a dependency of pango, it is not used directly by the
graphing code ...

the cached uses it though ...

cheers
tobi
>
> Ulf.
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sebastian Harl
Hi Sebastian,

Today Sebastian Harl wrote:

> Hi,
>
> On Thu, Nov 05, 2009 at 05:53:20AM +0100, Tobias Oetiker wrote:
> > Yesterday Ulf Zimmermann wrote:
> > > Anyone got an idea how much work would be involved to build/patch
> > > rrdtool 1.4.x to remove graphing support? Library dependency for
> > > EL4 is just hell at this point. And as I need librrd, I am not
> > > sure how far I can work with a static build to work with collectd
> > > together.
> >
> > you may want to try the appended patch.
>
> > +if BUILD_RRDGRAPH
> > +RRD_C_FILES += rrd_graph.c \
> > + rrd_graph_helper.c \
> > + rrd_xport.c \
> > + rrd_gfx.c \
> > + pngsize.c
> > +endif
> [?]
>
> NB: RRD_C_FILES is later used to specify the source files for librrd.
>
> In case this patch is supposed to be included in RRDtool, please note
> that it provides an easy way to build RRDtool with a different API /
> ABI. Hence, it requires a different SONAME version (or even better: a
> different SONAME -- which would be easier to implement as well).

this patch is not the library split or anything like this ... it
is simply an attempt to help ulf ...

note that there are already similar configure options for libdbi
which enable/disable functionality without changeing the library
version ...

after doing this initial version, and thinking about it I think
adding stub versions of the public graph functions which set
rrd_error when called would be a nicer variant ... leaving the
library interface in place ...

> Anyway, rather than including this (imho) somewhat hackish way, I'd
> rather go for splitting the library as discussed before (librrd /
> librrdgraph). I'm willing to provide a patch for that targeted at
> RRDtool 1.5 (it will probably require a SONAME version bump, thus, it
> should imho not be included in 1.4 -- I'd also provide patches for
> reverse dependencies known to be affected by that).

yes, a split of the library for 1.5 would be cool ... I would
propose the following split:

  librrdclient - access to rrdcached functions - no deps
  librrdcore - core rrdtool functions (create/update) - no deps
  librrdcached - rrdcached  - glib
  librrdgraph - graphing - cairo pango

  librrd - compat layer - librrdclient librrdcore librrdcached librrdgraph

configure could then automatically disable the bits of rrdtool
which can not be built due to libraries missing

cheers
tobi

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Sebastian Harl

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Tobi,

On Thu, Nov 05, 2009 at 11:56:10PM +0100, Tobias Oetiker wrote:

> Today Sebastian Harl wrote:
> > On Thu, Nov 05, 2009 at 05:53:20AM +0100, Tobias Oetiker wrote:
> > > Yesterday Ulf Zimmermann wrote:
> > > > Anyone got an idea how much work would be involved to build/patch
> > > > rrdtool 1.4.x to remove graphing support? Library dependency for
> > > > EL4 is just hell at this point. And as I need librrd, I am not
> > > > sure how far I can work with a static build to work with collectd
> > > > together.
> > >
> > > you may want to try the appended patch.
> >
> > > +if BUILD_RRDGRAPH
> > > +RRD_C_FILES += rrd_graph.c \
> > > + rrd_graph_helper.c \
> > > + rrd_xport.c \
> > > + rrd_gfx.c \
> > > + pngsize.c
> > > +endif
> > [?]
> >
> > NB: RRD_C_FILES is later used to specify the source files for librrd.
> >
> > In case this patch is supposed to be included in RRDtool, please note
> > that it provides an easy way to build RRDtool with a different API /
> > ABI. Hence, it requires a different SONAME version (or even better: a
> > different SONAME -- which would be easier to implement as well).
>
> this patch is not the library split or anything like this ... it
> is simply an attempt to help ulf ...
That's what I though -- I just wanted to make sure we don't miss this
issue ;-)

> note that there are already similar configure options for libdbi
> which enable/disable functionality without changeing the library
> version ...

Darn, I did not notice that so far :-/

This is not a good thing either (imho). One could argue that taking care
of appropriate SONAME version changes is the responsibility of distrib-
utors. However, this will create problems for users if done differently
on different distributions.

> after doing this initial version, and thinking about it I think
> adding stub versions of the public graph functions which set
> rrd_error when called would be a nicer variant ... leaving the
> library interface in place ...

This would keep the API unchanged but it *does* change the ABI (the
semantic of some functions would change -- dramatically even), thus
still requiring a SONAME version change.

> > Anyway, rather than including this (imho) somewhat hackish way, I'd
> > rather go for splitting the library as discussed before (librrd /
> > librrdgraph). I'm willing to provide a patch for that targeted at
> > RRDtool 1.5 (it will probably require a SONAME version bump, thus, it
> > should imho not be included in 1.4 -- I'd also provide patches for
> > reverse dependencies known to be affected by that).
>
> yes, a split of the library for 1.5 would be cool ... I would
> propose the following split:
>
>   librrdclient - access to rrdcached functions - no deps
Sure, why not …

>   librrdcore - core rrdtool functions (create/update) - no deps

You've been talking about an API-redesign scheduled for 1.5 -- any
specific plans for that yet?

Also, as of now, this lib would depend on libdbi. If we want to split
that out as well, librrdcore would still depend on that unless
rrd_fetch() would be split into two functions. Another approach would be
to introduce "backend-drivers" (i.e., one handling files, one handling
SQL databases thru dbi, etc.). Those drivers could then be loaded
dynamically by rrd_fetch(). IIrc, somebody has proposed a "virtual file-
system layer" some time ago -- what happened to that?

>   librrdcached - rrdcached  - glib

What's that supposed to include and what purpose is it going to serve?
Do you want to make rrd_daemon.c:main available thru the/a library? I
don't see any benefits from that.

>   librrdgraph - graphing - cairo pango

That's the most important one ;-)

>   librrd - compat layer - librrdclient librrdcore librrdcached librrdgraph

I'm still unsure about details like "does that change the ABI?", etc.
(see a previous E-mail in a different discussion on that topic) but, I
guess, it might make live a bit easier for users who compile stuff them-
selves (rather than having their distributor take care of that), so
(*shrug*) why not … ;-)

> configure could then automatically disable the bits of rrdtool
> which can not be built due to libraries missing

NB: "bits" as in "single libraries", rather than features of one library

Cheers,
Sebastian

--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin



_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

signature.asc (204 bytes) Download Attachment
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Sebastian,

Friday Sebastian Harl wrote:

> Hi Tobi,
>
> On Thu, Nov 05, 2009 at 11:56:10PM +0100, Tobias Oetiker wrote:
> > Today Sebastian Harl wrote:
> > > On Thu, Nov 05, 2009 at 05:53:20AM +0100, Tobias Oetiker wrote:
> > > > Yesterday Ulf Zimmermann wrote:
> > > > > Anyone got an idea how much work would be involved to build/patch
> > > > > rrdtool 1.4.x to remove graphing support? Library dependency for
> > > > > EL4 is just hell at this point. And as I need librrd, I am not
> > > > > sure how far I can work with a static build to work with collectd
> > > > > together.
> > > >
> > > > you may want to try the appended patch.
> > >
> > > > +if BUILD_RRDGRAPH
> > > > +RRD_C_FILES += rrd_graph.c \
> > > > + rrd_graph_helper.c \
> > > > + rrd_xport.c \
> > > > + rrd_gfx.c \
> > > > + pngsize.c
> > > > +endif
> > > [?]
> > >
> > > NB: RRD_C_FILES is later used to specify the source files for librrd.
> > >
> > > In case this patch is supposed to be included in RRDtool, please note
> > > that it provides an easy way to build RRDtool with a different API /
> > > ABI. Hence, it requires a different SONAME version (or even better: a
> > > different SONAME -- which would be easier to implement as well).
> >
> > this patch is not the library split or anything like this ... it
> > is simply an attempt to help ulf ...
>
> That's what I though -- I just wanted to make sure we don't miss this
> issue ;-)
>
> > note that there are already similar configure options for libdbi
> > which enable/disable functionality without changeing the library
> > version ...
>
> Darn, I did not notice that so far :-/
>
> This is not a good thing either (imho). One could argue that taking care
> of appropriate SONAME version changes is the responsibility of distrib-
> utors. However, this will create problems for users if done differently
> on different distributions.
>
> > after doing this initial version, and thinking about it I think
> > adding stub versions of the public graph functions which set
> > rrd_error when called would be a nicer variant ... leaving the
> > library interface in place ...
>
> This would keep the API unchanged but it *does* change the ABI (the
> semantic of some functions would change -- dramatically even), thus
> still requiring a SONAME version change.

well this is a fundamental problem since configure options CAN
change how a program works, also the mmap option comes to mind ...
I guess this is not easily solved in a way that makes everybody
happe, so I want to keep it to API consistancy. If the user compiles
rrdtool in a particualar way then the program does behave
differently but this does not come as a surprise ...

obviously packagers for distributions should take care of keeping
things consistant ...

> > > Anyway, rather than including this (imho) somewhat hackish way, I'd
> > > rather go for splitting the library as discussed before (librrd /
> > > librrdgraph). I'm willing to provide a patch for that targeted at
> > > RRDtool 1.5 (it will probably require a SONAME version bump, thus, it
> > > should imho not be included in 1.4 -- I'd also provide patches for
> > > reverse dependencies known to be affected by that).
> >
> > yes, a split of the library for 1.5 would be cool ... I would
> > propose the following split:
> >
> >   librrdclient - access to rrdcached functions - no deps
>
> Sure, why not ?

I would love to see a core of rrdtool functionality without library
dependencies this makes it easy to compile the beast for small
(embeded?) systems ...

> >   librrdcore - core rrdtool functions (create/update) - no deps
>
> You've been talking about an API-redesign scheduled for 1.5 -- any
> specific plans for that yet?

not yet ... but the general idea is to have a new api (more c-ish)
and then provide the classic api on top. My main focus for 1.5 is
the data format though ...

> Also, as of now, this lib would depend on libdbi. If we want to split
> that out as well, librrdcore would still depend on that unless
> rrd_fetch() would be split into two functions. Another approach would be
> to introduce "backend-drivers" (i.e., one handling files, one handling
> SQL databases thru dbi, etc.). Those drivers could then be loaded
> dynamically by rrd_fetch(). IIrc, somebody has proposed a "virtual file-
> system layer" some time ago -- what happened to that?

have not heard anything from the guy ... I guess this might tie in
with the cached access ..

> >   librrdcached - rrdcached  - glib
>
> What's that supposed to include and what purpose is it going to serve?
> Do you want to make rrd_daemon.c:main available thru the/a library? I
> don't see any benefits from that.

you are right

> >   librrdgraph - graphing - cairo pango
>
> That's the most important one ;-)

:-)

> >   librrd - compat layer - librrdclient librrdcore librrdcached librrdgraph
>
> I'm still unsure about details like "does that change the ABI?", etc.
> (see a previous E-mail in a different discussion on that topic) but, I
> guess, it might make live a bit easier for users who compile stuff them-
> selves (rather than having their distributor take care of that), so
> (*shrug*) why not ? ;-)

there are such people :-)

> > configure could then automatically disable the bits of rrdtool
> > which can not be built due to libraries missing
>
> NB: "bits" as in "single libraries", rather than features of one library

yep

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
In reply to this post by oetiker
> > Trying to look at the patch, I got another question. Configure.ac
> > is set to check for glib-2.0, by using glib_check_version, which
> > wasn't added until glib 2.6. EL4 unfortunatly only has glib
> > 2.4.7. Trying to determine what functions from glib 2.x are used.
> > Also the glib check is inside of the block of cairo and pango, is
> > glib used for graphing too?
>
> glib is a dependency of pango, it is not used directly by the
> graphing code ...
>
> the cached uses it though ...
>
> cheers
> tobi

Ok, looking at this again after fighting other fires. Currently the configure fails due to the glib version. Configure.ac defines the check for glib as:

EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,                 glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")

Glib_check_version was added in 2.6, EL4 only has 2.4.7. Anyone know how to define this check for a version below 2.6?

Ulf.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Ulf,

Today Ulf Zimmermann wrote:

> > > Trying to look at the patch, I got another question. Configure.ac
> > > is set to check for glib-2.0, by using glib_check_version, which
> > > wasn't added until glib 2.6. EL4 unfortunatly only has glib
> > > 2.4.7. Trying to determine what functions from glib 2.x are used.
> > > Also the glib check is inside of the block of cairo and pango, is
> > > glib used for graphing too?
> >
> > glib is a dependency of pango, it is not used directly by the
> > graphing code ...
> >
> > the cached uses it though ...
> >
> > cheers
> > tobi
>
> Ok, looking at this again after fighting other fires. Currently the configure fails due to the glib version. Configure.ac defines the check for glib as:
>
> EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,                 glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
>
> Glib_check_version was added in 2.6, EL4 only has 2.4.7. Anyone know how to define this check for a version below 2.6?

you can use another function there ... but then again if you just
want rrdtool then I think glib is not even required ...

cheers
tobi

>
> Ulf.
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink


> -----Original Message-----
> From: Tobias Oetiker [mailto:[hidden email]]
> Sent: Tuesday, November 17, 2009 12:46 PM
> To: Ulf Zimmermann
> Cc: [hidden email]
> Subject: RE: [rrd-users] rrdtool 1.4.x without graphing support?
>
> Hi Ulf,
>
> Today Ulf Zimmermann wrote:
>
> > > > Trying to look at the patch, I got another question. Configure.ac
> > > > is set to check for glib-2.0, by using glib_check_version, which
> > > > wasn't added until glib 2.6. EL4 unfortunatly only has glib
> > > > 2.4.7. Trying to determine what functions from glib 2.x are used.
> > > > Also the glib check is inside of the block of cairo and pango, is
> > > > glib used for graphing too?
> > >
> > > glib is a dependency of pango, it is not used directly by the
> > > graphing code ...
> > >
> > > the cached uses it though ...
> > >
> > > cheers
> > > tobi
> >
> > Ok, looking at this again after fighting other fires. Currently the
> configure fails due to the glib version. Configure.ac defines the check
> for glib as:
> >
> > EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,
> glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
> >
> > Glib_check_version was added in 2.6, EL4 only has 2.4.7. Anyone know
> how to define this check for a version below 2.6?
>
> you can use another function there ... but then again if you just
> want rrdtool then I think glib is not even required ...

I am right now looking for librrd, including rrdcached (as client) to be used for collectd. You wrote above that cached uses glib?

>
> cheers
> tobi
>
> >
> > Ulf.
> >
> >
>
> --
> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Ulf,

Today Ulf Zimmermann wrote:

>
>
> > -----Original Message-----
> > From: Tobias Oetiker [mailto:[hidden email]]
> > Sent: Tuesday, November 17, 2009 12:46 PM
> > To: Ulf Zimmermann
> > Cc: [hidden email]
> > Subject: RE: [rrd-users] rrdtool 1.4.x without graphing support?
> >
> > Hi Ulf,
> >
> > Today Ulf Zimmermann wrote:
> >
> > > > > Trying to look at the patch, I got another question. Configure.ac
> > > > > is set to check for glib-2.0, by using glib_check_version, which
> > > > > wasn't added until glib 2.6. EL4 unfortunatly only has glib
> > > > > 2.4.7. Trying to determine what functions from glib 2.x are used.
> > > > > Also the glib check is inside of the block of cairo and pango, is
> > > > > glib used for graphing too?
> > > >
> > > > glib is a dependency of pango, it is not used directly by the
> > > > graphing code ...
> > > >
> > > > the cached uses it though ...
> > > >
> > > > cheers
> > > > tobi
> > >
> > > Ok, looking at this again after fighting other fires. Currently the
> > configure fails due to the glib version. Configure.ac defines the check
> > for glib as:
> > >
> > > EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,
> > glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
> > >
> > > Glib_check_version was added in 2.6, EL4 only has 2.4.7. Anyone know
> > how to define this check for a version below 2.6?
> >
> > you can use another function there ... but then again if you just
> > want rrdtool then I think glib is not even required ...
>
> I am right now looking for librrd, including rrdcached (as
> client) to be used for collectd. You wrote above that cached uses
> glib?

yes cached uses it, but only on the server ... clients do not use
cached ...

cheers
tobi



--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink


> -----Original Message-----
> From: Tobias Oetiker [mailto:[hidden email]]
> Sent: Tuesday, November 17, 2009 12:51 PM
> To: Ulf Zimmermann
> Cc: [hidden email]
> Subject: RE: [rrd-users] rrdtool 1.4.x without graphing support?
>
> Hi Ulf,
>
> Today Ulf Zimmermann wrote:
>
> >
> >
> > > -----Original Message-----
> > > From: Tobias Oetiker [mailto:[hidden email]]
> > > Sent: Tuesday, November 17, 2009 12:46 PM
> > > To: Ulf Zimmermann
> > > Cc: [hidden email]
> > > Subject: RE: [rrd-users] rrdtool 1.4.x without graphing support?
> > >
> > > Hi Ulf,
> > >
> > > Today Ulf Zimmermann wrote:
> > >
> > > > > > Trying to look at the patch, I got another question.
> Configure.ac
> > > > > > is set to check for glib-2.0, by using glib_check_version,
> which
> > > > > > wasn't added until glib 2.6. EL4 unfortunatly only has glib
> > > > > > 2.4.7. Trying to determine what functions from glib 2.x are
> used.
> > > > > > Also the glib check is inside of the block of cairo and
> pango, is
> > > > > > glib used for graphing too?
> > > > >
> > > > > glib is a dependency of pango, it is not used directly by the
> > > > > graphing code ...
> > > > >
> > > > > the cached uses it though ...
> > > > >
> > > > > cheers
> > > > > tobi
> > > >
> > > > Ok, looking at this again after fighting other fires. Currently
> the
> > > configure fails due to the glib version. Configure.ac defines the
> check
> > > for glib as:
> > > >
> > > > EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,
> > > glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
> > > >
> > > > Glib_check_version was added in 2.6, EL4 only has 2.4.7. Anyone
> know
> > > how to define this check for a version below 2.6?
> > >
> > > you can use another function there ... but then again if you just
> > > want rrdtool then I think glib is not even required ...
> >
> > I am right now looking for librrd, including rrdcached (as
> > client) to be used for collectd. You wrote above that cached uses
> > glib?
>
> yes cached uses it, but only on the server ... clients do not use
> cached ...

Ok, I will patch out the check for it in configure.ac for now.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
> > > I am right now looking for librrd, including rrdcached (as
> > > client) to be used for collectd. You wrote above that cached uses
> > > glib?
> >
> > yes cached uses it, but only on the server ... clients do not use
> > cached ...
>
> Ok, I will patch out the check for it in configure.ac for now

I do not see an option to specific not rrd_daemon, so after removing the glib check in configure.ac, I added still CPPFLAGS to the configure for it to find the include files of the older glib 2.4.17, as otherwise the compile of rrd_daemon.c complains about all the glib includes.

This results still into two errors:

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR="\"/home/ulf/tmp4/testinstall/share/locale\"" -DVERSION='"1.4.2"' -DLOCALSTATEDIR='"/home/ulf/tmp4/testinstall/var"' -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/libxml2 -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W  -fPIC -DPIC -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W  -fPIC -DPIC -MT rrdcached-rrd_daemon.o -MD -MP -MF ".deps/rrdcached-rrd_daemon.Tpo" -c -o rrdcached-rrd_daemon.o `test -f 'rrd_daemon.c' || echo './'`rrd_daemon.c; \
then mv -f ".deps/rrdcached-rrd_daemon.Tpo" ".deps/rrdcached-rrd_daemon.Po"; else rm -f ".deps/rrdcached-rrd_daemon.Tpo"; exit 1; fi
rrd_daemon.c: In function `flush_old_values':
rrd_daemon.c:822: error: void value not ignored as it ought to be
rrd_daemon.c: In function `handle_request_forget':
rrd_daemon.c:1271: error: void value not ignored as it ought to be

This is on the 1.4.2 code, line 822 is:

    assert( g_tree_remove(cache_tree, cfd.keys[k]) == TRUE );

Line 1271 is:

  found = g_tree_remove(cache_tree, file);

In version 2.4.17 g_tree_remove returns void, in version 2.8 and later this changes to Boolean. Function is used once to assert, I think I can just patch that out to not check for TRUE and assert. But the other location at 1271 wants to do something based on the return. Any suggestion if I can patch out the journal_write?


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Hi Ulf,

Today Ulf Zimmermann wrote:

> > > > I am right now looking for librrd, including rrdcached (as
> > > > client) to be used for collectd. You wrote above that cached uses
> > > > glib?
> > >
> > > yes cached uses it, but only on the server ... clients do not use
> > > cached ...
> >
> > Ok, I will patch out the check for it in configure.ac for now
>
> I do not see an option to specific not rrd_daemon, so after removing the glib check in configure.ac, I added still CPPFLAGS to the configure for it to find the include files of the older glib 2.4.17, as otherwise the compile of rrd_daemon.c complains about all the glib includes.
>
> This results still into two errors:
>
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR="\"/home/ulf/tmp4/testinstall/share/locale\"" -DVERSION='"1.4.2"' -DLOCALSTATEDIR='"/home/ulf/tmp4/testinstall/var"' -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/libxml2 -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W  -fPIC -DPIC -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W  -fPIC -DPIC -MT rrdcached-rrd_daemon.o -MD -MP -MF ".deps/rrdcached-rrd_daemon.Tpo" -c -o rrdcached-rrd_daemon.o `test -f 'rrd_daemon.c' || echo './'`rrd_daemon.c; \
> then mv -f ".deps/rrdcached-rrd_daemon.Tpo" ".deps/rrdcached-rrd_daemon.Po"; else rm -f ".deps/rrdcached-rrd_daemon.Tpo"; exit 1; fi
> rrd_daemon.c: In function `flush_old_values':
> rrd_daemon.c:822: error: void value not ignored as it ought to be
> rrd_daemon.c: In function `handle_request_forget':
> rrd_daemon.c:1271: error: void value not ignored as it ought to be
>
> This is on the 1.4.2 code, line 822 is:
>
>     assert( g_tree_remove(cache_tree, cfd.keys[k]) == TRUE );
>
> Line 1271 is:
>
>   found = g_tree_remove(cache_tree, file);
>
> In version 2.4.17 g_tree_remove returns void, in version 2.8 and later this changes to Boolean. Function is used once to assert, I think I can just patch that out to not check for TRUE and assert. But the other location at 1271 wants to do something based on the return. Any suggestion if I can patch out the journal_write?

do you need rrd_cached ? I thought you were doing clients ... they
do not need it ... just don't compile rrd_cached.

cheers
tobi

>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink


> -----Original Message-----
> From: Tobias Oetiker [mailto:[hidden email]]
> Sent: Tuesday, November 17, 2009 2:07 PM
> To: Ulf Zimmermann
> Cc: [hidden email]
> Subject: RE: [rrd-users] rrdtool 1.4.x without graphing support?
>
> Hi Ulf,
>
> Today Ulf Zimmermann wrote:
>
> > > > > I am right now looking for librrd, including rrdcached (as
> > > > > client) to be used for collectd. You wrote above that cached
> uses
> > > > > glib?
> > > >
> > > > yes cached uses it, but only on the server ... clients do not use
> > > > cached ...
> > >
> > > Ok, I will patch out the check for it in configure.ac for now
> >
> > I do not see an option to specific not rrd_daemon, so after removing
> the glib check in configure.ac, I added still CPPFLAGS to the configure
> for it to find the include files of the older glib 2.4.17, as otherwise
> the compile of rrd_daemon.c complains about all the glib includes.
> >
> > This results still into two errors:
> >
> > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -
> DLOCALEDIR="\"/home/ulf/tmp4/testinstall/share/locale\"" -
> DVERSION='"1.4.2"' -DLOCALSTATEDIR='"/home/ulf/tmp4/testinstall/var"' -
> I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -
> I/usr/include/libxml2 -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -
> std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -
> Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -
> Wold-style-definition -W  -fPIC -DPIC -g -O2 -D_GNU_SOURCE -fno-strict-
> aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -
> Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-
> externs -Winline -Wold-style-definition -W  -fPIC -DPIC -MT rrdcached-
> rrd_daemon.o -MD -MP -MF ".deps/rrdcached-rrd_daemon.Tpo" -c -o
> rrdcached-rrd_daemon.o `test -f 'rrd_daemon.c' || echo
> './'`rrd_daemon.c; \
> > then mv -f ".deps/rrdcached-rrd_daemon.Tpo" ".deps/rrdcached-
> rrd_daemon.Po"; else rm -f ".deps/rrdcached-rrd_daemon.Tpo"; exit 1; fi
> > rrd_daemon.c: In function `flush_old_values':
> > rrd_daemon.c:822: error: void value not ignored as it ought to be
> > rrd_daemon.c: In function `handle_request_forget':
> > rrd_daemon.c:1271: error: void value not ignored as it ought to be
> >
> > This is on the 1.4.2 code, line 822 is:
> >
> >     assert( g_tree_remove(cache_tree, cfd.keys[k]) == TRUE );
> >
> > Line 1271 is:
> >
> >   found = g_tree_remove(cache_tree, file);
> >
> > In version 2.4.17 g_tree_remove returns void, in version 2.8 and
> later this changes to Boolean. Function is used once to assert, I think
> I can just patch that out to not check for TRUE and assert. But the
> other location at 1271 wants to do something based on the return. Any
> suggestion if I can patch out the journal_write?
>
> do you need rrd_cached ? I thought you were doing clients ... they
> do not need it ... just don't compile rrd_cached.

No I don't need it, what is the easiest way of disabling the compile of it?

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Ulf Zimmermann-2

Re: rrdtool 1.4.x without graphing support?

Reply Threaded More More options
Print post
Permalink
Attached are the patches and the spec file I used to build a version now on RedHat EL4 without graphing support and no rrdcached.

The spec file is from an older version and I did do some modifications to it, to fit my environment/EL4.

As we don't care about ruby, tcl, php or python I used this command to build:

rpmbuild -bb --define '_without_python 0' --define '_without_php 0' --define '_without_tcl 0' --define '_without_ruby 0' rrdtool.spec

I am now proceeding with a test of building collectd 4.8.1 and to use it to send data to a central server, which will run rrdcached.

Ulf.






_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

rrdtool.spec (28K) Download Attachment
rrdtool-1.4.2-no_graph_patch (6K) Download Attachment
rrdtool-1.4.2-no_rrdcached_patch (420 bytes) Download Attachment
rrdtool-1.4.2-rrd_restore.c.patch (460 bytes) Download Attachment