Xymon Mailing List Archive search

RRDtool

5 messages in this thread

list Kim Scarborough · Fri, 01 Nov 2024 16:35:56 -0500 ·
Hi folks,

Trying to set up a Xymon 4,4 server and I'm getting these errors when it tries to detect the latest RRDtool:

Checking for RRDtool ...
Not RRDtool 1.0.x, checking for 1.4.x
test-rrd.c: In function 'main':
test-rrd.c:28:42: error: passing argument 2 of 'rrd_flushcached' from incompatible pointer type [-Wincompatible-pointer-types]
    28 |         result = rrd_flushcached(pcount, rrdargs); printf("%d", result);
       |                                          ^~~~~~~
       |                                          |
       |                                          char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:242:18: note: expected 'const char **' but argument is of type 'char **'
   242 |     const char **argv);
       |     ~~~~~~~~~~~~~^~~~
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize, &ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
Not RRDtool 1.0.x or 1.4.x, checking for 1.2.x
test-rrd.c: In function 'main':
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize, &ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
ERROR: Cannot compile with RRDtool.
ERROR: Linking with RRDtool fails
RRDtool include- or library-files not found.

Any thoughts or fixes?

-- 
Kim Scarborough
list Ralph Mitchell · Fri, 01 Nov 2024 19:45:59 -0400 ·
You need the rrdtool and rrdtool development packages.  What they're called will depend on which version of Linux you're installing on.  I have an old Centos 7 with these packages installed:
rrdtool-devel-1.5.5-1.1.el7.x86_64
rrdtool-1.5.5-1.1.el7.x86_64

Info on the devel package says:
     Packager     : Japheth Cleaver
     URL             : http://oss.oetiker.ch/rrdtool/
     Summary     : RRDtool libraries and header files

If you have Ubuntu or some other OS, you'd be looking for something different.

Ralph Mitchell



quoted from Kim Scarborough
On Fri, Nov 1, 2024 at 5:36 PM Kim Scarborough <user-865441bb1d6d@xymon.invalid> wrote:
Hi folks,

Trying to set up a Xymon 4,4 server and I'm getting these errors when it
tries to detect the latest RRDtool:

Checking for RRDtool ...
Not RRDtool 1.0.x, checking for 1.4.x
test-rrd.c: In function 'main':
test-rrd.c:28:42: error: passing argument 2 of 'rrd_flushcached' from
incompatible pointer type [-Wincompatible-pointer-types]
    28 |         result = rrd_flushcached(pcount, rrdargs); printf("%d",
result);
       |                                          ^~~~~~~
       |                                          |
       |                                          char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:242:18: note: expected 'const char **' but argument
is of type 'char **'
   242 |     const char **argv);
       |     ~~~~~~~~~~~~~^~~~
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize,
&ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is
of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
Not RRDtool 1.0.x or 1.4.x, checking for 1.2.x
test-rrd.c: In function 'main':
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize,
&ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is
of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
ERROR: Cannot compile with RRDtool.
ERROR: Linking with RRDtool fails
RRDtool include- or library-files not found.

Any thoughts or fixes?

--
Kim Scarborough
xymon@xymon.com
To unsubscribe send an email to xymon-leave@xymon.com
list Tom Schmidt · Fri, 01 Nov 2024 23:34:11 -0600 ·
It would help to know what Linux distribution and version you have installed and what version of rrdtool package (including the development package).  I have a current Rocky Linux 9.4 installation that compiled and is running Xymon 4.4.0-alpha1 using rrdtool 1.7.2.
# rpm -qa | grep rrdtool
rrdtool-1.7.2-21.el9.x86_64
rrdtool-perl-1.7.2-21.el9.x86_64
rrdtool-devel-1.7.2-21.el9.x86_64

Tom

quoted from Kim Scarborough
On Fri, Nov 1, 2024 at 3:36 PM Kim Scarborough <user-865441bb1d6d@xymon.invalid> wrote:
Hi folks,

