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

Cannot build mmdevries/eiows while mmdevries/uws builds correctly #1

Closed
naholyr opened this issue Jun 22, 2020 · 4 comments
Closed

Comments

@naholyr
Copy link

naholyr commented Jun 22, 2020

In my application, npm add github:mmdevries/uws works fine but npm add eiows breaks :(

  • Platform: Ubuntu 20.04 LTS
  • Node: v14.2.0

Build output:

❯ npx node-gyp rebuild
npx : 99 installé(s) en 7.252s
gyp info it worked if it ends with ok
gyp info using node-gyp@7.0.0
gyp info using node@14.2.0 | linux | x64
gyp info find Python using Python version 3.8.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/home/nchambrier/.npm/_npx/2235114/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/nchambrier/Projects/NetDirect/LAP/node_modules/eiows/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/nchambrier/.npm/_npx/2235114/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/nchambrier/.cache/node-gyp/14.2.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/nchambrier/.cache/node-gyp/14.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/nchambrier/.npm/_npx/2235114/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/nchambrier/.cache/node-gyp/14.2.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/nchambrier/Projects/NetDirect/LAP/node_modules/eiows',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make : on entre dans le répertoire « /home/nchambrier/Projects/NetDirect/LAP/node_modules/eiows/build »
  CXX(target) Release/obj.target/eiows/nodejs/src/addon.o
In file included from ../nodejs/src/../../uWebSockets/src/Networking.h:63,
                 from ../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:5,
                 from ../nodejs/src/../../uWebSockets/src/WebSocket.h:4,
                 from ../nodejs/src/../../uWebSockets/src/Group.h:4,
                 from ../nodejs/src/../../uWebSockets/src/Hub.h:4,
                 from ../nodejs/src/addon.cpp:1:
../nodejs/src/../../uWebSockets/src/Libuv.h: In member function ‘void uS::Poll::close(void (*)(uS::Poll*))’:
../nodejs/src/../../uWebSockets/src/Libuv.h:105:52: warning: cast between incompatible function types from ‘void (*)(uS::Poll*)’ to ‘void (*)(uS::Poll*, int, int)’ [-Wcast-function-type]
  105 |             this->cb = (void(*)(Poll *, int, int)) cb;
      |                                                    ^~
../nodejs/src/../../uWebSockets/src/Libuv.h: In lambda function:
../nodejs/src/../../uWebSockets/src/Libuv.h:108:62: warning: cast between incompatible function types from ‘void (*)(uS::Poll*, int, int)’ to ‘void (*)(uS::Poll*)’ [-Wcast-function-type]
  108 |                 void (*cb)(Poll *) = (void(*)(Poll *)) poll->cb;
      |                                                              ^~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: At global scope:
../nodejs/src/addon.h:26:26: error: ‘BaseObject’ in namespace ‘node’ does not name a type
   26 | using BaseObject = node::BaseObject;
      |                          ^~~~~~~~~~
../nodejs/src/addon.h:27:23: error: ‘TLSWrap’ in namespace ‘node’ does not name a type
   27 | using TLSWrap = node::TLSWrap;
      |                       ^~~~~~~
../nodejs/src/addon.h:28:47: error: expected class-name before ‘{’ token
   28 | class TLSWrapSSLGetter : public node::TLSWrap {
      |                                               ^
../nodejs/src/addon.h: In member function ‘void TLSWrapSSLGetter::setSSL(const v8::FunctionCallbackInfo<v8::Value>&)’:
../nodejs/src/addon.h:32:18: error: ‘ssl_’ was not declared in this scope; did you mean ‘ssl_st’?
   32 |             if (!ssl_){
      |                  ^~~~
      |                  ssl_st
../nodejs/src/addon.h:36:24: error: ‘ssl_’ was not declared in this scope; did you mean ‘ssl_st’?
   36 |             SSL* ptr = ssl_.get();
      |                        ^~~~
      |                        ssl_st
../nodejs/src/addon.h: In lambda function:
../nodejs/src/addon.h:57:124: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
   57 |         node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), Local<Function>::New(isolate, noop), 0, nullptr);
      |                                                                                                                            ^
In file included from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:189:50: note: declared here
  189 |                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
      |                                                  ^~~~~~~~~~~~
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:108:42: note: in definition of macro ‘NODE_DEPRECATED’
  108 |     __attribute__((deprecated(message))) declarator
      |                                          ^~~~~~~~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:57:124: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
   57 |         node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), Local<Function>::New(isolate, noop), 0, nullptr);
      |                                                                                                                            ^
In file included from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:189:50: note: declared here
  189 |                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
      |                                                  ^~~~~~~~~~~~
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:108:42: note: in definition of macro ‘NODE_DEPRECATED’
  108 |     __attribute__((deprecated(message))) declarator
      |                                          ^~~~~~~~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In constructor ‘NativeString::NativeString(v8::Isolate*, const v8::Local<v8::Value>&)’:
../nodejs/src/addon.h:82:85: warning: ‘v8::ArrayBuffer::Contents v8::ArrayBuffer::GetContents()’ is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
   82 |             ArrayBuffer::Contents contents = arrayBufferView->Buffer()->GetContents();
      |                                                                                     ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:5203:12: note: declared here
 5203 |   Contents GetContents();
      |            ^~~~~~~~~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:87:71: warning: ‘v8::ArrayBuffer::Contents v8::ArrayBuffer::GetContents()’ is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
   87 |             ArrayBuffer::Contents contents = arrayBuffer->GetContents();
      |                                                                       ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:5203:12: note: declared here
 5203 |   Contents GetContents();
      |            ^~~~~~~~~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In function ‘void getAddress(const v8::FunctionCallbackInfo<v8::Value>&)’:
