journeyapps / node-sqlcipher

SQLCipher bindings for Node
https://journeyapps.com
BSD 3-Clause "New" or "Revised" License
207 stars 66 forks source link

cannot download precompiled napi (macos arm64) #87

Closed terry2010 closed 2 years ago

terry2010 commented 3 years ago

can not download

https://journeyapps-node-binary.s3.amazonaws.com/@journeyapps/sqlcipher/v5.2.0/napi-v6-darwin-arm64.tar.gz

it appears 403

rkistner commented 3 years ago

There is no precompiled binary for darmin-arm64 yet. CircleCI doesn't support macos arm64 directly, but it should be possible to cross-compile, similar to how we do it for Windows.

terry2010 commented 3 years ago

I tried to compile code on M1 macbook , but it seems like has some openssl lib error. can I custom my openssl lib path to avoid this error?

thank you


mac os version:
Monterey 12.0.1 (21A559)

system openssl version: LibreSSL 2.8.3

homebrew openssl version openssl@1.1

code referred in error msg:

/Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/macros.h:155:4

/ Below 0.9.8 is unacceptably low / if OPENSSL_API_LEVEL < 908 error "OPENSSL_API_COMPAT expresses an impossible API compatibility level" endif


full logs:

cd node_modules/@journeyapps/sqlcipher/

node-gyp configure --module=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6

