WiseLibs / better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.
MIT License
5.23k stars 390 forks source link

Can't install on MacOS Sonora, brew install v21.7.1, node@18 installs fine. #1164

Closed nospam2k closed 3 months ago

nospam2k commented 3 months ago

david@bkup bible-convert % npm install npm ERR! code 1 npm ERR! path /Users/david/Src/node/bible-convert/node_modules/better-sqlite3 npm ERR! command failed npm ERR! command sh -c prebuild-install || npm run build-release npm ERR! > better-sqlite3@7.5.3 build-release npm ERR! > node-gyp rebuild --release npm ERR! npm ERR! npm ERR! TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate npm ERR! ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate npm ERR! TOUCH Release/obj.target/deps/locate_sqlite3.stamp npm ERR! CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o npm ERR! LIBTOOL-STATIC Release/sqlite3.a npm ERR! CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o npm ERR! rm ba23eeee118cd63e16015df367567cb043fed872.intermediate npm ERR! prebuild-install warn install No prebuilt binaries found (target=21.7.1 runtime=node arch=x64 libc= platform=darwin) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@21.7.1 | darwin | x64 npm ERR! gyp info find Python using Python version 3.12.2 found at "/usr/local/opt/python@3.12/bin/python3.12" npm ERR! gyp http GET https://nodejs.org/download/release/v21.7.1/node-v21.7.1-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v21.7.1/node-v21.7.1-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v21.7.1/SHASUMS256.txt npm ERR! gyp http 200 https://nodejs.org/download/release/v21.7.1/SHASUMS256.txt npm ERR! gyp info spawn /usr/local/opt/python@3.12/bin/python3.12 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/local/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/david/Src/node/bible-convert/node_modules/better-sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/david/Library/Caches/node-gyp/21.7.1/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/david/Library/Caches/node-gyp/21.7.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/david/Library/Caches/node-gyp/21.7.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/david/Src/node/bible-convert/node_modules/better-sqlite3', 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! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:73: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8.h:24: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-array-buffer.h:12: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-local-handle.h:12: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-handle-base.h:8: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:474:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS) npm ERR! ^ npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:474:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:474:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:474:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:474:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS) npm ERR! ^ npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:475:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:776:61: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! static_assert(kJSObjectType + 1 == kFirstJSApiObjectType); npm ERR! ^ npm ERR! , "" npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:777:55: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! static_assert(kJSObjectType < kLastJSApiObjectType); npm ERR! ^ npm ERR! , "" npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-internal.h:778:63: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! static_assert(kFirstJSApiObjectType < kLastJSApiObjectType); npm ERR! ^ npm ERR! , "" npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:73: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8.h:24: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-array-buffer.h:12: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-local-handle.h:12: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-handle-base.h:34:51: warning: template template parameter using 'typename' is a C++17 extension [-Wc++17-extensions] npm ERR! template <template <typename T, typename... Ms> typename H, typename T, npm ERR! ^~~~~~~~ npm ERR! class npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:73: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8.h:24: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-array-buffer.h:13: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-object.h:9: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-maybe.h:106:45: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'? npm ERR! template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*> npm ERR! ~~~~~^~~~~~~~~~~~~~~~~~~~~ npm ERR! is_lvalue_reference npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_reference.h:26:29: note: 'is_lvalue_reference' declared here npm ERR! struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; npm ERR! ^ npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:73: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8.h:24: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-array-buffer.h:13: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-object.h:9: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-maybe.h:106:69: error: expected '(' for function-style cast or type construction npm ERR! template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*> npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-maybe.h:123:43: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'? npm ERR! template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr> npm ERR! ~~~~~^~~~~~~~~~~~~~~~~~~~~ npm ERR! is_lvalue_reference npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_reference.h:26:29: note: 'is_lvalue_reference' declared here npm ERR! struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; npm ERR! ^ npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:73: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8.h:24: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-array-buffer.h:13: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-object.h:9: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-maybe.h:123:67: error: expected '(' for function-style cast or type construction npm ERR! template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr> npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:73: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8.h:33: npm ERR! In file included from /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-function.h:11: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/v8-function-callback.h:150:50: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! kIsolateIndex - kReturnValueIndex); npm ERR! ^ npm ERR! , "" npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! /Users/david/Library/Caches/node-gyp/21.7.1/include/node/node.h:687:8: error: no template named 'optional' in namespace 'std' npm ERR! std::optional<std::string> builder_script_path; npm ERR! ~~~~~^ npm ERR! ./src/util/macros.lzz:157:21: error: no member named 'AccessorSignature' in namespace 'v8' npm ERR! v8::AccessorSignature::New(isolate, recv) npm ERR! ~~~~^ npm ERR! ./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but-set-variable] npm ERR! int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL); npm ERR! ^ npm ERR! ./src/util/binder.lzz:37:51: error: no member named 'CreationContext' in 'v8::Object' npm ERR! v8::Local<v8::Context> ctx = obj->CreationContext(); npm ERR! ~~~~~^ npm ERR! 24 warnings and 7 errors generated. npm ERR! make: *** [Release/obj.target/better_sqlite3/src/better_sqlite3.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. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23) npm ERR! gyp ERR! System Darwin 23.3.0 npm ERR! gyp ERR! command "/usr/local/Cellar/node/21.7.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" npm ERR! gyp ERR! cwd /Users/david/Src/node/bible-convert/node_modules/better-sqlite3 npm ERR! gyp ERR! node -v v21.7.1 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok

`

Prinzhorn commented 3 months ago

better-sqlite3@7.5.3

https://github.com/WiseLibs/better-sqlite3/issues/1087#issuecomment-1763358915

In the future, when opening an issue:

  1. Format your message (there's a preview tab for markdown)
  2. Search for the error message before opening a new issue