Trying to set up a Xymon 4,4 server and I'm getting these errors when it
tries to detect the latest RRDtool:

Checking for RRDtool ...
Not RRDtool 1.0.x, checking for 1.4.x
test-rrd.c: In function 'main':
test-rrd.c:28:42: error: passing argument 2 of 'rrd_flushcached' from
incompatible pointer type [-Wincompatible-pointer-types]
    28 |         result = rrd_flushcached(pcount, rrdargs); printf("%d",
result);
       |                                          ^~~~~~~
       |                                          |
       |                                          char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:242:18: note: expected 'const char **' but argument
is of type 'char **'
   242 |     const char **argv);
       |     ~~~~~~~~~~~~~^~~~
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize,
&ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is
of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
Not RRDtool 1.0.x or 1.4.x, checking for 1.2.x
test-rrd.c: In function 'main':
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize,
&ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is
of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
ERROR: Cannot compile with RRDtool.
ERROR: Linking with RRDtool fails
RRDtool include- or library-files not found.

Any thoughts or fixes?

--
Kim Scarborough
xymon@xymon.com
To unsubscribe send an email to xymon-leave@xymon.com
list Kim Scarborough · Sat, 02 Nov 2024 01:35:15 -0500 ·

No distribution, it's Linux from scratch. RRDtool version is the latest version, 1.9.0.

If 1.7.2 works, I can downgrade to that.

quoted from Tom Schmidt

On 11/2/24 12:34 AM, Tom Schmidt wrote:
It would help to know what Linux distribution and version you have installed and what version of rrdtool package (including the development package).  I have a current Rocky Linux 9.4 installation that compiled and is running Xymon 4.4.0-alpha1 using rrdtool 1.7.2.
# rpm -qa | grep rrdtool
rrdtool-1.7.2-21.el9.x86_64
rrdtool-perl-1.7.2-21.el9.x86_64
rrdtool-devel-1.7.2-21.el9.x86_64

Tom

On Fri, Nov 1, 2024 at 3:36 PM Kim Scarborough <user-865441bb1d6d@xymon.invalid> wrote:
Hi folks,

Trying to set up a Xymon 4,4 server and I'm getting these errors when it
tries to detect the latest RRDtool:

Checking for RRDtool ...
Not RRDtool 1.0.x, checking for 1.4.x
test-rrd.c: In function 'main':
test-rrd.c:28:42: error: passing argument 2 of 'rrd_flushcached' from
incompatible pointer type [-Wincompatible-pointer-types]
    28 |         result = rrd_flushcached(pcount, rrdargs); printf("%d",
result);
       |                                          ^~~~~~~
       |                                          |
       |                                          char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:242:18: note: expected 'const char **' but argument
is of type 'char **'
   242 |     const char **argv);
       |     ~~~~~~~~~~~~~^~~~
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize,
&ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is
of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
Not RRDtool 1.0.x or 1.4.x, checking for 1.2.x
test-rrd.c: In function 'main':
test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
incompatible pointer type [-Wincompatible-pointer-types]
    32 |         result = rrd_graph(pcount, rrdargs, &calcpr, &xsize,
&ysize, NULL, &ymin, &ymax); printf("%d", result);
       |                                    ^~~~~~~
       |                                    |
       |                                    char **
In file included from test-rrd.c:3:
/usr/include/rrd.h:185:5: note: expected 'const char **' but argument is
of type 'char **'
   185 |     const char **,
       |     ^~~~~~~~~~~~~
make: *** [Makefile.test-rrd:4: test-compile] Error 1
ERROR: Cannot compile with RRDtool.
ERROR: Linking with RRDtool fails
RRDtool include- or library-files not found.

Any thoughts or fixes?

--
Kim Scarborough
xymon@xymon.com
To unsubscribe send an email to xymon-leave@xymon.com

xymon@xymon.com
To unsubscribe send an email to xymon-leave@xymon.com
list Stephane Bakhos · Sat, 02 Nov 2024 03:35:43 -0400 ·
See below
quoted from Kim Scarborough