../nodejs/src/addon.h:162:84: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  162 |     array->Set(isolate->GetCurrentContext(), 0, Integer::New(isolate, address.port));
      |                                                                                    ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:3642:37: note: declared here
 3642 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
      |                                     ^~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:163:135: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  163 |     array->Set(isolate->GetCurrentContext(), 1, String::NewFromUtf8(isolate, address.address, NewStringType::kNormal).ToLocalChecked());
      |                                                                                                                                       ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:3642:37: note: declared here
 3642 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
      |                                     ^~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:164:135: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  164 |     array->Set(isolate->GetCurrentContext(), 2, String::NewFromUtf8(isolate, address.family,  NewStringType::kNormal).ToLocalChecked());
      |                                                                                                                                       ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:3642:37: note: declared here
 3642 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
      |                                     ^~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In function ‘void sendCallback(eioWS::WebSocket*, void*, bool, void*)’:
../nodejs/src/addon.h:188:128: warning: ignoring return value of ‘v8::MaybeLocal<v8::Value> v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’, declared with attribute warn_unused_result [-Wunused-result]
  188 |         Local<Function>::New(sc->isolate, sc->jsCallback)->Call(sc->isolate->GetCurrentContext(), Null(sc->isolate), 0, nullptr);
      |                                                                                                                                ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:4430:43: note: declared here
 4430 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
      |                                           ^~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In lambda function:
../nodejs/src/addon.h:274:118: warning: ignoring return value of ‘v8::MaybeLocal<v8::Value> v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’, declared with attribute warn_unused_result [-Wunused-result]
  274 |         Local<Function>::New(isolate, *connectionCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 1, argv);
      |                                                                                                                      ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:4430:43: note: declared here
 4430 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
      |                                           ^~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In lambda function:
../nodejs/src/addon.h:291:119: warning: ignoring return value of ‘v8::MaybeLocal<v8::Value> v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’, declared with attribute warn_unused_result [-Wunused-result]
  291 |             Local<Function>::New(isolate, *messageCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 2, argv);
      |                                                                                                                       ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:4430:43: note: declared here
 4430 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
      |                                           ^~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In lambda function:
../nodejs/src/addon.h:311:121: warning: ignoring return value of ‘v8::MaybeLocal<v8::Value> v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’, declared with attribute warn_unused_result [-Wunused-result]
  311 |         Local<Function>::New(isolate, *disconnectionCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 4, argv);
      |                                                                                                                         ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:4430:43: note: declared here
 4430 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
      |                                           ^~~~
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h: In function ‘void getSSLContext(const v8::FunctionCallbackInfo<v8::Value>&)’:
../nodejs/src/addon.h:339:5: error: ‘ASSIGN_OR_RETURN_UNWRAP’ was not declared in this scope
  339 |     ASSIGN_OR_RETURN_UNWRAP(&tw, obj);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h: In constructor ‘Namespace::Namespace(v8::Isolate*)’:
../nodejs/src/addon.h:363:136: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
  363 |         object->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "group", NewStringType::kNormal).ToLocalChecked(), group);
      |                                                                                                                                        ^
In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:3639:37: note: declared here
 3639 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
../nodejs/src/addon.cpp: In function ‘void Main(v8::Local<v8::Object>)’:
../nodejs/src/addon.cpp:7:154: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute warn_unused_result [-Wunused-result]
    7 | GetCurrentContext(), String::NewFromUtf8(isolate, "server", NewStringType::kNormal).ToLocalChecked(), Namespace(isolate).object);
      |                                                                                                                                ^

In file included from /home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:67,
                 from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/v8.h:3639:37: note: declared here
 3639 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
      |                                     ^~~
In file included from ../nodejs/src/addon.h:1,
                 from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.cpp: At global scope:
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:731:43: 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]
  731 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/home/nchambrier/.cache/node-gyp/14.2.0/include/node/node.h:765:3: note: in expansion of macro ‘NODE_MODULE_X’
  765 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../nodejs/src/addon.cpp:18:1: note: in expansion of macro ‘NODE_MODULE’
   18 | NODE_MODULE(eiows, Main)
      | ^~~~~~~~~~~
make: *** [eiows.target.mk:115: Release/obj.target/eiows/nodejs/src/addon.o] Error 1
make : on quitte le répertoire « /home/nchambrier/Projects/NetDirect/LAP/node_modules/eiows/build »
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/nchambrier/.npm/_npx/2235114/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-37-generic
gyp ERR! command "/home/nchambrier/.nvm/versions/node/v14.2.0/bin/node" "/home/nchambrier/.npm/_npx/2235114/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/nchambrier/Projects/NetDirect/LAP/node_modules/eiows
gyp ERR! node -v v14.2.0
gyp ERR! node-gyp -v v7.0.0
gyp ERR! not ok
@mmdevries
Copy link
Owner

This package requires engine.io(3.4.2 or higher) and it should work on Node 8, 10, 12(v12.18.0 or higher), 13(v13.14.0 or higher) and 14(v14.4.0 or higher).

@naholyr
Copy link
Author

naholyr commented Jun 22, 2020

Ooops, thanks! That's some super precise requirements, my bad 😅

Thanks for your awesome work!

Is there a changelog somewhere detailing the differences between uws, mmdevries/uws, and eiows? Are the two others supposed to come deprecated quickly?

@mmdevries
Copy link
Owner

uws was a complete websocket implementation (client and server). The people who build it abandoned the project. All client code on the mmdevries/uws version has been removed since this is not used in the Socket.io/Engine.io workflow plus newer nodejs versions are supported.
So, uws and mmdevries/uws are deprecated.

@naholyr
Copy link
Author

naholyr commented Jun 22, 2020 via email

@naholyr naholyr closed this as completed Jun 22, 2020
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

2 participants