Open shanecurran opened 5 years ago
The package installs but enclaves won't build in new versions of Node.js. This happens when you run npm run test in v12.9.1.
npm run test
root@anaconda:~/node-secureworker# npm run test > secureworker@0.1.6 test /root/node-secureworker > tests/run.js cd duk_enclave && /opt/intel/sgxsdk/bin/x64/sgx_edger8r --untrusted duk_enclave.edl --search-path /opt/intel/sgxsdk/include cc -m64 -O0 -g -fPIC -Wno-attributes -I/opt/intel/sgxsdk/include -DDEBUG -UNDEBUG -UEDEBUG -c -o duk_enclave/duk_enclave_u.o duk_enclave/duk_enclave_u.c node-gyp rebuild make[1]: Entering directory '/root/node-secureworker/build' CXX(target) Release/obj.target/secureworker_internal/node-secureworker-internal/secureworker-internal.o ../node-secureworker-internal/secureworker-internal.cc: In destructor ‘virtual SecureWorkerInternal::~SecureWorkerInternal()’: ../node-secureworker-internal/secureworker-internal.cc:106:77: warning: throw will always call terminate() [-Wterminate] if (status != SGX_SUCCESS) throw sgx_error(status, "sgx_destroy_enclave"); ^ ../node-secureworker-internal/secureworker-internal.cc:106:77: note: in C++11 destructors default to noexcept ../node-secureworker-internal/secureworker-internal.cc: In static member function ‘static void SecureWorkerInternal::getQuoteSize(const uint8_t*, uint32_t*)’: ../node-secureworker-internal/secureworker-internal.cc:154:70: warning: ‘sgx_status_t sgx_get_quote_size(const uint8_t*, uint32_t*)’ is deprecated [-Wdeprecated-declarations] const sgx_status_t status = sgx_get_quote_size(sig_rl, quote_size); ^ In file included from ../node-secureworker-internal/secureworker-internal.cc:11:0: /opt/intel/sgxsdk/include/sgx_uae_service.h:100:21: note: declared here sgx_status_t SGXAPI sgx_get_quote_size( ^~~~~~~~~~~~~~~~~~ ../node-secureworker-internal/secureworker-internal.cc: In function ‘void duk_enclave_post_message(const char*)’: ../node-secureworker-internal/secureworker-internal.cc:412:83: error: no matching function for call to ‘v8::Function::Call(v8::Local<v8::Object>&, int, v8::Local<v8::Value> [1])’ handle_post_message.As<v8::Function>()->Call(thread_entry->entrant, 1, arguments); ^ In file included from /root/.cache/node-gyp/12.9.1/include/node/node.h:63:0, from ../node_modules/nan/nan.h:54, from ../node-secureworker-internal/secureworker-internal.cc:1: /root/.cache/node-gyp/12.9.1/include/node/v8.h:4161:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context, ^~~~ /root/.cache/node-gyp/12.9.1/include/node/v8.h:4161:43: note: candidate expects 4 arguments, 3 provided secureworker_internal.target.mk:115: recipe for target 'Release/obj.target/secureworker_internal/node-secureworker-internal/secureworker-internal.o' failed make[1]: *** [Release/obj.target/secureworker_internal/node-secureworker-internal/secureworker-internal.o] Error 1 make[1]: Leaving directory '/root/node-secureworker/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/root/.nvm/versions/node/v12.9.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23) gyp ERR! stack at ChildProcess.emit (events.js:209:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Linux 4.15.0-58-generic gyp ERR! command "/root/.nvm/versions/node/v12.9.1/bin/node" "/root/.nvm/versions/node/v12.9.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/node-secureworker gyp ERR! node -v v12.9.1 gyp ERR! node-gyp -v v5.0.3 gyp ERR! not ok Makefile:140: recipe for target 'build/Release/secureworker_internal.node' failed make: *** [build/Release/secureworker_internal.node] Error 1 child_process.js:642 throw err;
The package installs but enclaves won't build in new versions of Node.js. This happens when you run
npm run test
in v12.9.1.