Orion98MC / node_rrd

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

npm install fails, nan changed? #11

Closed larsenglund closed 8 years ago

larsenglund commented 8 years ago

When installing on a new system i get this:

In file included from ../src/node_rrd_create.cc:27:0:
../src/node_rrd.h:56:5: error: ‘NanCallback’ does not name a type
../src/node_rrd.h: In destructor ‘node_rrd::AsyncInfos::~AsyncInfos()’:
../src/node_rrd.h:58:28: error: ‘callback’ was not declared in this scope
../src/node_rrd_create.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_rrd::create(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/node_rrd_create.cc:54:14: error: ‘NanScope’ was not declared in this scope
../src/node_rrd_create.cc:56:5: error: ‘args’ was not declared in this scope
../src/node_rrd_create.cc:56:5: error: ‘NanThrowTypeError’ was not declared in this scope
../src/node_rrd_create.cc:56:5: error: return-statement with a value, in function returning 'void' [-fpermissive]
../src/node_rrd_create.cc:59:5: error: declaration of ‘node_rrd::{anonymous}::Infos* info’ shadows a parameter
../src/node_rrd_create.cc:62:5: error: ‘args’ was not declared in this scope
../src/node_rrd_create.cc:74:5: error: ‘class node_rrd::{anonymous}::Infos’ has no member named ‘callback’
../src/node_rrd_create.cc:74:5: error: expected type-specifier before ‘NanCallback’
../src/node_rrd_create.cc:74:5: error: expected ‘;’ before ‘NanCallback’
../src/node_rrd_create.cc:78:24: error: ‘NanReturnUndefined’ was not declared in this scope
../src/node_rrd_create.cc: In function ‘void node_rrd::async_after(uv_work_t*)’:
../src/node_rrd_create.cc:94:14: error: ‘NanScope’ was not declared in this scope
../src/node_rrd_create.cc:98:37: error: ‘NanNull’ was not declared in this scope
../src/node_rrd_create.cc:99:36: error: ‘NanNew’ was not declared in this scope
../src/node_rrd_create.cc:99:49: error: expected primary-expression before ‘>’ token
../src/node_rrd_create.cc:100:11: error: ‘class node_rrd::{anonymous}::Infos’ has no member named ‘callback’
rrd_bindings.target.mk:90: recipe for target 'Release/obj.target/rrd_bindings/src/node_rrd_create.o' failed
make: *** [Release/obj.target/rrd_bindings/src/node_rrd_create.o] Error 1

node is v0.12.6 nan is v2.0.8

Any thoughts?

djkeeg commented 8 years ago

node_rrd breaks with the release of nan version 2. I know that version 1.8 works, but I am not sure about 1.9.

In package.json

"nan": "*"

can be replaced with

"nan": "1.8.x"
larsenglund commented 8 years ago

That worked like a charm, thanks!

Orion98MC commented 8 years ago

You guys rock! I just picked up the thread this morning and ... it's closed. Amazing +1 djkeeg ;)

Orion98MC commented 8 years ago

By the way I'll be willing to accept patches for nan 2.x compatibility, maybe in a separate branch ... Anyone ?

tdjordan commented 8 years ago

Thierry, I am currently in the process of making this nan 2.x compatible. Hopefully will have something soon.

Orion98MC commented 8 years ago

Hi @tdjordan, That's great news! Keep up :)