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

can't install #33

Open
sbormann opened this issue May 17, 2021 · 10 comments
Open

can't install #33

sbormann opened this issue May 17, 2021 · 10 comments

Comments

@sbormann
Copy link

Hi,
i can't install authenticate-pam. It failes with the following log. node and nodejs are v12.22.1.

npm install authenticate-pam

> [email protected] install /opt/iobroker/node_modules/authenticate-pam
> node-gyp rebuild

make: Entering directory '/opt/iobroker/node_modules/authenticate-pam/build'
  CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o
../authenticate_pam.cc: In function ‘void after_doing_auth(uv_work_t*, int)’:
../authenticate_pam.cc:107:87: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(m->callback), 1, args);
                                                                                       ^
In file included from ../authenticate_pam.cc:23:
../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../authenticate_pam.cc:107:87: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(m->callback), 1, args);
                                                                                       ^
In file included from ../authenticate_pam.cc:23:
../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../authenticate_pam.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Authenticate(Nan::NAN_METHOD_ARGS_TYPE)’:
../authenticate_pam.cc:147:83: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   Local<Value> res = options->Get(Nan::New<String>("serviceName").ToLocalChecked());
                                                                                   ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8-internal.h:14,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:27,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:3553:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../authenticate_pam.cc:150:69: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
    serviceName->WriteUtf8(m->serviceName, sizeof(m->serviceName) - 1);
                                                                     ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc:152:69: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   res = options->Get(Nan::New<String>("remoteHost").ToLocalChecked());
                                                                     ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8-internal.h:14,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:27,
                 from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:3553:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../authenticate_pam.cc:155:66: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
    remoteHost->WriteUtf8(m->remoteHost, sizeof(m->remoteHost) - 1);
                                                                  ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc:160:58: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
  username->WriteUtf8(m->username, sizeof(m->username) - 1);
                                                          ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc:161:58: error: no matching function for call to ‘v8::String::WriteUtf8(char [128], unsigned int)’
  password->WriteUtf8(m->password, sizeof(m->password) - 1);
                                                          ^
In file included from /home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
       ^~~~~~~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/v8.h:2878:7: note:   no known conversion for argument 1 from ‘char [128]’ to ‘v8::Isolate*’
../authenticate_pam.cc: At global scope:
../authenticate_pam.cc:170:11: error: variable or field ‘init’ declared void
 void init(Handle<Object> exports) {
           ^~~~~~
../authenticate_pam.cc:170:11: error: ‘Handle’ was not declared in this scope
../authenticate_pam.cc:170:11: note: suggested alternative: ‘rand_r’
 void init(Handle<Object> exports) {
           ^~~~~~
           rand_r
../authenticate_pam.cc:170:24: error: expected primary-expression before ‘>’ token
 void init(Handle<Object> exports) {
                        ^
../authenticate_pam.cc:170:26: error: ‘exports’ was not declared in this scope
 void init(Handle<Object> exports) {
                          ^~~~~~~
In file included from ../../nan/nan.h:56,
                 from ../authenticate_pam.cc:23:
../authenticate_pam.cc:175:31: error: ‘init’ was not declared in this scope
 NODE_MODULE(authenticate_pam, init);
                               ^~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:736:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(authenticate_pam, init);
 ^~~~~~~~~~~
../authenticate_pam.cc:175:31: note: suggested alternative: ‘int’
 NODE_MODULE(authenticate_pam, init);
                               ^~~~
/home/iobroker/.cache/node-gyp/12.22.1/include/node/node.h:736:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(authenticate_pam, init);
 ^~~~~~~~~~~
make: *** [authenticate_pam.target.mk:109: Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1
make: Leaving directory '/opt/iobroker/node_modules/authenticate-pam/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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.10.17-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/iobroker/node_modules/authenticate-pam
gyp ERR! node -v v12.22.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN [email protected] requires a peer of [email protected] || 4.0.x || 4.1.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] || 4.0.x || 4.1.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/glob-watcher/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/osx-temperature-sensor):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zigbee-herdsman-converters/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zigbee-herdsman-converters/node_modules/zigbee-herdsman/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zigbee-herdsman/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/iobroker/.npm/_logs/2021-05-17T18_37_57_857Z-debug.log

Can you help out?
Many thanks!

@Rush
Copy link
Owner

Rush commented May 17, 2021 via email

@sbormann
Copy link
Author

👍

@XTerry2021
Copy link

The reason is even master has the changes for node 14 but there is no published version on nodejs registry.
Need to manually copy the cc file to override during rpm build process to workaround it.

@Rush
Copy link
Owner

Rush commented Sep 22, 2021

All right - I pushed 1.0.4 to npm. Can y'all check?

@XTerry2021
Copy link

XTerry2021 commented Sep 22, 2021 via email

@Rush
Copy link
Owner

Rush commented Sep 22, 2021

@XTerry2021 could you check which version of nan is being used when you install from master? I believe I need to lock it to a concrete version.

@XTerry2021
Copy link

XTerry2021 commented Sep 22, 2021 via email

@XTerry2021
Copy link

My main project is using 1.x nan and "*" just follows the main project and it doesn't have its own node_modules folder.

@Rush
Copy link
Owner

Rush commented Sep 22, 2021

Can you try version 1.0.5?

@XTerry2021
Copy link

1.0.5 compiles now. npm list:
├─┬ [email protected]
│ └── [email protected]

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