dsprenkels / sss-node

node.js bindings for the sss secret sharing library
MIT License
34 stars 8 forks source link

Support for node 16 and 18 #14

Open aantoniorodrigues opened 1 year ago

aantoniorodrigues commented 1 year ago

I'm trying to get this package running with node version 16.18.0 and I'm getting a lot of errors. Is this package not compatible w/ node 16.18.0? My plan is to later upgrade to LTS version 18.

Installing JavaScript dependencies
npm ERR! code 1
npm ERR! path /Users/username/Desktop/nodejs_app/node_modules/shamirsecretsharing
npm ERR! command failed
npm ERR! command sh -c -- node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/shamirsecretsharing/shamirsecretsharing.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@16.18.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/username/.asdf/installs/nodejs/16.18.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/username/Desktop/nodejs_app/node_modules/shamirsecretsharing/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/username/.asdf/installs/nodejs/16.18.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/username/Library/Caches/node-gyp/16.18.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/username/Library/Caches/node-gyp/16.18.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/username/.asdf/installs/nodejs/16.18.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/username/Library/Caches/node-gyp/16.18.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/username/Desktop/nodejs_app/node_modules/shamirsecretsharing',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../shamirsecretsharing.cc:5:12: fatal error: 'sss/sss.h' file not found
npm ERR!   #include "sss/sss.h"
npm ERR!            ^~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/shamirsecretsharing/shamirsecretsharing.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/username/.asdf/installs/nodejs/16.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/Users/username/.asdf/installs/nodejs/16.18.0/bin/node" "/Users/username/.asdf/installs/nodejs/16.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/username/Desktop/nodejs_app/node_modules/shamirsecretsharing
npm ERR! gyp ERR! node -v v16.18.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2022-11-03T10_53_37_700Z-debug-0.log
aantoniorodrigues commented 1 year ago

@dsprenkels did you have time to look into this?