Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on debian testing (required for rocket.chat 😕 ) #467

Open
theoparis opened this issue Jul 11, 2023 · 4 comments
Open

Fails to build on debian testing (required for rocket.chat 😕 ) #467

theoparis opened this issue Jul 11, 2023 · 4 comments

Comments

@theoparis
Copy link

npm ERR! ../src/fibers.cc: In function 'void uni::MakeWeak(v8::Isolate*, v8::Persistent<T>&, P*)':
npm ERR! ../src/fibers.cc:27:79: error: 'kFinalizer' is not a member of 'v8::WeakCallbackType'
npm ERR!    27 |                 handle.SetWeak(val, WeakCallbackShim<F, P>, WeakCallbackType::kFinalizer);
npm ERR!       |                                                                               ^~~~~~~~~~
npm ERR! ../src/fibers.cc: In function 'void uni::SetAccessor(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, FunctionType (*)(v8::Local<v8::String>, const GetterCallbackInfo&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&))':
npm ERR! ../src/fibers.cc:355:73: warning: cast between incompatible function types from 'uni::FunctionType (*)(v8::Local<v8::String>, const uni::GetterCallbackInfo&)' {aka 'void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)'} to 'v8::AccessorNameGetterCallback' {aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)'} [-Wcast-function-type]
npm ERR!   355 |                 object->SetAccessor(isolate->GetCurrentContext(), name, (AccessorNameGetterCallback)getter, (AccessorNameSetterCallback)setter).ToChecked();
npm ERR!       |                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../src/fibers.cc:355:109: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const uni::SetterCallbackInfo&)' {aka 'void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&)'} to 'v8::AccessorNameSetterCallback' {aka 'void (*)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&)'} [-Wcast-function-type]
npm ERR!   355 |                 object->SetAccessor(isolate->GetCurrentContext(), name, (AccessorNameGetterCallback)getter, (AccessorNameSetterCallback)setter).ToChecked();
npm ERR!       |                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from ../src/coroutine.h:1,
npm ERR!                  from ../src/fibers.cc:1:
npm ERR! ../src/fibers.cc: At global scope:
npm ERR! /root/.cache/node-gyp/20.4.0/include/node/node.h:1166:7: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
npm ERR!  1166 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /root/.cache/node-gyp/20.4.0/include/node/node.h:1200:3: note: in expansion of macro 'NODE_MODULE_X'
npm ERR!  1200 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! ../src/fibers.cc:930:1: note: in expansion of macro 'NODE_MODULE'
npm ERR!   930 | NODE_MODULE(fibers, init)
npm ERR!       | ^~~~~~~~~~~
npm ERR! make: *** [fibers.target.mk:122: Release/obj.target/fibers/src/fibers.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/tmp/bundle/programs/server/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
@timofey3007
Copy link

Hi,
have faced a similar issue when upgrading a node to version 20.5.1. According to the node documentation, kFinalizer is removed (in node v18 it was marked as deprecated).
As I can see, kFinalizer is identical by description to the kParameter.
image

@laverdet
Correct me if I'm wrong, but if kFinalizer is switched to kParameter, the build should work correctly.

Thanks.

@laverdet
Copy link
Owner

Hi please read the big notice on the front page.

@theoparis
Copy link
Author

Should this issue be upstreamed to rocket.chat since it still uses this package?

@laverdet
Copy link
Owner

I'm surprised they are still using fibers. My guess is that if you open an issue over there they will tell you to use an older version of nodejs. Their README suggests 14.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants