Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin Franco

Good morning,

 

I’m trying to compile RRDTool 1.6.0 and RRDs.pm for Windows against currently available community editions of 32 bit ActiveState Perl such as 5.20 and 5.22. Being a novice at this I had a slow start while installing the necessary SDK and Visual Studio. I believe I am on the correct path but I’m finding more challenges than answers right now. I wonder if anyone who has succeeded at this or knows perl more intimately can shed any light on what I am doing wrong:

 

Following the instructions in /win32 when I get to step 5 I execute “nmake -f win32\Makefile.msc” but receive the error “don't know how to make './win32/librrd-4.def'”. I haven’t even an inkling where to start troubleshooting this.

 

Assuming that the RRDs.pm is created by making the files in bindings/perl-shared/ I’ve attempted this as well. Starting with changes to the paths in makefile.pl I then execute

perl Makefile.PL MAKE=nmake

This generates some “mostly harmless” warnings such for 21 libraries such as

Warning (mostly harmless): No library found for -lmoldname

Warning (mostly harmless): No library found for -lkernel32

Warning (mostly harmless): No library found for -luser32

Warning (mostly harmless): No library found for -lgdi32

Since I can find nothing helpful to me about where I can get these libraries I’m assuming the “mostly harmless” message is true and try to nmake.

 

