rbeer / nodebb-plugin-smoothshorts

Seamless short URLs for topic and post links in NodeBB.
MIT License
5 stars 2 forks source link

'node-gyp rebuild' while install fails in many places #21

Open ghost opened 4 years ago

ghost commented 4 years ago

nodebb 1.14 now, Ubuntu 20.04 LTS try to install nodebb-plugin-smoothshorts , it invokes node-gyp rebuild, it call make who call g++ g++ fails to compile in many places results in

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:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 4.15.0-106-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/nodebb/nodebb/node_modules/xxhash gyp ERR! node -v v12.18.1 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok

errors:

In file included from ../src/hash.cc:3:0: ../src/hash_32.hpp:147:28: error: ‘Handle’ has not been declared static void Initialize(Handle target) { ^~ ../src/hash_32.hpp:147:34: error: expected ‘,’ or ‘...’ before ‘<’ token static void Initialize(Handle target) { ^ ../src/hash_32.hpp: In static member function ‘static uint32_t Hash32::convert_seed(v8::Local)’: ../src/hash_32.hpp:57:38: error: no matching function for call to ‘v8::Value::Uint32Value()’ return seed_val->Uint32Value(); ^ In file included from ../src/hash.cc:4:0: ../src/hash_64.hpp: At global scope: ../src/hash_64.hpp:147:28: error: ‘Handle’ has not been declared static void Initialize(Handle target) { ^~ ../src/hash_64.hpp:147:34: error: expected ‘,’ or ‘...’ before ‘<’ token static void Initialize(Handle target) { ^ ../src/hash_64.hpp: In static member function ‘static uint64_t Hash64::convert_seed(v8::Local)’: ../src/hash_64.hpp:57:38: error: no matching function for call to ‘v8::Value::Uint32Value()’ return seed_val->Uint32Value(); ^ In file included from /home/nodebb/.cache/node-gyp/12.18.1/include/node/node.h:67:0, from ../src/hash.cc:1: /home/nodebb/.cache/node-gyp/12.18.1/include/node/v8.h:2707:41: note: candidate: v8::Maybe v8::Value::Uint32Value(v8::Local) const V8_WARN_UNUSED_RESULT Maybe Uint32Value( ^~~ /home/nodebb/.cache/node-gyp/12.18.1/include/node/v8.h:2707:41: note: candidate expects 1 argument, 0 provided In file included from ../src/hash.cc:4:0: ../src/hash_64.hpp: In static member function ‘static void Hash64::Initialize(int)’: ../src/hash_64.hpp:158:7: error: ‘target’ was not declared in this scope target->Set(name, tpl->GetFunction()); ^~ ../src/hash.cc: At global scope: ../src/hash.cc:7:17: error: variable or field ‘Init’ declared void void Init(v8::Handle target) { ^~ ../src/hash.cc:7:17: error: ‘Handle’ is not a member of ‘v8’ ../src/hash.cc:7:34: error: expected primary-expression before ‘>’ token void Init(v8::Handle target) { ^ ../src/hash.cc:7:36: error: ‘target’ was not declared in this scope void Init(v8::Handle target) { `