mmdevries / eiows

Other
78 stars 4 forks source link

Cannot build (build-log) #2

Closed ghost closed 4 years ago

ghost commented 4 years ago

Node v12.16.1 NPM v6.11.2

Build log:

gmake: Wejście do katalogu '/usr/home/someuser/node_modules/eiows/build'
  CXX(target) Release/obj.target/eiows/nodejs/src/addon.o
In file included from ../nodejs/src/addon.cpp:1:
In file included from ../nodejs/src/../../uWebSockets/src/Hub.h:4:
In file included from ../nodejs/src/../../uWebSockets/src/Group.h:4:
In file included from ../nodejs/src/../../uWebSockets/src/WebSocket.h:4:
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:235:38: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                    CloseFrame cf = {code: 0, message: "", length: 0};
                                     ^~~~~
                                     .code = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:235:47: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                    CloseFrame cf = {code: 0, message: "", length: 0};
                                              ^~~~~~~~
                                              .message = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:235:60: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                    CloseFrame cf = {code: 0, message: "", length: 0};
                                                           ^~~~~~~
                                                           .length = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:256:31: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                        cf = {code: 1005, message: "", length: 0};
                              ^~~~~
                              .code = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:256:43: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                        cf = {code: 1005, message: "", length: 0};
                                          ^~~~~~~~
                                          .message = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:256:56: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                        cf = {code: 1005, message: "", length: 0};
                                                       ^~~~~~~
                                                       .length = 
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:26:26: error: no type named 'BaseObject' in namespace 'node'
using BaseObject = node::BaseObject;
                   ~~~~~~^
../nodejs/src/addon.h:27:23: error: no type named 'TLSWrap' in namespace 'node'
using TLSWrap = node::TLSWrap;
                ~~~~~~^
../nodejs/src/addon.h:28:39: error: expected class name
class TLSWrapSSLGetter : public node::TLSWrap {
                                      ^
../nodejs/src/addon.h:32:18: error: use of undeclared identifier 'ssl_'
            if (!ssl_){
                 ^
../nodejs/src/addon.h:36:24: error: use of undeclared identifier 'ssl_'
            SSL* ptr = ssl_.get();
                       ^
../nodejs/src/addon.h:57:15: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
        node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), Local<Function>::New(isolate, noop), 0, nullptr);
              ^
/home/someuser/.cache/node-gyp/12.16.1/include/node/node.h:173:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/home/someuser/.cache/node-gyp/12.16.1/include/node/node.h:93:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:162:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    array->Set(isolate->GetCurrentContext(), 0, Integer::New(isolate, address.port));
    ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:163:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    array->Set(isolate->GetCurrentContext(), 1, String::NewFromUtf8(isolate, address.address, NewStringType::kNormal).ToLocalChecked());
    ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:164:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    array->Set(isolate->GetCurrentContext(), 2, String::NewFromUtf8(isolate, address.family,  NewStringType::kNormal).ToLocalChecked());
    ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:188:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        Local<Function>::New(sc->isolate, sc->jsCallback)->Call(sc->isolate->GetCurrentContext(), Null(sc->isolate), 0, nullptr);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:274:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        Local<Function>::New(isolate, *connectionCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 1, argv);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:291:13: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
            Local<Function>::New(isolate, *messageCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 2, argv);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:286:49: warning: lambda capture 'group' is not used [-Wunused-lambda-capture]
    group->onMessage([isolate, messageCallback, group](eioWS::WebSocket *webSocket, const char *message, size_t length, eioWS::OpCode opCode) {
                                              ~~^~~~~
../nodejs/src/addon.h:311:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        Local<Function>::New(isolate, *disconnectionCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 4, argv);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:339:5: error: use of undeclared identifier 'ASSIGN_OR_RETURN_UNWRAP'
    ASSIGN_OR_RETURN_UNWRAP(&tw, obj);
    ^
../nodejs/src/addon.h:363:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        object->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "group", NewStringType::kNormal).ToLocalChecked(), group);
        ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.cpp:7:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    exports->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "server", NewStringType::kNormal).ToLocalChecked(), Namespace(isolate).object);
    ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 warnings and 6 errors generated.
gmake: *** [eiows.target.mk:115: Release/obj.target/eiows/nodejs/src/addon.o] Błąd 1
gmake: Opuszczenie katalogu '/usr/home/someuser/node_modules/eiows/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System FreeBSD 11.3-RELEASE-p3
gyp ERR! command "/usr/local/devil/node12/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/someuser/node_modules/eiows
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
mmdevries commented 4 years ago

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).

ghost commented 4 years ago

Yes, I have exactly engine.io 3.4.2 but it isn't required to just install eiows in node_modules folder by npm.

There is no chance eiowscould compile for node 12.16.x? instead of 12.18.x?

mmdevries commented 4 years ago

To extract the ssl data from the socket we need to use an internal tls_wrap function from the nodejs source files. Unfortunately the tls_wrap function had an incompatible upgrade in the recent versions of node 12, 13 and 14.

mmdevries commented 4 years ago

