getdnsapi/getdns-node

Difficulty installing

Closed this issue · 3 comments

Having difficulty installing this. Any ideas?

mike@blob:~/meteor/dns2$ npm install getdns

> getdns@0.3.1 install /home/mike/meteor/dns2/node_modules/getdns
> node-gyp rebuild

make: Entering directory '/home/mike/meteor/dns2/node_modules/getdns/build'
  CXX(target) Release/obj.target/getdns/src/GNContext.o
In file included from ../src/GNContext.h:32:0,
                 from ../src/GNContext.cpp:28:
../../nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                           ^
../../nan/nan.h:319:17: note: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here
   v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                 ^
../../nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                           ^
../../nan/nan.h:334:27: note: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                           ^
../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:768:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h:768:67: note: candidates are:
In file included from ../../nan/nan.h:25:0,
                 from ../src/GNContext.h:32,
                 from ../src/GNContext.cpp:28:
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/GNContext.h:32:0,
                 from ../src/GNContext.cpp:28:
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../src/GNContext.cpp: In static member function ‘static void GNContext::Callback(getdns_context*, getdns_callback_type_t, getdns_dict*, void*, getdns_transaction_t)’:
../src/GNContext.cpp:456:39: warning: ‘void node::FatalException(const v8::TryCatch&)’ is deprecated (declared at /home/mike/.node-gyp/5.0.0/include/node/node.h:282): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
         node::FatalException(try_catch);
                                       ^
getdns.target.mk:92: recipe for target 'Release/obj.target/getdns/src/GNContext.o' failed
make: *** [Release/obj.target/getdns/src/GNContext.o] Error 1
make: Leaving directory '/home/mike/meteor/dns2/node_modules/getdns/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/mike/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/home/mike/.nvm/versions/node/v5.0.0/bin/node" "/home/mike/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mike/meteor/dns2/node_modules/getdns
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN EPACKAGEJSON dns2@1.0.0 No description
npm WARN EPACKAGEJSON dns2@1.0.0 No repository field.
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/mike/.nvm/versions/node/v5.0.0/bin/node" "/home/mike/.nvm/versions/node/v5.0.0/bin/npm" "install" "getdns"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! code ELIFECYCLE

npm ERR! getdns@0.3.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the getdns@0.3.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the getdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls getdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mike/meteor/dns2/npm-debug.log
mike@blob:~/meteor/dns2$ 

Right now the bindings need to be updated to support node 4+. There is an
outstanding issue on github regarding this.

On Sun, Nov 1, 2015, 1:11 AM Mike Cardwell notifications@github.com wrote:

Having difficulty installing this. Any ideas?

mike@blob:~/meteor/dns2$ npm install getdns

getdns@0.3.1 install /home/mike/meteor/dns2/node_modules/getdns
node-gyp rebuild

make: Entering directory '/home/mike/meteor/dns2/node_modules/getdns/build'
CXX(target) Release/obj.target/getdns/src/GNContext.o
In file included from ../src/GNContext.h:32:0,
from ../src/GNContext.cpp:28:
../../nan/nan.h:324:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local&)’
NAN_INLINE v8::Local NanEnsureHandleOrPersistent(const v8::Local &val) {
^
../../nan/nan.h:319:17: note: ‘template v8::Handle Nan::imp::NanEnsureHandleOrPersistent(v8::Handle&)’ previously declared here
v8::Handle NanEnsureHandleOrPersistent(const v8::Handle &val) {
^
../../nan/nan.h:344:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureLocal(v8::Handle&)’
NAN_INLINE v8::Local NanEnsureLocal(const v8::Handle &val) {
^
../../nan/nan.h:334:27: note: ‘template v8::Local Nan::imp::NanEnsureLocal(const v8::Local&)’ previously declared here
NAN_INLINE v8::Local NanEnsureLocal(const v8::Local &val) {
^
../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char_, size_t, int)’:
../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char_, uint32_t)’:
../../nan/nan.h:768:67: error: call of overloaded ‘New(v8::Isolate_, const char_&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../nan/nan.h:768:67: note: candidates are:
In file included from ../../nan/nan.h:25:0,
from ../src/GNContext.h:32,
from ../src/GNContext.cpp:28:
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, v8::Localv8::String, node::encoding)
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate_ isolate,
^
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, char_, size_t)
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/home/mike/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char_’ to ‘char_’
In file included from ../src/GNContext.h:32:0,
from ../src/GNContext.cpp:28:
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char_, uint32_t)’:
../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../src/GNContext.cpp: In static member function ‘static void GNContext::Callback(getdns_context_, getdns_callback_type_t, getdns_dict_, void_, getdns_transaction_t)’:
../src/GNContext.cpp:456:39: warning: ‘void node::FatalException(const v8::TryCatch&)’ is deprecated (declared at /home/mike/.node-gyp/5.0.0/include/node/node.h:282): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
node::FatalException(try_catch);
^getdns.target.mk:92: recipe for target 'Release/obj.target/getdns/src/GNContext.o' failed
make: *** [Release/obj.target/getdns/src/GNContext.o] Error 1
make: Leaving directory '/home/mike/meteor/dns2/node_modules/getdns/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/mike/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/home/mike/.nvm/versions/node/v5.0.0/bin/node" "/home/mike/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/mike/meteor/dns2/node_modules/getdns
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN EPACKAGEJSON dns2@1.0.0 No description
npm WARN EPACKAGEJSON dns2@1.0.0 No repository field.
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/mike/.nvm/versions/node/v5.0.0/bin/node" "/home/mike/.nvm/versions/node/v5.0.0/bin/npm" "install" "getdns"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE

npm ERR! getdns@0.3.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the getdns@0.3.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the getdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls getdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/mike/meteor/dns2/npm-debug.log
mike@blob:~/meteor/dns2$


Reply to this email directly or view it on GitHub
#5.

@ngoyal, @mikecardwell: could you guys have a look at #6 and see if it works for you?

With tests passing locally since #6 and on Travis since #12, I'm closing this.