Orion98MC / node_rrd

A node.js native binding for RRDtool (node rrd)
97 stars 25 forks source link

node_rrd on windows #4

Open larsenglund opened 11 years ago

larsenglund commented 11 years ago

Hi!

I have built node_rrd on windows (7 32bit) but when I try to run an app that uses it I get this:

C:\node\hus\node_modules\rrd\node_modules\bindings\bindings.js:83
        throw e
              ^
Error: The specified module could not be found.
C:\node\hus\node_modules\rrd\build\Release\rrd_bindings.node
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at bindings (C:\node\hus\node_modules\rrd\node_modules\bindings\bindings.js:
76:44)
    at Object.<anonymous> (C:\node\hus\node_modules\rrd\lib\rrd.js:27:35)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Any thoughts on how to solve this? I will paste my code and the output from the build and node list below.

code:

var rrd = require('rrd');
var filename = __dirname + '/test.rrd';
var now = Math.ceil((new Date).getTime() / 1000);

rrd.create(filename, 60, now, ["DS:busy:GAUGE:120:0:U", "RRA:LAST:0.5:1:60"], function (error) { 
    if (error) console.log("Error:", error);
    rrd.info(filename, function (info) {
        console.log(info.filename, info.rrd_version);
    }); 
});

build:

c:\node\hus>npm install C:\Users\Administrator\Documents\GitHub\node_rrd --msvs_
version=2012 --save
npm WARN package.json HUS@0.0.1 No repository field.
npm WARN package.json HUS@0.0.1 No README data
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/arguee
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/arguee

> rrd@0.0.5 install c:\node\hus\node_modules\rrd
> node-gyp rebuild

c:\node\hus\node_modules\rrd>node "C:\Program Files\nodejs\node_modules\npm\bin\
node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  node_rrd_info.cc
  node_rrd.cc
C:\Users\Administrator\.node-gyp\0.10.16\deps\v8\include\v8.h(218): warning C45
06: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New
(v8::Handle<T>)' [c:\node\hus\node_modules\rrd\build\rrd_bindings.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_rrd.cc)
C:\Users\Administrator\.node-gyp\0.10.16\deps\v8\include\v8.h(179): warning C45
06: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New
(v8::Handle<T>)' [c:\node\hus\node_modules\rrd\build\rrd_bindings.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_rrd_info.cc)
  node_rrd_update.cc
  node_rrd_create.cc
C:\Users\Administrator\.node-gyp\0.10.16\deps\v8\include\v8.h(184): warning C45
06: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New
(v8::Handle<T>)' [c:\node\hus\node_modules\rrd\build\rrd_bindings.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_rrd_update.cc)
C:\Users\Administrator\.node-gyp\0.10.16\deps\v8\include\v8.h(184): warning C45
06: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New
(v8::Handle<T>)' [c:\node\hus\node_modules\rrd\build\rrd_bindings.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_rrd_create.cc)
  node_rrd_last.cc
  node_rrd_fetch.cc
..\src\node_rrd_last.cc(73): warning C4244: 'argument' : conversion from 'time_
t' to 'double', possible loss of data [c:\node\hus\node_modules\rrd\build\rrd_b
indings.vcxproj]
..\src\node_rrd_fetch.cc(113): warning C4244: '=' : conversion from 'time_t' to
 'long', possible loss of data [c:\node\hus\node_modules\rrd\build\rrd_bindings
.vcxproj]
C:\Users\Administrator\.node-gyp\0.10.16\deps\v8\include\v8.h(179): warning C45
06: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New
(v8::Handle<T>)' [c:\node\hus\node_modules\rrd\build\rrd_bindings.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_rrd_last.cc)
C:\Users\Administrator\.node-gyp\0.10.16\deps\v8\include\v8.h(179): warning C45
06: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New
(v8::Handle<T>)' [c:\node\hus\node_modules\rrd\build\rrd_bindings.vcxproj]
          with
          [
              T=v8::Object
          ] (..\src\node_rrd_fetch.cc)
     Creating library c:\node\hus\node_modules\rrd\build\Release\rrd_bindings.l
  ib and object c:\node\hus\node_modules\rrd\build\Release\rrd_bindings.exp
  Generating code
  Finished generating code
  rrd_bindings.vcxproj -> c:\node\hus\node_modules\rrd\build\Release\\rrd_bindi
  ngs.node
