TooTallNate / node-ogg

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

Installation failed #24

Closed danhab99 closed 4 years ago

danhab99 commented 4 years ago

Another failed installation.

npm i ogg      

> ogg@1.2.6 install /home/dan/Documents/node/project/node_modules/ogg
> node-gyp rebuild

make: Entering directory '/home/dan/Documents/node/project/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:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/binding.cc: In member function ‘virtual void nodeogg::OggSyncWriteWorker::HandleOKCallback()’:
../src/binding.cc:62:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback->Call(1, argv);
                           ^
In file included from ../src/binding.cc:23:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE nodeogg::node_ogg_sync_write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:76:54: error: no matching function for call to ‘v8::Value::NumberValue()’
   long size = static_cast<long>(info[2]->NumberValue());
                                                      ^
In file included from /home/dan/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../src/binding.cc:22:
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:2773:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
                                       ^~~~~~~~~~~
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:2773:39: note:   candidate expects 1 argument, 0 provided
../src/binding.cc: In member function ‘virtual void nodeogg::OggSyncPageoutWorker::HandleOKCallback()’:
../src/binding.cc:105:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback->Call(3, argv);
                           ^
In file included from ../src/binding.cc:23:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE nodeogg::node_ogg_stream_init(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:128:57: error: no matching function for call to ‘v8::Value::IntegerValue()’
   int serialno = static_cast<int>(info[1]->IntegerValue());
                                                         ^
In file included from /home/dan/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../src/binding.cc:22:
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:2774:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
                                        ^~~~~~~~~~~~
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:2774:40: note:   candidate expects 1 argument, 0 provided
../src/binding.cc: In member function ‘virtual void nodeogg::OggStreamPageinWorker::HandleOKCallback()’:
../src/binding.cc:146:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback->Call(1, argv);
                           ^
In file included from ../src/binding.cc:23:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/binding.cc: In member function ‘virtual void nodeogg::OggStreamPacketoutWorker::HandleOKCallback()’:
../src/binding.cc:193:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback->Call(6, argv);
                           ^
In file included from ../src/binding.cc:23:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/binding.cc: In member function ‘virtual void nodeogg::OggStreamPacketinWorker::HandleOKCallback()’:
../src/binding.cc:226:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback->Call(1, argv);
                           ^
In file included from ../src/binding.cc:23:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/binding.cc: In member function ‘virtual void nodeogg::StreamWorker::HandleOKCallback()’:
../src/binding.cc:267:27: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
     callback->Call(4, argv);
                           ^
In file included from ../src/binding.cc:23:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/binding.cc: In function ‘void nodeogg::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/binding.cc:404:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
   Nan::ForceSet(target, Nan::New<String>("sizeof_" #value).ToLocalChecked(), \
        ^~~~~~~~
../src/binding.cc:407:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_sync_state);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:407:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_sync_state);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:407:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_sync_state);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:404:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
   Nan::ForceSet(target, Nan::New<String>("sizeof_" #value).ToLocalChecked(), \
        ^~~~~~~~
../src/binding.cc:408:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_stream_state);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:408:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_stream_state);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:408:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_stream_state);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:404:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
   Nan::ForceSet(target, Nan::New<String>("sizeof_" #value).ToLocalChecked(), \
        ^~~~~~~~
../src/binding.cc:409:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_page);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:409:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_page);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:409:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_page);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:404:8: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
   Nan::ForceSet(target, Nan::New<String>("sizeof_" #value).ToLocalChecked(), \
        ^~~~~~~~
../src/binding.cc:410:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_packet);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:410:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_packet);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:406:58: warning: ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated [-Wdeprecated-declarations]
       static_cast<PropertyAttribute>(ReadOnly|DontDelete))
                                                          ^
../src/binding.cc:410:3: note: in expansion of macro ‘SIZEOF’
   SIZEOF(ogg_packet);
   ^~~~~~
In file included from ../../nan/nan.h:217,
                 from ../src/binding.cc:23:
../../nan/nan_maybe_43_inl.h:130:35: note: declared here
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                   ^~~~~~~~
../src/binding.cc:434:77: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
     Nan::New<FunctionTemplate>(node_ogg_packet_replace_buffer)->GetFunction());
                                                                             ^
In file included from /home/dan/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../src/binding.cc:22:
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:6283:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
                                              ^~~~~~~~~~~
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:6283:46: note:   candidate expects 1 argument, 0 provided
In file included from ../src/binding.cc:22:
../src/binding.cc: At global scope:
/home/dan/.cache/node-gyp/13.2.0/include/node/node.h:610:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/dan/.cache/node-gyp/13.2.0/include/node/node.h:644:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/binding.cc:440:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(ogg, nodeogg::Initialize)
 ^~~~~~~~~~~
In file included from /home/dan/.cache/node-gyp/13.2.0/include/node/node.h:63,
                 from ../src/binding.cc:22:
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/dan/.cache/node-gyp/13.2.0/include/node/node_object_wrap.h:84:78:   required from here
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:10400:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61:   required from here
/home/dan/.cache/node-gyp/13.2.0/include/node/v8.h:10400:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
make: *** [ogg.target.mk:116: Release/obj.target/ogg/src/binding.o] Error 1
make: Leaving directory '/home/dan/Documents/node/project/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/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Linux 4.18.0-25-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dan/Documents/node/project/node_modules/ogg
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN project@1.0.0 No description
npm WARN project@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ogg@1.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ogg@1.2.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dan/.npm/_logs/2019-11-30T22_43_22_923Z-debug.log

Also

uname -a

Linux dan-MS-7641 4.18.0-25-generic #26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

 

node -v
v13.2.0
npm -v
6.13.1

The problem occurs while compiling libogg (I think), but IDK how to fix it.

danhab99 commented 4 years ago

Nevermind, works with node@11.10.0 & npm@6.7.0

To fix do:

npm install -g n
sudo n 11.10.0
npm i ogg