Sorry, I pressed the wrong button on my phone.

ghost commented 4 years ago

no chance to support old tls_wrap function as well? By Macro or something?

mmdevries commented 4 years ago

@Kamil93 Done, version 3.1.5 will also support older versions of node 12.

ghost commented 4 years ago

There is still a problem:

gmake: Wejście do katalogu '/usr/home/someuser/node_modules/eiows/build'
  CXX(target) Release/obj.target/eiows/nodejs/src/addon.o
In file included from ../nodejs/src/addon.cpp:1:
In file included from ../nodejs/src/../../uWebSockets/src/Hub.h:4:
In file included from ../nodejs/src/../../uWebSockets/src/Group.h:4:
In file included from ../nodejs/src/../../uWebSockets/src/WebSocket.h:4:
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:235:38: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                    CloseFrame cf = {code: 0, message: "", length: 0};
                                     ^~~~~
                                     .code = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:235:47: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                    CloseFrame cf = {code: 0, message: "", length: 0};
                                              ^~~~~~~~
                                              .message = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:235:60: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                    CloseFrame cf = {code: 0, message: "", length: 0};
                                                           ^~~~~~~
                                                           .length = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:256:31: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                        cf = {code: 1005, message: "", length: 0};
                              ^~~~~
                              .code = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:256:43: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                        cf = {code: 1005, message: "", length: 0};
                                          ^~~~~~~~
                                          .message = 
../nodejs/src/../../uWebSockets/src/WebSocketProtocol.h:256:56: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                        cf = {code: 1005, message: "", length: 0};
                                                       ^~~~~~~
                                                       .length = 
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:26:26: error: no type named 'BaseObject' in namespace 'node'
using BaseObject = node::BaseObject;
                   ~~~~~~^
../nodejs/src/addon.h:27:23: error: no type named 'TLSWrap' in namespace 'node'
using TLSWrap = node::TLSWrap;
                ~~~~~~^
../nodejs/src/addon.h:28:39: error: expected class name
class TLSWrapSSLGetter : public node::TLSWrap {
                                      ^
../nodejs/src/addon.h:32:18: error: use of undeclared identifier 'ssl_'
            if (!ssl_){
                 ^
../nodejs/src/addon.h:36:24: error: use of undeclared identifier 'ssl_'
            SSL* ptr = ssl_.get();
                       ^
../nodejs/src/addon.h:57:15: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
        node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), Local<Function>::New(isolate, noop), 0, nullptr);
              ^
/home/someuser/.cache/node-gyp/12.16.1/include/node/node.h:173:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/home/someuser/.cache/node-gyp/12.16.1/include/node/node.h:93:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../nodejs/src/addon.cpp:2:
../nodejs/src/addon.h:162:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    array->Set(isolate->GetCurrentContext(), 0, Integer::New(isolate, address.port));
    ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:163:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    array->Set(isolate->GetCurrentContext(), 1, String::NewFromUtf8(isolate, address.address, NewStringType::kNormal).ToLocalChecked());
    ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:164:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    array->Set(isolate->GetCurrentContext(), 2, String::NewFromUtf8(isolate, address.family,  NewStringType::kNormal).ToLocalChecked());
    ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:188:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        Local<Function>::New(sc->isolate, sc->jsCallback)->Call(sc->isolate->GetCurrentContext(), Null(sc->isolate), 0, nullptr);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:274:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        Local<Function>::New(isolate, *connectionCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 1, argv);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:291:13: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
            Local<Function>::New(isolate, *messageCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 2, argv);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:286:49: warning: lambda capture 'group' is not used [-Wunused-lambda-capture]
    group->onMessage([isolate, messageCallback, group](eioWS::WebSocket *webSocket, const char *message, size_t length, eioWS::OpCode opCode) {
                                              ~~^~~~~
../nodejs/src/addon.h:311:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        Local<Function>::New(isolate, *disconnectionCallback)->Call(isolate->GetCurrentContext(), Null(isolate), 4, argv);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.h:339:5: error: use of undeclared identifier 'ASSIGN_OR_RETURN_UNWRAP'
    ASSIGN_OR_RETURN_UNWRAP(&tw, obj);
    ^
../nodejs/src/addon.h:363:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        object->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "group", NewStringType::kNormal).ToLocalChecked(), group);
        ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nodejs/src/addon.cpp:7:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
    exports->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "server", NewStringType::kNormal).ToLocalChecked(), Namespace(isolate).object);
    ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 warnings and 6 errors generated.
gmake: *** [eiows.target.mk:115: Release/obj.target/eiows/nodejs/src/addon.o] Błąd 1
gmake: Opuszczenie katalogu '/usr/home/someuser/node_modules/eiows/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System FreeBSD 11.3-RELEASE-p3
gyp ERR! command "/usr/local/devil/node12/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/someuser/node_modules/eiows
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
mmdevries commented 4 years ago

The traces you show above are not from a version 3.1.5 build. Be sure to use 3.1.5.

ghost commented 4 years ago

Yes, sorry for that.

Big thanks! Gonna test it in my projects