rrd@0.0.5 node_modules\rrd
├── bindings@1.1.1
└── arguee@0.0.2

node list:

C:\node\hus>npm list
HUS@0.0.1 C:\node\hus
├─┬ express@3.3.5
│ ├── buffer-crc32@0.2.1
│ ├─┬ commander@1.2.0
│ │ └── keypress@0.1.0
│ ├─┬ connect@2.8.5
│ │ ├── bytes@0.2.0
│ │ ├── formidable@1.0.14
│ │ ├── pause@0.0.1
│ │ ├── qs@0.6.5
│ │ └── uid2@0.0.2
│ ├── cookie@0.1.0
│ ├── cookie-signature@1.0.1
│ ├── debug@0.7.2
│ ├── fresh@0.2.0
│ ├── methods@0.0.1
│ ├── mkdirp@0.3.5
│ ├── range-parser@0.0.4
│ └─┬ send@0.1.4
│   └── mime@1.2.11
├─┬ jade@0.34.1
│ ├── character-parser@1.0.2
│ ├─┬ commander@1.3.2
│ │ └── keypress@0.1.0
│ ├─┬ constantinople@1.0.1
│ │ └─┬ uglify-js@2.3.6
│ │   ├── async@0.2.9
│ │   ├─┬ optimist@0.3.7
│ │   │ └── wordwrap@0.0.2
│ │   └─┬ source-map@0.1.28
│ │     └── amdefine@0.0.8
│ ├── mkdirp@0.3.5
│ ├─┬ monocle@0.1.50
│ │ └─┬ readdirp@0.2.5
│ │   └─┬ minimatch@0.2.12
│ │     ├── lru-cache@2.3.0
│ │     └── sigmund@1.0.0
│ ├─┬ transformers@2.1.0
│ │ ├─┬ css@1.0.8
│ │ │ ├── css-parse@1.0.4
│ │ │ └── css-stringify@1.0.5
│ │ ├─┬ promise@2.0.0
│ │ │ └── is-promise@1.0.0
│ │ └─┬ uglify-js@2.2.5
│ │   ├─┬ optimist@0.3.7
│ │   │ └── wordwrap@0.0.2
│ │   └─┬ source-map@0.1.28
│ │     └── amdefine@0.0.8
│ └─┬ with@1.1.0
│   └─┬ uglify-js@2.3.6
│     ├── async@0.2.9
│     ├─┬ optimist@0.3.7
│     │ └── wordwrap@0.0.2
│     └─┬ source-map@0.1.28
│       └── amdefine@0.0.8
├─┬ rrd@0.0.5
│ ├── arguee@0.0.2
│ └── bindings@1.1.1
├─┬ serialport@1.1.3
│ ├── async@0.1.18
│ ├── bindings@1.1.0
│ ├─┬ optimist@0.3.7
│ │ └── wordwrap@0.0.2
│ └── sf@0.1.6
└─┬ socket.io@0.9.16
  ├── base64id@0.1.0
  ├── policyfile@0.0.4
  ├── redis@0.7.3
  └─┬ socket.io-client@0.9.16
    ├─┬ active-x-obfuscator@0.0.1
    │ └── zeparser@0.0.5
    ├── uglify-js@1.2.5
    ├─┬ ws@0.4.28
    │ ├── commander@0.6.1
    │ ├── options@0.0.5
    │ └── tinycolor@0.0.1
    └── xmlhttprequest@1.4.2
Orion98MC commented 11 years ago

Hey! Lars?

Well since I don't know anything about development in Windows environment, I'm afraid I can't help you much on this but I will try on the ubuntu issue, it may be related, so let's meet there...