On 11/2/24 02:35, Kim Scarborough wrote:
No distribution, it's Linux from scratch. RRDtool version is the 
latest version, 1.9.0.

If 1.7.2 works, I can downgrade to that.

On 11/2/24 12:34 AM, Tom Schmidt wrote:
It would help to know what Linux distribution and version you have 
installed and what version of rrdtool package (including the 
development package).  I have a current Rocky Linux 9.4 installation 
that compiled and is running Xymon 4.4.0-alpha1 using rrdtool 1.7.2.

# rpm -qa | grep rrdtool
rrdtool-1.7.2-21.el9.x86_64
rrdtool-perl-1.7.2-21.el9.x86_64
rrdtool-devel-1.7.2-21.el9.x86_64

Tom

On Fri, Nov 1, 2024 at 3:36 PM Kim Scarborough <user-865441bb1d6d@xymon.invalid> 
wrote:

    Hi folks,

    Trying to set up a Xymon 4,4 server and I'm getting these errors
    when it
    tries to detect the latest RRDtool:

    Checking for RRDtool ...
    Not RRDtool 1.0.x, checking for 1.4.x
    test-rrd.c: In function 'main':
    test-rrd.c:28:42: error: passing argument 2 of 'rrd_flushcached'
    from
    incompatible pointer type [-Wincompatible-pointer-types]
        28 |         result = rrd_flushcached(pcount, rrdargs);
    printf("%d",
    result);
           |                                          ^~~~~~~
           |                                          |
           |                                          char **
    In file included from test-rrd.c:3:
    /usr/include/rrd.h:242:18: note: expected 'const char **' but
    argument
    is of type 'char **'
       242 |     const char **argv);
           |     ~~~~~~~~~~~~~^~~~
    test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
    incompatible pointer type [-Wincompatible-pointer-types]
        32 |         result = rrd_graph(pcount, rrdargs, &calcpr,
    &xsize,
    &ysize, NULL, &ymin, &ymax); printf("%d", result);
           |                                    ^~~~~~~
           |                                    |
           |                                    char **
    /usr/include/rrd.h:185:5: note: expected 'const char **' but
    argument is
    of type 'char **'
       185 |     const char **,
           |     ^~~~~~~~~~~~~
    make: *** [Makefile.test-rrd:4: test-compile] Error 1
    Not RRDtool 1.0.x or 1.4.x, checking for 1.2.x
    test-rrd.c: In function 'main':
    test-rrd.c:32:36: error: passing argument 2 of 'rrd_graph' from
    incompatible pointer type [-Wincompatible-pointer-types]
        32 |         result = rrd_graph(pcount, rrdargs, &calcpr,
    &xsize,
    &ysize, NULL, &ymin, &ymax); printf("%d", result);
           |                                    ^~~~~~~
           |                                    |
           |                                    char **
    In file included from test-rrd.c:3:
    /usr/include/rrd.h:185:5: note: expected 'const char **' but
    argument is
    of type 'char **'
       185 |     const char **,
           |     ^~~~~~~~~~~~~
    make: *** [Makefile.test-rrd:4: test-compile] Error 1
    ERROR: Cannot compile with RRDtool.
    ERROR: Linking with RRDtool fails
    RRDtool include- or library-files not found.

    Any thoughts or fixes?
I've had a bunch of these errors after updating my Gentoo setup to use 
gcc 14.

The issue here isn't rrd, but the test that is used in xymon to detect 
the presence of rrdtool's installation.

The file itself is in the build folder, test-rrd.c

As it does look like you have rrd installed, you could replace the int 
main to simply return 0.

Changing

char* rrdargs

to

const char* rrdargs

also seems to work.


The next stumbling block looks like more of those errors in a few files.

I've naively added a (const char **) besides all parameters that 
complain in the error, but I have no idea whatsoever if it is a good 
fix. But it does compile.

I've attached the patch, not tested beyond "it compiles."
Attachments (1)