(Incidentally, the README in the perl-shared folder has the 4th prerequisite as “- Make the project rrdlib.vcproj in Release mode to create rrdlib.lib” but I cannot find this vcproj file nor do I think this would affect the next error.

 

This leads to the following error:

         -c  -I../../src -I../../win32 "-Ierl_core_dir" -I"c_dir/include" -I"dk_dir/Include"  -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -O2 -MD    -DVERSION=\"1.5001\"  -DXS_VERSION=\"1.5001\"  "-IC:\Perl\lib\CORE"  -DPERLPATCHLEVEL=20 -D_CRT_SECURE_NO_WARNINGS -DWIN32 RRDs.c

'-c' is not recognized as an internal or external command,

operable program or batch file.

NMAKE : fatal error U1077: '-c' : return code '0x1'

Stop.

 

There is no command preceding the switches! Checking the makefile it seems the command is supposed to be in the CC constant which is null:

 

# --- MakeMaker const_config section:

 

# These definitions are from config.sh (via C:/Perl/lib/Config.pm).

# They may have been overridden via Makefile.PL or on the command line.

AR = lib

CC =

CCCDLFLAGS = 

 

If I manually edit the makefile and indicate cc = perl.exe  then I receive messages about invalid switches, for example –O2 is not a valid perl command line switch, nor –fwrapv or any of those beginning with –D.

 

Clearly, something is going horribly wrong or I’ve completely misunderstood what I am supposed to do.

 

Looking forward to your input.

 

Best wishes,

 

Colin

 

 


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

sholden
Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for Windows and have gotten stuck at the error “don't know how to make './win32/librrd-4.def'”.  Any help from those answering this question is appreciated (although I am trying to use C++ instead of PERL).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin Franco
Perhaps my mail was unclear. At the point when I get that error I am also using C++. It is comforting to know that at least one other person has reached the same wall as me.

Regards,

Colin

-----Original Message-----
From: rrd-users [mailto:rrd-users-bounces+colin=[hidden email]] On Behalf Of sholden
Sent: Monday, June 13, 2016 3:58 PM
To: [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for Windows and have gotten stuck at the error “don't know how to make './win32/librrd-4.def'”.  Any help from those answering this question is appreciated (although I am trying to use C++ instead of PERL).



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Compiling-RRDTool-1-6-0-and-RRDs-pm-for-Windows-tp7583374p7583375.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

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

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Joe Kane
It looks like the tarball distribution for both the 1.5.x and 1.6.x releases of RRDTOOL is missing several files from the WIN32 directory.  According to the release notes, For 1.5.x and 1.6x the win32 build process was reworked, and apparently has been configured with VS2013.  I hadn't previously tried to build these branches (and I have VS2008).
 
For the error that you have noted, the compiler is complaining because files referenced in the MAkefile.MSC(like *.def files, *.rc files etc for the dlls and resources) are just missing from the win32 directory, as are the VS project/solution (GUI build) files.  When I took a look at the 1.6.x repository on GIT, those files are present.
 
So I grabbed the relevant files  from GIT /win32/ and tried to build for 1.6.x.   The Gui build based VS files (rrd.sln etc) are written by VS2013 and VS2008 won't load them  (not backward compatible). So I tried to build right from the Makefile.msc again.  It gets past this initial error (d"on't know how to make rddtool-4.def"), but I had to make some some tweaks for VS2008 versus VS2013 (Rc.exe in 2008 doesn't support the /nologo flag, this was added after vs2008).
 
I have run into  compiler errors though and haven't sorted through them all.  Some are clearly related to VS2013 assumption. For example, VS2008 is not 'C99' compliant so doesn't include STDINT.h, (which is referenced in one of the source files in 1.6.x).  I know that VS2013 is C99 compliant and so has STDINT.h., but VS2008 does not.  I sorted this one out by sourcing STDINT.h.
 
There are other uglier compile errors for coercion pointer issues (compiler wants an explicit cast) and syntax error issues in rrd_client.c . These may be due to other setting/compiler differences between 2008 and 2013 but probably of out my hack and slash paygrade.
 
I went back to my last successful build (1.4.8) on win32, and it mostly built without too much issue (one small rrd_config.h touch, I think) on VS2008.  It also didn't have a build structured like above, so had less extra VS support file dependences. The 1.4.x tarballs all include the full complement of win32 files.
 
So, I think for one, the tarball dist needs to be looked at.  I will probably keep plodding through the compile attempt, but maybe others more versed can take a look and comment relative to a successful win32 build. 
 
 
 
 
Sent: Monday, June 13, 2016 at 12:33 PM
From: "Colin Franco" <[hidden email]>
To: 'sholden' <[hidden email]>, [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows
Perhaps my mail was unclear. At the point when I get that error I am also using C++. It is comforting to know that at least one other person has reached the same wall as me.

Regards,

Colin

-----Original Message-----
From: rrd-users [mailto:rrd-users-bounces+colin=[hidden email]] On Behalf Of sholden
Sent: Monday, June 13, 2016 3:58 PM
To: [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for Windows and have gotten stuck at the error “don't know how to make './win32/librrd-4.def'”. Any help from those answering this question is appreciated (although I am trying to use C++ instead of PERL).



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Compiling-RRDTool-1-6-0-and-RRDs-pm-for-Windows-tp7583374p7583375.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

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

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

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

oetiker
Administrator
Hi Joe,

please make a PR from your findings, so that I can add these to the
1.6.1 release ... note that extra files to be included in the
tarbal just have to be added in the Makefile.am EXTRA_DIST line
that at the moment only includes 2 files from the win32 directory

I have unfortunately to data not found anyone willing to finance
good windows rrdtool packaging and stuff ... so all I do is
integrate PRs I get from people who work on it ...

cheers
tobi

Today Joe Kane wrote:

> It looks like the tarball distribution for both the 1.5.x and 1.6.x releases
> of RRDTOOL is missing several files from the WIN32 directory.  According to
> the release notes, For 1.5.x and 1.6x the win32 build process was reworked,
> and apparently has been configured with VS2013.  I hadn't previously tried
> to build these branches (and I have VS2008).
>  
> For the error that you have noted, the compiler is complaining because files
> referenced in the MAkefile.MSC(like *.def files, *.rc files etc for the dlls
> and resources) are just missing from the win32 directory, as are the VS
> project/solution (GUI build) files.  When I took a look at the 1.6.x
> repository on GIT, those files are present.
>  
> So I grabbed the relevant files  from GIT /win32/ and tried to build for
> 1.6.x.   The Gui build based VS files (rrd.sln etc) are written by VS2013
> and VS2008 won't load them  (not backward compatible). So I tried to build
> right from the Makefile.msc again.  It gets past this initial error (d"on't
> know how to make rddtool-4.def"), but I had to make some some tweaks for
> VS2008 versus VS2013 (Rc.exe in 2008 doesn't support the /nologo flag, this
> was added after vs2008).
>  
> I have run into  compiler errors though and haven't sorted through them
> all.  Some are clearly related to VS2013 assumption. For example, VS2008 is
> not 'C99' compliant so doesn't include STDINT.h, (which is referenced in one
> of the source files in 1.6.x).  I know that VS2013 is C99 compliant and so
> has STDINT.h., but VS2008 does not.  I sorted this one out by sourcing
> STDINT.h.
>  
> There are other uglier compile errors for coercion pointer issues (compiler
> wants an explicit cast) and syntax error issues in rrd_client.c . These may
> be due to other setting/compiler differences between 2008 and 2013 but
> probably of out my hack and slash paygrade.
>  
> I went back to my last successful build (1.4.8) on win32, and it mostly
> built without too much issue (one small rrd_config.h touch, I think) on
> VS2008.  It also didn't have a build structured like above, so had less
> extra VS support file dependences. The 1.4.x tarballs all include the full
> complement of win32 files.
>  
> So, I think for one, the tarball dist needs to be looked at.  I will
> probably keep plodding through the compile attempt, but maybe others more
> versed can take a look and comment relative to a successful win32 build. 
>  
>  
>  
>   Sent: Monday, June 13, 2016 at 12:33 PM
> From: "Colin Franco" <[hidden email]>
> To: 'sholden' <[hidden email]>, [hidden email]
> Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows
> Perhaps my mail was unclear. At the point when I get that error I am also
> using C++. It is comforting to know that at least one other person has
> reached the same wall as me.
>
> Regards,
>
> Colin
>
> -----Original Message-----
> From: rrd-users
> [mailto:rrd-users-bounces+colin=[hidden email]] On
> Behalf Of sholden
> Sent: Monday, June 13, 2016 3:58 PM
> To: [hidden email]
> Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows
>
> Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for
> Windows and have gotten stuck at the error “don't know how to make
> './win32/librrd-4.def'”. Any help from those answering this question is
> appreciated (although I am trying to use C++ instead of PERL).
>
>
>
> --
> View this message in context:http://rrd-mailinglists.937164.n2.nabble.com/Compiling-RRDTool-1-6-0-and-RR
> Ds-pm-for-Windows-tp7583374p7583375.html
> Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

oetiker
Administrator
Hi Joe,

Today Joe Kane wrote:

> Tobi,
>  

> Thanks for your response.  Which system do iIsubmit a "PR' to?
> (sorry for my ignorance).  I'm not on GIT or SVN, I usually pull
> down a tarball from dist and then try to build.  As I noted, I am
> really at  hack and slash expertise level.  I have found a
> collection of issues realtive to this new make process, but my
> skills are not always up to par to come up with elegant compile
> switch or code handling or other solutions.

- first

* go to github.com
* create an account
* go to guthub.com/oetiker/rrdtool-1.x

- simple way:

* just press the little edit icon on top of any file you think
  needs changeing
* change the file
* github will then ask you if you want to create a PR from that

- advanced way:

* press the 'fork' button on the rrdtoool project in github

* git clone the fork to your local disk
* git checkout -b 'win32-fixes'
* edit
* git commit
* git push

* and then go to github and it will offer you to turn your push
  into a pull request
  
> I use RRDTOOL on both an old embedded linux system and windows. 
> So I tend to get fluent enough to get to a binary version common
> to both and then use for a (long) while, and then I forget....

 
> The new build flow with VS2013 and .def, .rc files etc is over my
> head.  The makefile seems like it can work with VS2008, but I am
> seeing lots of C99 issues(VS2013 is C99 compliant).  My VS2008 is
> at C89.

ok
tobi


> Sent: Thursday, August 18, 2016 at 10:19
> From: "Tobias Oetiker" <[hidden email]>
> To: "Joe Kane" <[hidden email]>
> Cc: "Colin Franco" <[hidden email]>, [hidden email]
> Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows
> Hi Joe,
>
> please make a PR from your findings, so that I can add these to the
> 1.6.1 release ... note that extra files to be included in the
> tarbal just have to be added in the Makefile.am EXTRA_DIST line
> that at the moment only includes 2 files from the win32 directory
>
> I have unfortunately to data not found anyone willing to finance
> good windows rrdtool packaging and stuff ... so all I do is
> integrate PRs I get from people who work on it ...
>
> cheers
> tobi
>
> Today Joe Kane wrote:
>
> > It looks like the tarball distribution for both the 1.5.x and 1.6.x releases
> > of RRDTOOL is missing several files from the WIN32 directory.  According to
> > the release notes, For 1.5.x and 1.6x the win32 build process was reworked,
> > and apparently has been configured with VS2013.  I hadn't previously tried
> > to build these branches (and I have VS2008).
> >  
> > For the error that you have noted, the compiler is complaining because files
> > referenced in the MAkefile.MSC(like *.def files, *.rc files etc for the dlls
> > and resources) are just missing from the win32 directory, as are the VS
> > project/solution (GUI build) files.  When I took a look at the 1.6.x
> > repository on GIT, those files are present.
> >  
> > So I grabbed the relevant files  from GIT /win32/ and tried to build for
> > 1.6.x.   The Gui build based VS files (rrd.sln etc) are written by VS2013
> > and VS2008 won't load them  (not backward compatible). So I tried to build
> > right from the Makefile.msc again.  It gets past this initial error (d"on't
> > know how to make rddtool-4.def"), but I had to make some some tweaks for
> > VS2008 versus VS2013 (Rc.exe in 2008 doesn't support the /nologo flag, this
> > was added after vs2008).
> >  
> > I have run into  compiler errors though and haven't sorted through them
> > all.  Some are clearly related to VS2013 assumption. For example, VS2008 is
> > not 'C99' compliant so doesn't include STDINT.h, (which is referenced in one
> > of the source files in 1.6.x).  I know that VS2013 is C99 compliant and so
> > has STDINT.h., but VS2008 does not.  I sorted this one out by sourcing
> > STDINT.h.
> >  
> > There are other uglier compile errors for coercion pointer issues (compiler
> > wants an explicit cast) and syntax error issues in rrd_client.c . These may
> > be due to other setting/compiler differences between 2008 and 2013 but
> > probably of out my hack and slash paygrade.
> >  
> > I went back to my last successful build (1.4.8) on win32, and it mostly
> > built without too much issue (one small rrd_config.h touch, I think) on
> > VS2008.  It also didn't have a build structured like above, so had less
> > extra VS support file dependences. The 1.4.x tarballs all include the full
> > complement of win32 files.
> >  
> > So, I think for one, the tarball dist needs to be looked at.  I will
> > probably keep plodding through the compile attempt, but maybe others more
> > versed can take a look and comment relative to a successful win32 build. 
> >  
> >  
> >  
> >   Sent: Monday, June 13, 2016 at 12:33 PM
> > From: "Colin Franco" <[hidden email]>
> > To: 'sholden' <[hidden email]>, [hidden email]
> > Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows
> > Perhaps my mail was unclear. At the point when I get that error I am also
> > using C++. It is comforting to know that at least one other person has
> > reached the same wall as me.
> >
> > Regards,
> >
> > Colin
> >
> > -----Original Message-----
> > From: rrd-users
> > [mailto:rrd-users-bounces+colin=[hidden email]] On
> > Behalf Of sholden
> > Sent: Monday, June 13, 2016 3:58 PM
> > To: [hidden email]
> > Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows
> >
> > Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for
> > Windows and have gotten stuck at the error “don't know how to make
> > './win32/librrd-4.def'”. Any help from those answering this question is
> > appreciated (although I am trying to use C++ instead of PERL).
> >
> >
> >
> > --
> > View this message in context:http://rrd-mailinglists.937164.n2.nabble.com/Compiling-RRDTool-1-6-0-and-RR
> > Ds-pm-for-Windows-tp7583374p7583375.html
> > Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > rrd-users mailing list
> > [hidden email]
> > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> >
> > _______________________________________________
> > rrd-users mailing list
> > [hidden email]
> > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> >
> >
>
> --
> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
> www.oetiker.ch [hidden email] +41 62 775 9902
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch [hidden email] +41 62 775 9902
_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin Franco
In reply to this post by Joe Kane

Hi Joe and Tobi,

 

Thank you for your in depth engagement and effective confirmation that despite any/many mistakes I made with my compile efforts the deck was stacked against my feeble c and perl skills. As a result of my efforts back in June I have VS2015 environment in place and, of course, some interest in achieving a successful compile against latest perl and VS releases.

 

What can I do to help?

 

Regards,

 

Colin

 

From: Joe Kane [mailto:[hidden email]]
Sent: Thursday, August 18, 2016 2:53 PM
To: Colin Franco
Cc: 'sholden'; [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

 

It looks like the tarball distribution for both the 1.5.x and 1.6.x releases of RRDTOOL is missing several files from the WIN32 directory.  According to the release notes, For 1.5.x and 1.6x the win32 build process was reworked, and apparently has been configured with VS2013.  I hadn't previously tried to build these branches (and I have VS2008).

 

For the error that you have noted, the compiler is complaining because files referenced in the MAkefile.MSC(like *.def files, *.rc files etc for the dlls and resources) are just missing from the win32 directory, as are the VS project/solution (GUI build) files.  When I took a look at the 1.6.x repository on GIT, those files are present.

 

So I grabbed the relevant files  from GIT /win32/ and tried to build for 1.6.x.   The Gui build based VS files (rrd.sln etc) are written by VS2013 and VS2008 won't load them  (not backward compatible). So I tried to build right from the Makefile.msc again.  It gets past this initial error (d"on't know how to make rddtool-4.def"), but I had to make some some tweaks for VS2008 versus VS2013 (Rc.exe in 2008 doesn't support the /nologo flag, this was added after vs2008).

 

I have run into  compiler errors though and haven't sorted through them all.  Some are clearly related to VS2013 assumption. For example, VS2008 is not 'C99' compliant so doesn't include STDINT.h, (which is referenced in one of the source files in 1.6.x).  I know that VS2013 is C99 compliant and so has STDINT.h., but VS2008 does not.  I sorted this one out by sourcing STDINT.h.

 

There are other uglier compile errors for coercion pointer issues (compiler wants an explicit cast) and syntax error issues in rrd_client.c . These may be due to other setting/compiler differences between 2008 and 2013 but probably of out my hack and slash paygrade.

 

I went back to my last successful build (1.4.8) on win32, and it mostly built without too much issue (one small rrd_config.h touch, I think) on VS2008.  It also didn't have a build structured like above, so had less extra VS support file dependences. The 1.4.x tarballs all include the full complement of win32 files.

 

So, I think for one, the tarball dist needs to be looked at.  I will probably keep plodding through the compile attempt, but maybe others more versed can take a look and comment relative to a successful win32 build. 

 

 

 

 

Sent: Monday, June 13, 2016 at 12:33 PM
From: "Colin Franco" <[hidden email]>
To: 'sholden' <[hidden email]>, [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Perhaps my mail was unclear. At the point when I get that error I am also using C++. It is comforting to know that at least one other person has reached the same wall as me.

Regards,

Colin

-----Original Message-----
From: rrd-users [[hidden email]] On Behalf Of sholden
Sent: Monday, June 13, 2016 3:58 PM
To: [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for Windows and have gotten stuck at the error “don't know how to make './win32/librrd-4.def'”. Any help from those answering this question is appreciated (although I am trying to use C++ instead of PERL).



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Compiling-RRDTool-1-6-0-and-RRDs-pm-for-Windows-tp7583374p7583375.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

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

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


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Joe Kane
Colin,
 
I'll see your 'feeble C skills' and raise you one.  I don't use it very often these days and when I did it was nowhere at this level. Some intensive googling with the errors got me going.
 
With the latest VS2015, you are probably in better shape than me (at VS2008).  You might actually try to build from the (VS2013 generated) rrd.sln files etc and/or the makefile, once you pull the right files down. In talking with Tobi, I think I get how to get them adding back to the tarball.
 
For me, the VS2013 build files aren't back-compatible (some tools may exist to back port them, but I dont know). So I am working from the Makefile.msc, but lots of errors presently.  Doing some digging, I see that I have the following dilemna.
 
RRDTOOl 1.4.x and lower would compile with VS2008 (yes, I had some patches/win32 compile files etc, where relevant I sent those back in), but  1.5.x and 1.6.x will not (yet) for me. 
 
Seeing some of the more serious errors like "can't convert void * to char * without explicit cast" rang a bell. Looking at the Makefile, I see its specifying /TP (compile in c plus plus mode). I thought that was curious and (I think) I've always compiled with /TC.    VS uses same compiler for C and CPP.   CPP mode won't let you do the above (coerce void * to char *), but C mode will.  Changing compile option to /TC gets past those errors, but exploded the error list for another issue.  VS2008 C compiler is C89 compliant.  VS2013 compiler is C99 compliant.  C89 won't allow variable declarations in line with code.  All var declares have to be at top of functions.  Ah, but CPP mode in VS2008 WILL allow inline var declares. (and maybe thats why someone engaged /TP switch).  But, it still seems to me that compile on vs2013 would choke on the coerce (unless thats another change n vs2013 and up).
 
So its much more common place now in other langauges to do inline var declares as you need them. I don't know what standard practices are for C these days in this regard.  And C99 is min the standard for the rest of the world, so I know this is also a MSVS induced issue.   For kicks, and to see if it would compile,  I started to patch the 1.6.x source to move the var declares up to tops of functions. In a couple of files this is trivial, but I have hit other files (like rrd_create.c) that have received a major overhaul since 1.4.8, and have many many many inline vars, where their previous versions had none.  So maybe thats just a code style change for the times. 
 
Maybe Tobi can comment.
 
For a long story, I was trying preserve VS2008 compatibility (and I know some others who use it too). But I guess that begs the question on whether that constraint is valid, or inline var declares should be considered the norm.  In which case, I'm stuck back to CPP mode, but need to address the pointer casts (probably above my grade).
 
Apologies if I have any of the above incorrect, this is just my present understanding.
 
 
Sent: Thursday, August 18, 2016 at 3:18 PM
From: "Colin Franco" <[hidden email]>
To: "'Joe Kane'" <[hidden email]>
Cc: 'sholden' <[hidden email]>, [hidden email]
Subject: RE: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Hi Joe and Tobi,

 

Thank you for your in depth engagement and effective confirmation that despite any/many mistakes I made with my compile efforts the deck was stacked against my feeble c and perl skills. As a result of my efforts back in June I have VS2015 environment in place and, of course, some interest in achieving a successful compile against latest perl and VS releases.

 

What can I do to help?

 

Regards,

 

Colin

 

From: Joe Kane [mailto:[hidden email]]
Sent: Thursday, August 18, 2016 2:53 PM
To: Colin Franco
Cc: 'sholden'; [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

 

It looks like the tarball distribution for both the 1.5.x and 1.6.x releases of RRDTOOL is missing several files from the WIN32 directory.  According to the release notes, For 1.5.x and 1.6x the win32 build process was reworked, and apparently has been configured with VS2013.  I hadn't previously tried to build these branches (and I have VS2008).

 

For the error that you have noted, the compiler is complaining because files referenced in the MAkefile.MSC(like *.def files, *.rc files etc for the dlls and resources) are just missing from the win32 directory, as are the VS project/solution (GUI build) files.  When I took a look at the 1.6.x repository on GIT, those files are present.

 

So I grabbed the relevant files  from GIT /win32/ and tried to build for 1.6.x.   The Gui build based VS files (rrd.sln etc) are written by VS2013 and VS2008 won't load them  (not backward compatible). So I tried to build right from the Makefile.msc again.  It gets past this initial error (d"on't know how to make rddtool-4.def"), but I had to make some some tweaks for VS2008 versus VS2013 (Rc.exe in 2008 doesn't support the /nologo flag, this was added after vs2008).

 

I have run into  compiler errors though and haven't sorted through them all.  Some are clearly related to VS2013 assumption. For example, VS2008 is not 'C99' compliant so doesn't include STDINT.h, (which is referenced in one of the source files in 1.6.x).  I know that VS2013 is C99 compliant and so has STDINT.h., but VS2008 does not.  I sorted this one out by sourcing STDINT.h.

 

There are other uglier compile errors for coercion pointer issues (compiler wants an explicit cast) and syntax error issues in rrd_client.c . These may be due to other setting/compiler differences between 2008 and 2013 but probably of out my hack and slash paygrade.

 

I went back to my last successful build (1.4.8) on win32, and it mostly built without too much issue (one small rrd_config.h touch, I think) on VS2008.  It also didn't have a build structured like above, so had less extra VS support file dependences. The 1.4.x tarballs all include the full complement of win32 files.

 

So, I think for one, the tarball dist needs to be looked at.  I will probably keep plodding through the compile attempt, but maybe others more versed can take a look and comment relative to a successful win32 build. 

 

 

 

 

Sent: Monday, June 13, 2016 at 12:33 PM
From: "Colin Franco" <[hidden email]>
To: 'sholden' <[hidden email]>, [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Perhaps my mail was unclear. At the point when I get that error I am also using C++. It is comforting to know that at least one other person has reached the same wall as me.

Regards,

Colin

-----Original Message-----
From: rrd-users [mailto:rrd-users-bounces+colin=[hidden email]] On Behalf Of sholden
Sent: Monday, June 13, 2016 3:58 PM
To: [hidden email]
Subject: Re: [rrd-users] Compiling RRDTool 1.6.0 and RRDs.pm for Windows

Colin, thanks for asking. I am also trying to compile the RRDTool 1.6.0 for Windows and have gotten stuck at the error “don't know how to make './win32/librrd-4.def'”. Any help from those answering this question is appreciated (although I am trying to use C++ instead of PERL).



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Compiling-RRDTool-1-6-0-and-RRDs-pm-for-Windows-tp7583374p7583375.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.

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

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


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

montor size of dir

martin-2
In reply to this post by Colin Franco
Heelo all

if i run `du -sm /path/to/dir// |sed -e s/". "//g|awk '{$1=$1 ;printf  $1}'

i get the size of that directory in mb all good
but how do i go about and create a rrd file i know how to create one for
tempereature but i dont think that would work here :)

should i use COUNTER or ?
anyone sitting on a finnished size counter ?
best regards Martin


---
Detta e-postmeddelande har sökts igenom efter virus med antivirusprogram från Avast.
https://www.avast.com/antivirus

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: montor size of dir

Simon Hobson
Martin Friberg <[hidden email]> wrote:

> if i run `du -sm /path/to/dir// |sed -e s/". "//g|awk '{$1=$1 ;printf  $1}'
>
> i get the size of that directory in mb all good
> but how do i go about and create a rrd file i know how to create one for tempereature but i dont think that would work here :)
>
> should i use COUNTER or ?

Same as for temperature - use absolute.


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: montor size of dir

martin-2
ok i use GAUGE for temp mayby wrong?

anyhow i created the .rrd with this script
---------------------------------------------------------------------------------------------------------------
#!/bin/bash
# Script to create rrd-file


directory="/home/rrddata/"
filename="data.rrd"

# Check i file already exists
if [ ! -f "$directory$filename" ]
then
         # File doesn't exist, create new rrd-file
         echo "Creating RRDtool DB"
         rrdtool create $directory$filename \
                  --step 300 \
                 DS:kallstroms:ABSOLUTE:300:U:U \
             RRA:AVERAGE:0.5:1:10
echo "Done!"
else
         echo $directory$filename" already exists, delete it first."
fi

----------------------------------------------------------------------------------------------------------------
and i update it with this script
----------------------------------------------------------------------------------------------------------------
#!/bin/bash

RRDD="/home/rrddata/data.rrd"

CC=`du -sm /home/backups/Fredrik-Server/current/ |sed -e s/". "//g|awk
'{$1=$1 ;printf  $1}'`

rrdtool update $RRDD N:$CC

echo "$CC"
----------------------------------------------------------------------------------------------------------------

now i get a correct value 3377

but the image looks like this
http://sv.tinypic.com/r/s6olmo/9

iam obviously doing something wrong any pointers would be helpfull

Best regards Martin

Den 2016-09-19 kl. 10:22, skrev Simon Hobson:

> Martin Friberg <[hidden email]> wrote:
>
>> if i run `du -sm /path/to/dir// |sed -e s/". "//g|awk '{$1=$1 ;printf  $1}'
>>
>> i get the size of that directory in mb all good
>> but how do i go about and create a rrd file i know how to create one for tempereature but i dont think that would work here :)
>>
>> should i use COUNTER or ?
>
> Same as for temperature - use absolute.
>
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>

---
Detta e-postmeddelande har sökts igenom efter virus med antivirusprogram från Avast.
https://www.avast.com/antivirus

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: montor size of dir

Simon Hobson

On 19 Sep 2016, at 16:24, Martin Friberg <[hidden email]> wrote:

> ok i use GAUGE for temp mayby wrong?

Sorry, my mistake - gauge is correct.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: montor size of dir

martin-2
Something wierd is going on been running the script for almost 9 days now.

And it seems like the rrd reset itself every 24H when i dump the rrd to
xml it also only shows the last 24 hours no errors or warnings it just
resets?

anyone got a clue on what to look at ?
cheers

---
Detta e-postmeddelande har sökts igenom efter virus med antivirusprogram från Avast.
https://www.avast.com/antivirus

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: montor size of dir

Wiest, Damian
Your RRA only allocates 10 buckets and a bucket gets filled every 300
seconds which gives you 50 minutes of history.

rrdtool create $directory$filename -step 300 \
DS:kallstroms:ABSOLUTE:300:U:U \
RRA:AVERAGE:0.5:1:10

You have created an RRD that expects updates every 300 seconds along
with a data source with a 300 second heartbeat and no min/max range
has been provided.  You may want to increase your heartbeat so that
you don't get so many unknown values if updates arrive a second late.
Read the "The HEARTBEAT and the STEP" section of the rrdcreate
documentation.

http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html

You have then declared a round-robin archive that computes the average
of 1 primary data points with an xfiles factor of 0.5 and retain 10
rows of data.

"The format of RRA line for these consolidation functions is:
RRA:{AVERAGE | MIN | MAX | LAST}:xff:steps:rows"

If you really want to compute an average, then provide more than just
one PDP, otherwise use LAST as your consolidation function.  You will
then want to adjust the number of rows you keep to however much
history you want to store.

-Damian



On Tue, Sep 27, 2016 at 2:01 PM, Martin Friberg <[hidden email]> wrote:

> Something wierd is going on been running the script for almost 9 days now.
>
> And it seems like the rrd reset itself every 24H when i dump the rrd to xml
> it also only shows the last 24 hours no errors or warnings it just resets?
>
> anyone got a clue on what to look at ?
> cheers
>
> ---
> Detta e-postmeddelande har sökts igenom efter virus med antivirusprogram
> från Avast.
> https://www.avast.com/antivirus
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

--


Confidentiality Notice: This e-mail transmission may contain confidential
or legally privileged information that is intended only for the individual
or entity named in the e-mail address. If you have received this
communication in error, please notify me by return e-mail, and destroy this
communication and all copies thereof, including any attachments.

Apervita ® is a registered trademark of Apervita Inc.

 

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