andrewrk / node-groove

bindings to libgroove - music player backend library
MIT License
157 stars 16 forks source link

npm run build error #30

Closed matiazzz closed 8 years ago

matiazzz commented 8 years ago

I have this problem when trying to build groovebasin

matias@matias-net:~/groovebasin/groovebasin$ npm run build

groovebasin@1.5.1 build /home/matias/groovebasin/groovebasin npm install && ./build

groove@2.3.4 install /home/matias/groovebasin/groovebasin/node_modules/groove node-gyp rebuild

make: Entering directory '/home/matias/groovebasin/groovebasin/node_modules/groove/build' CXX(target) Release/obj.target/groove/src/groove.o In file included from ../src/groove.cc:2:0: ../../nan/nan.h:261:25: error: redefinition of ‘template v8::Local _NanEnsureLocal(v8::Local)’ NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../../nan/nan.h:256:25: note: ‘template v8::Local _NanEnsureLocal(v8::Handle)’ previously declared here NAN_INLINE v8::Local NanEnsureLocal(v8::Handle val) { ^ ../../nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../../nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’ , node::smalloc::FreeCallback callback ^ ../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char, sizet, int)’: ../../nan/nan.h:665:50: error: ‘callback’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h:665: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, uint32t)’: ../../nan/nan.h:672:67: error: no matching function for call to ‘New(v8::Isolate, const char_&, uint32_t&)’ return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ In file included from ../../nan/nan.h:25:0, from ../src/groove.cc:2: /usr/include/nodejs/src/nodebuffer.h:31:40: note: candidate: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, v8::Localv8::String, node::encoding) NODEEXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, ^ /usr/include/nodejs/src/node_buffer.h:31:40: note: conversion of argument 3 would be ill-formed: In file included from ../src/groove.cc:2:0: ../../nan/nan.h:672:67: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive] return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ In file included from ../../nan/nan.h:25:0, from ../src/groove.cc:2: /usr/include/nodejs/src/nodebuffer.h:43:40: note: candidate: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, char_, size_t) NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, ^ /usr/include/nodejs/src/nodebuffer.h:43:40: note: conversion of argument 2 would be ill-formed: In file included from ../src/groove.cc:2:0: ../../nan/nan.h:672:67: error: invalid conversion from ‘const char’ to ‘char_’ [-fpermissive] return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ ../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32t)’: ../../nan/nan.h:676:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), 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, uint32t)’: ../../nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’ return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ^ groove.target.mk:97: recipe for target 'Release/obj.target/groove/src/groove.o' failed make: ** [Release/obj.target/groove/src/groove.o] Error 1 make: Leaving directory '/home/matias/groovebasin/groovebasin/node_modules/groove/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:269: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 4.4.0-21-generic gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/matias/groovebasin/groovebasin/node_modules/groove gyp ERR! node -v v4.2.6 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN groovebasin@1.5.1 No license field. npm ERR! Linux 4.4.0-21-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE

npm ERR! groove@2.3.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the groove@2.3.4 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the groove 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 information on how to open an issue for this project with: npm ERR! npm bugs groove npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls groove npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/matias/groovebasin/groovebasin/npm-debug.log

npm ERR! Linux 4.4.0-21-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! groovebasin@1.5.1 build: npm install && ./build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the groovebasin@1.5.1 build script 'npm install && ./build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the groovebasin package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm install && ./build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs groovebasin npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls groovebasin npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/matias/groovebasin/groovebasin/npm-debug.log

I have these packages instaled:

matias@matias-net:~/groovebasin/groovebasin$ dpkg -l | grep groove ii libgroove-dev:i386 4.3.0-2 i386 audio dispatching library (development files) ii libgroove4:i386 4.3.0-2 i386 music player backend ii libgroovefingerprinter-dev:i386 4.3.0-2 i386 acoustid fingerprinter sink for libgroove (development files) ii libgroovefingerprinter4:i386 4.3.0-2 i386 acoustid fingerprinter for libgroove ii libgrooveloudness-dev:i386 4.3.0-2 i386 loudness scanner sink for libgroove (development files) ii libgrooveloudness4:i386 4.3.0-2 i386 loudness scanner for libgroove ii libgrooveplayer-dev:i386 4.3.0-2 i386 audio device playback sink for libgroove (development files) ii libgrooveplayer4:i386 4.3.0-2 i386 hardware audio playback for libgroove

matiazzz commented 8 years ago

I was using node v4.2.6 instead of v0.10.36 as says the readme. Now works fine.