TooTallNate / node-ogg

Node.js native binding to libogg
MIT License
65 stars 36 forks source link

Installation via npm fails #11

Closed jangxx closed 8 years ago

jangxx commented 8 years ago

I can't install this via npm, unfortunately. npm output is below.

Node version: v4.0.0 npm version: 2.14.2

> ogg@1.2.1 install /home/jan/Development/nodejs/node-wwriff/node_modules/ogg
> node-gyp rebuild

make: Entering directory `/home/jan/Development/nodejs/node-wwriff/node_modules/ogg/build'
  CC(target) Release/obj.target/libogg/deps/libogg/src/framing.o
  CC(target) Release/obj.target/libogg/deps/libogg/src/bitwise.o
  AR(target) Release/obj.target/deps/libogg/ogg.a
  COPY Release/ogg.a
  CXX(target) Release/obj.target/ogg/src/binding.o
In file included from ../src/binding.cc:23:0:
../node_modules/nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../node_modules/nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h:672:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/binding.cc:23:
/home/jan/.node-gyp/4.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/jan/.node-gyp/4.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/jan/.node-gyp/4.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/jan/.node-gyp/4.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/binding.cc:23:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:676: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);
                                                             ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
In file included from ../src/binding.cc:27:0:
../src/node_pointer.h: In function ‘v8::Handle<v8::Value> WrapPointer(void*, size_t)’:
../src/node_pointer.h:24:76: error: no matching function for call to ‘NanNewBufferHandle(char*, size_t&, void (&)(char*, void*), void*&)’
   return NanNewBufferHandle((char *)ptr, length, wrap_pointer_cb, user_data);
                                                                            ^
../src/node_pointer.h:24:76: note: candidates are:
In file included from ../src/binding.cc:23:0:
../node_modules/nan/nan.h:658:36: note: v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)
   NAN_INLINE v8::Local<v8::Object> NanNewBufferHandle (
                                    ^
../node_modules/nan/nan.h:658:36: note:   candidate expects 3 arguments, 4 provided
../node_modules/nan/nan.h:668:36: note: v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)
   NAN_INLINE v8::Local<v8::Object> NanNewBufferHandle (
                                    ^
../node_modules/nan/nan.h:668:36: note:   candidate expects 2 arguments, 4 provided
../node_modules/nan/nan.h:675:36: note: v8::Local<v8::Object> NanNewBufferHandle(uint32_t)
   NAN_INLINE v8::Local<v8::Object> NanNewBufferHandle (uint32_t size) {
                                    ^
../node_modules/nan/nan.h:675:36: note:   candidate expects 1 argument, 4 provided
In file included from ../src/binding.cc:27:0:
../src/node_pointer.h:25:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [Release/obj.target/ogg/src/binding.o] Error 1
make: Leaving directory `/home/jan/Development/nodejs/node-wwriff/node_modules/ogg/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/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-38-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/jan/Development/nodejs/node-wwriff/node_modules/ogg
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok 
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "ogg"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.2
npm ERR! code ELIFECYCLE

npm ERR! ogg@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ogg@1.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the ogg 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 ogg
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jan/Development/nodejs/node-wwriff/npm-debug.log
jangxx commented 8 years ago

Okay, if I install the lastest version from github the installation works fine. It seems like the npm version is outdated.

Neonit commented 8 years ago

Same here. Thank you very much for pointing that out, @jangxx.

TooTallNate commented 8 years ago

Sorry about that. v1.2.2 has been published to npm.

On Sat, Dec 12, 2015 at 3:08 PM, Neosublimation notifications@github.com wrote:

Same here. Thank you very much for pointing that out, @jangxx https://github.com/jangxx.

— Reply to this email directly or view it on GitHub https://github.com/TooTallNate/node-ogg/issues/11#issuecomment-164200909 .

lammas commented 8 years ago

Installation via npm still fails:

node version: v6.2.1 npm version: 3.9.3

> node-gyp rebuild

make: Entering directory '/home/user/tmp/node_modules/ogg/build'
  CC(target) Release/obj.target/libogg/deps/libogg/src/framing.o
  CC(target) Release/obj.target/libogg/deps/libogg/src/bitwise.o
  AR(target) Release/obj.target/deps/libogg/ogg.a
  COPY Release/ogg.a
  CXX(target) Release/obj.target/ogg/src/binding.o
In file included from ../src/binding.cc:23:0:
../../nan/nan.h:602:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../../nan/nan.h:602:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^
../../nan/nan.h:603:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:608:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../../nan/nan.h:608:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../../nan/nan.h:613:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../../nan/nan.h:613:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^
../../nan/nan.h:614:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../../nan/nan.h:619:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../../nan/nan.h:619:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^
ogg.target.mk:95: recipe for target 'Release/obj.target/ogg/src/binding.o' failed
make: *** [Release/obj.target/ogg/src/binding.o] Error 1
make: Leaving directory '/home/user/tmp/node_modules/ogg/build'
ivands commented 8 years ago

Can't build aswell. Plz fix this

TooTallNate commented 8 years ago

Please try out v1.2.5.