gyp info it worked if it ends with ok gyp info using node-gyp@8.4.1 gyp info using node@17.0.1 | darwin | arm64 gyp info find Python using Python version 3.9.9 found at "/opt/homebrew/opt/python@3.9/bin/python3.9" gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9 gyp info spawn args [ gyp info spawn args '/opt/homebrew/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 '/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/opt/homebrew/lib/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/terry/Library/Caches/node-gyp/17.0.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/terry/Library/Caches/node-gyp/17.0.1', gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/terry/Library/Caches/node-gyp/17.0.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher', 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 ok

/opt/homebrew/Cellar/node/17.0.1/bin/node /Users/terry/Documents/tmp/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 gyp info it worked if it ends with ok gyp info using node-gyp@3.8.0 gyp info using node@17.0.1 | darwin | arm64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c TOUCH Release/obj.target/deps/action_before_build.stamp CC(target) Release/obj.target/sqlite3/gen/sqlcipher-amalgamation-3033000/sqlite3.o In file included from Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:25000: In file included from /Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/rand.h:14: /Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/macros.h:155:4: error: "OPENSSL_API_COMPAT expresses an impossible API compatibility level"

error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"

^ Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:132817:28: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for(i=0, iByte=0; i<sizeof(zBuf)2 && sqlite3Isxdigit(zRight[i]); i++){ ~^~~~~~~ Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:168924:24: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for(i=0, iByte=0; i<sizeof(zDecoded)2 && sqlite3Isxdigit(zKey[i]); i++){ ~^~~~~~~ 2 warnings and 1 error generated. make: *** [Release/obj.target/sqlite3/gen/sqlcipher-amalgamation-3033000/sqlite3.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/terry/Documents/tmp/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) gyp ERR! System Darwin 21.1.0 gyp ERR! command "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/Users/terry/Documents/tmp/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6" gyp ERR! cwd /Users/terry/Documents/tmp/node_modules/@journeyapps/sqlcipher gyp ERR! node -v v17.0.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok

There is no precompiled binary for darmin-arm64 yet. CircleCI doesn't support macos arm64 directly, but it should be possible to cross-compile, similar to how we do it for Windows.

terry2010 commented 3 years ago

I tried to fix openssl issue by

brew link openssl@1.1 --force . but still failed

on: macbook m1 macos 12.0.1 (21A559)


terry@terrydeMacBook-Pro sqlcipher % which openssl /opt/homebrew/opt/openssl@1.1/bin/openssl terry@terrydeMacBook-Pro sqlcipher % openssl version OpenSSL 1.1.1l 24 Aug 2021 terry@terrydeMacBook-Pro sqlcipher % pwd /Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher

terry@terrydeMacBook-Pro sqlcipher % npm install

@journeyapps/sqlcipher@5.2.0 install node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok node-pre-gyp info using node-pre-gyp@1.0.7 node-pre-gyp info using node@17.0.1 | darwin | arm64 node-pre-gyp info check checked for "/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node" (not found) node-pre-gyp http GET https://journeyapps-node-binary.s3.amazonaws.com/@journeyapps/sqlcipher/v5.2.0/napi-v6-darwin-arm64.tar.gz node-pre-gyp ERR! install response status 403 Forbidden on https://journeyapps-node-binary.s3.amazonaws.com/@journeyapps/sqlcipher/v5.2.0/napi-v6-darwin-arm64.tar.gz node-pre-gyp WARN Pre-built binaries not installable for @journeyapps/sqlcipher@5.2.0 and node@17.0.1 (node-v102 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error response status 403 Forbidden on https://journeyapps-node-binary.s3.amazonaws.com/@journeyapps/sqlcipher/v5.2.0/napi-v6-darwin-arm64.tar.gz gyp info it worked if it ends with ok gyp info using node-gyp@8.2.0 gyp info using node@17.0.1 | darwin | arm64 gyp info ok gyp info it worked if it ends with ok gyp info using node-gyp@8.2.0 gyp info using node@17.0.1 | darwin | arm64 gyp info find Python using Python version 3.9.9 found at "/opt/homebrew/opt/python@3.9/bin/python3.9" gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9 gyp info spawn args [ gyp info spawn args '/opt/homebrew/lib/node_modules/npm/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 '/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/terry/Library/Caches/node-gyp/17.0.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/terry/Library/Caches/node-gyp/17.0.1', gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/terry/Library/Caches/node-gyp/17.0.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher', 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 ok gyp info it worked if it ends with ok gyp info using node-gyp@8.2.0 gyp info using node@17.0.1 | darwin | arm64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c TOUCH Release/obj.target/deps/action_before_build.stamp CC(target) Release/obj.target/sqlite3/gen/sqlcipher-amalgamation-3033000/sqlite3.o In file included from Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:25000: In file included from /Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/rand.h:14: /Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/macros.h:155:4: error: "OPENSSL_API_COMPAT expresses an impossible API compatibility level"

error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"

^ Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:132817:28: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for(i=0, iByte=0; i<sizeof(zBuf)2 && sqlite3Isxdigit(zRight[i]); i++){ ~^~~~~~~ Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:168924:24: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for(i=0, iByte=0; i<sizeof(zDecoded)2 && sqlite3Isxdigit(zKey[i]); i++){ ~^~~~~~~ 2 warnings and 1 error generated. make: *** [Release/obj.target/sqlite3/gen/sqlcipher-amalgamation-3033000/sqlite3.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) gyp ERR! System Darwin 21.1.0 gyp ERR! command "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6" gyp ERR! cwd /Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher gyp ERR! node -v v17.0.1 gyp ERR! node-gyp -v v8.2.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/17.0.1/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) node-pre-gyp ERR! stack at ChildProcess. (/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23) node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28) node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1062:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) node-pre-gyp ERR! System Darwin 21.1.0 node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher node-pre-gyp ERR! node -v v17.0.1 node-pre-gyp ERR! node-pre-gyp -v v1.0.7 node-pre-gyp ERR! not ok Failed to execute '/opt/homebrew/Cellar/node/17.0.1/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1) npm ERR! code 1 npm ERR! path /Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build

npm ERR! A complete log of this run can be found in: npm ERR! /Users/terry/.npm/_logs/2021-11-25T12_48_04_605Z-debug.log

terry2010 commented 3 years ago

I tried switch openssl@1.1 and openssl@3 on macbook m1 macos 12.0.1 (21A559).

manually complie ,but still failed.


terry@terrydeMacBook-Pro sqlcipher % pwd /Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher terry@terrydeMacBook-Pro sqlcipher % openssl version OpenSSL 1.1.1l 24 Aug 2021 terry@terrydeMacBook-Pro sqlcipher % echo $LDFLAGS
-L/usr/local/opt/openssl@1.1/lib terry@terrydeMacBook-Pro sqlcipher % echo $CPPFLAGS -I/usr/local/opt/openssl@1.1/include

terry@terrydeMacBook-Pro sqlcipher % /opt/homebrew/Cellar/node/17.0.1/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 gyp info it worked if it ends with ok gyp info using node-gyp@8.2.0 gyp info using node@17.0.1 | darwin | arm64 gyp info find Python using Python version 3.9.9 found at "/opt/homebrew/opt/python@3.9/bin/python3.9" gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9 gyp info spawn args [ gyp info spawn args '/opt/homebrew/lib/node_modules/npm/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 '/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/terry/Library/Caches/node-gyp/17.0.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/terry/Library/Caches/node-gyp/17.0.1', gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/terry/Library/Caches/node-gyp/17.0.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher', 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 ok terry@terrydeMacBook-Pro sqlcipher % /opt/homebrew/Cellar/node/17.0.1/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 gyp info it worked if it ends with ok gyp info using node-gyp@8.2.0 gyp info using node@17.0.1 | darwin | arm64 gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o LIBTOOL-STATIC Release/nothing.a warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols) ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c TOUCH Release/obj.target/deps/action_before_build.stamp CC(target) Release/obj.target/sqlite3/gen/sqlcipher-amalgamation-3033000/sqlite3.o In file included from Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:25000: In file included from /Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/rand.h:14: /Users/terry/Library/Caches/node-gyp/17.0.1/include/node/openssl/macros.h:155:4: error: "OPENSSL_API_COMPAT expresses an impossible API compatibility level"

error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"

^ Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:132817:28: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for(i=0, iByte=0; i<sizeof(zBuf)2 && sqlite3Isxdigit(zRight[i]); i++){ ~^~~~~~~ Release/obj/gen/sqlcipher-amalgamation-3033000/sqlite3.c:168924:24: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for(i=0, iByte=0; i<sizeof(zDecoded)2 && sqlite3Isxdigit(zKey[i]); i++){ ~^~~~~~~ 2 warnings and 1 error generated. make: *** [Release/obj.target/sqlite3/gen/sqlcipher-amalgamation-3033000/sqlite3.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) gyp ERR! System Darwin 21.1.0 gyp ERR! command "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6" gyp ERR! cwd /Users/terry/Documents/code/erp-v2-15/pc-client/node_modules/@journeyapps/sqlcipher gyp ERR! node -v v17.0.1 gyp ERR! node-gyp -v v8.2.0 gyp ERR! not ok

terry2010 commented 3 years ago

cmd


Mac M1

export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" export PATH="/opt/homebrew/opt/openssl@3/bin/:$PATH"


export LDFLAGS="-L /opt/homebrew/opt/openssl@1.1/lib" export CPPFLAGS="-I /opt/homebrew/opt/openssl@1.1/include" export PATH="/opt/homebrew/opt/openssl@1.1/bin/:$PATH"


Mac Intel

export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"

export LDFLAGS="-L/usr/local/opt/openssl@3/lib" export CPPFLAGS="-I/usr/local/opt/openssl@3/include" export PATH="/usr/local/opt/openssl@3/bin:$PATH"

dlliu114 commented 2 years ago

I also have this problem, have you solved it?

rkistner commented 2 years ago

These precompiled builds are now available for v5.2.0:

terry2010 commented 2 years ago

These precompiled builds are now available for v5.2.0:

* napi-v3-darwin-arm64

* napi-v6-darwin-arm64

thank you very much