Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failed in archlinux #1301

Open
dream7180 opened this issue Nov 29, 2024 · 7 comments
Open

Install failed in archlinux #1301

dream7180 opened this issue Nov 29, 2024 · 7 comments

Comments

@dream7180
Copy link

node-gyp has been installed.
Error message as below:

...
npm error code 1
npm error path /nasd3/nascab/nascab-releases/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild --release
npm error make: Entering directory '/nasd3/nascab/nascab-releases/node_modules/better-sqlite3/build'
npm error TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error TOUCH Release/obj.target/deps/locate_sqlite3.stamp
npm error CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
npm error rm -f Release/obj.target/deps/sqlite3.a Release/obj.target/deps/sqlite3.a.ar-file-list; mkdir -p dirname Release/obj.target/deps/sqlite3.a
npm error ar crs Release/obj.target/deps/sqlite3.a @Release/obj.target/deps/sqlite3.a.ar-file-list
npm error COPY Release/sqlite3.a
npm error CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
npm error rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
npm error make: Leaving directory '/nasd3/nascab/nascab-releases/node_modules/better-sqlite3/build'
npm error prebuild-install warn install No prebuilt binaries found (target=23.1.0 runtime=node arch=x64 libc= platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | x64
npm error gyp info find Python using Python version 3.12.7 found at "/usr/bin/python3"
npm error gyp http GET https://nodejs.org/download/release/v23.1.0/node-v23.1.0-headers.tar.gz
npm error gyp http 200 https://nodejs.org/download/release/v23.1.0/node-v23.1.0-headers.tar.gz
npm error gyp http GET https://nodejs.org/download/release/v23.1.0/SHASUMS256.txt
npm error gyp http 200 https://nodejs.org/download/release/v23.1.0/SHASUMS256.txt
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/nasd3/nascab/nascab-releases/node_modules/better-sqlite3/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/dream/.cache/node-gyp/23.1.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/dream/.cache/node-gyp/23.1.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/dream/.cache/node-gyp/23.1.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/nasd3/nascab/nascab-releases/node_modules/better-sqlite3',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error In file included from /home/dream/.cache/node-gyp/23.1.0/include/node/cppgc/common.h:8,
npm error from /home/dream/.cache/node-gyp/23.1.0/include/node/v8.h:23,
npm error from /home/dream/.cache/node-gyp/23.1.0/include/node/node.h:73,
npm error from ./src/better_sqlite3.lzz:11,
npm error from ../src/better_sqlite3.cpp:4:
npm error /home/dream/.cache/node-gyp/23.1.0/include/node/v8config.h:13:2: error: #error "C++20 or later required."
npm error 13 | #error "C++20 or later required."
npm error | ^~~~~
npm error ./src/util/macros.lzz:31:69: error: ‘CopyablePersistentTraits’ is not a member of ‘v8’; did you mean ‘NonCopyablePersistentTraits’?
npm error ./src/util/macros.lzz:31:94: error: template argument 2 is invalid
npm error ./src/util/macros.lzz:149:2: error: ‘v8::AccessorGetterCallback’ has not been declared
npm error ./src/util/macros.lzz:33:97: error: ‘CopyablePersistent’ has not been declared
npm error ./src/util/macros.lzz:33:116: error: expected ‘,’ or ‘...’ before ‘<’ token
npm error ./src/util/constants.lzz:119:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:120:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:121:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:122:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:123:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:124:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:125:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:126:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:127:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:128:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:129:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:130:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:131:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:132:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:133:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:134:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:135:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:136:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/constants.lzz:140:49: error: ‘CopyablePersistent’ has not been declared
npm error ./src/util/constants.lzz:140:68: error: expected ‘,’ or ‘...’ before ‘<’ token
npm error ./src/util/constants.lzz:150:28: error: ‘CopyablePersistent’ was not declared in this scope
npm error ./src/util/constants.lzz:150:57: error: template argument 2 is invalid
npm error ./src/util/constants.lzz:150:57: error: template argument 5 is invalid
npm error ./src/util/constants.lzz:150:59: error: expected unqualified-id before ‘>’ token
npm error ./src/util/bind-map.lzz:25:5: error: ‘CopyablePersistent’ does not name a type
npm error ./src/objects/database.lzz:465:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-function.lzz:57:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-aggregate.lzz:39:90: error: ‘CopyablePersistent’ has not been declared
npm error ./src/util/custom-aggregate.lzz:39:109: error: expected ‘,’ or ‘...’ before ‘<’ token
npm error ./src/util/custom-aggregate.lzz:83:5: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-aggregate.lzz:118:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-aggregate.lzz:119:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-aggregate.lzz:120:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-table.lzz:104:5: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-table.lzz:123:5: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-table.lzz:124:5: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-table.lzz:125:5: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/custom-table.lzz:403:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/better_sqlite3.lzz:56:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/better_sqlite3.lzz:57:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/better_sqlite3.lzz:58:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/better_sqlite3.lzz:59:3: error: ‘CopyablePersistent’ does not name a type
npm error ./src/util/macros.lzz:33:108: error: ‘CopyablePersistent’ has not been declared
npm error ./src/util/macros.lzz:33:127: error: expected ‘,’ or ‘...’ before ‘<’ token
npm error ./src/util/macros.lzz: In function ‘void SetFrozen(v8::Isolate*, v8::Localv8::Context, v8::Localv8::Object, int)’:
npm error ./src/util/macros.lzz:34:37: error: ‘key’ was not declared in this scope; did you mean ‘key_t’?
npm error ./src/util/macros.lzz:34:55: error: ‘value’ was not declared in this scope
npm error ./src/util/bind-map.lzz: In member function ‘v8::Localv8::String BindMap::Pair::GetName(v8::Isolate*)’:
npm error ./src/util/bind-map.lzz:14:40: error: ‘name’ was not declared in this scope; did you mean ‘tzname’?
npm error ./src/objects/statement-iterator.lzz: In static member function ‘static v8::Localv8::Object StatementIterator::NewRecord(v8::Isolate*, v8::Localv8::Context, v8::Localv8::Value, Addon*, bool)’:
npm error ./src/objects/statement-iterator.lzz:121:44: error: ‘class CS’ has no member named ‘value’
npm error ./src/objects/statement-iterator.lzz:122:44: error: ‘class CS’ has no member named ‘done’
npm error ./src/util/custom-aggregate.lzz: At global scope:
npm error ./src/util/custom-aggregate.lzz:39:109: error: ‘CopyablePersistent’ has not been declared
npm error ./src/util/custom-aggregate.lzz:39:128: error: expected ‘,’ or ‘...’ before ‘<’ token
npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xStepBase(sqlite3_context*, int, sqlite3_value**, int)’:
npm error ./src/util/custom-aggregate.lzz:40:269: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz:44:32: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz:47:70: error: ‘ptrtm’ was not declared in this scope
npm error ./src/util/custom-aggregate.lzz:54:63: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xValueBase(sqlite3_context*, bool)’:
npm error ./src/util/custom-aggregate.lzz:59:269: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz:68:52: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz:70:71: error: ‘class CustomAggregate’ has no member named ‘result’
npm error ./src/util/macros.lzz: At global scope:
npm error ./src/util/macros.lzz:158:2: error: ‘v8::AccessorGetterCallback’ has not been declared
npm error ./src/util/macros.lzz: In function ‘void SetPrototypeGetter(v8::Isolate*, v8::Localv8::External, v8::Localv8::FunctionTemplate, const char*, int)’:
npm error ./src/util/macros.lzz:172:28: error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessor’
npm error ./src/better_sqlite3.lzz: At global scope:
npm error /home/dream/.cache/node-gyp/23.1.0/include/node/node.h:1252:7: warning: cast between incompatible function types from ‘void ()(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context)’ to ‘node::addon_context_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context, void*)’} [-Wcast-function-type]
npm error 1252 | (node::addon_context_register_func) (regfunc),
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /home/dream/.cache/node-gyp/23.1.0/include/node/node.h:1270:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE_X’
npm error 1270 | NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /home/dream/.cache/node-gyp/23.1.0/include/node/node.h:1301:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE’
npm error 1301 | NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME,
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~
npm error ./src/better_sqlite3.lzz:67:1: note: in expansion of macro ‘NODE_MODULE_INIT’
npm error ./src/better_sqlite3.lzz: In function ‘void node_register_module_v131(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context)’:
npm error ./src/better_sqlite3.lzz:84:9: error: ‘struct Addon’ has no member named ‘Statement’
npm error ./src/better_sqlite3.lzz:85:9: error: ‘struct Addon’ has no member named ‘StatementIterator’
npm error ./src/better_sqlite3.lzz:86:9: error: ‘struct Addon’ has no member named ‘Backup’
npm error ./src/util/constants.lzz: In member function ‘v8::Localv8::String CS::Code(v8::Isolate*, int)’:
npm error ./src/util/constants.lzz:5:32: error: ‘codes’ was not declared in this scope; did you mean ‘code’?
npm error ./src/util/constants.lzz: In constructor ‘CS::CS(v8::Isolate*)’:
npm error ./src/util/constants.lzz:11:36: error: ‘database’ was not declared in this scope; did you mean ‘Database’?
npm error ./src/util/constants.lzz:12:36: error: ‘reader’ was not declared in this scope; did you mean ‘read’?
npm error ./src/util/constants.lzz:13:36: error: ‘source’ was not declared in this scope
npm error ./src/util/constants.lzz:14:36: error: ‘memory’ was not declared in this scope; did you mean ‘memcpy’?
npm error ./src/util/constants.lzz:15:36: error: ‘readonly’ was not declared in this scope
npm error ./src/util/constants.lzz:16:36: error: ‘name’ was not declared in this scope; did you mean ‘tzname’?
npm error ./src/util/constants.lzz:17:36: error: ‘next’ was not declared in this scope; did you mean ‘std::next’?
npm error In file included from /usr/include/c++/14.2.1/string:47,
npm error from ./src/better_sqlite3.lzz:5:
npm error /usr/include/c++/14.2.1/bits/stl_iterator_base_funcs.h:232:5: note: ‘std::next’ declared here
npm error 232 | next(_InputIterator __x, typename
npm error | ^~~~
npm error ./src/util/constants.lzz:18:36: error: ‘length’ was not declared in this scope
npm error ./src/util/constants.lzz:19:36: error: ‘done’ was not declared in this scope
npm error ./src/util/constants.lzz:20:36: error: ‘value’ was not declared in this scope
npm error ./src/util/constants.lzz:21:36: error: ‘changes’ was not declared in this scope
npm error ./src/util/constants.lzz:22:36: error: ‘lastInsertRowid’ was not declared in this scope
npm error ./src/util/constants.lzz:23:36: error: ‘statement’ was not declared in this scope; did you mean ‘Statement’?
npm error ./src/util/constants.lzz:24:36: error: ‘column’ was not declared in this scope
npm error ./src/util/constants.lzz:25:36: error: ‘table’ was not declared in this scope
npm error ./src/util/constants.lzz:26:36: error: ‘type’ was not declared in this scope; did you mean ‘wctype’?
npm error ./src/util/constants.lzz:27:36: error: ‘totalPages’ was not declared in this scope
npm error ./src/util/constants.lzz:28:36: error: ‘remainingPages’ was not declared in this scope
npm error ./src/util/constants.lzz: At global scope:
npm error ./src/util/constants.lzz:140:44: error: ‘CopyablePersistent’ has not been declared
npm error ./src/util/constants.lzz:140:63: error: expected ‘,’ or ‘...’ before ‘<’ token
npm error ./src/util/constants.lzz: In static member function ‘static void CS::SetString(v8::Isolate*, int)’:
npm error ./src/util/constants.lzz:141:17: error: ‘constant’ was not declared in this scope; did you mean ‘const’?
npm error ./src/util/constants.lzz:141:73: error: ‘str’ was not declared in this scope; did you mean ‘std’?
npm error ./src/util/constants.lzz: In member function ‘void CS::SetCode(v8::Isolate*, int, const char*)’:
npm error ./src/util/constants.lzz:145:17: error: ‘codes’ was not declared in this scope; did you mean ‘code’?
npm error ./src/util/bind-map.lzz: In constructor ‘BindMap::Pair::Pair(v8::Isolate*, const char*, int)’:
npm error ./src/util/bind-map.lzz:20:5: error: class ‘BindMap::Pair’ does not have any field named ‘name’
npm error ./src/util/bind-map.lzz: In constructor ‘BindMap::Pair::Pair(v8::Isolate*, BindMap::Pair*)’:
npm error ./src/util/bind-map.lzz:23:5: error: class ‘BindMap::Pair’ does not have any field named ‘name’
npm error ./src/util/bind-map.lzz:23:26: error: ‘class BindMap::Pair’ has no member named ‘name’
npm error ./src/objects/database.lzz: In static member function ‘static v8::Localv8::Function Database::Init(v8::Isolate*, v8::Localv8::External)’:
npm error ./src/objects/database.lzz:17:35: error: invalid conversion from ‘void ()(v8::Localv8::String, const v8::PropertyCallbackInfov8::Value&)’ to ‘int’ [-fpermissive]
npm error ./src/util/macros.lzz:158:29: note: initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate
, v8::Localv8::External, v8::Localv8::FunctionTemplate, const char*, int)’
npm error ./src/objects/database.lzz:18:35: error: invalid conversion from ‘void ()(v8::Localv8::String, const v8::PropertyCallbackInfov8::Value&)’ to ‘int’ [-fpermissive]
npm error ./src/util/macros.lzz:158:29: note: initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate
, v8::Localv8::External, v8::Localv8::FunctionTemplate, const char*, int)’
npm error ./src/objects/database.lzz: In static member function ‘static void Database::ThrowSqliteError(Addon*, const char*, int)’:
npm error ./src/objects/database.lzz:58:48: error: ‘struct Addon’ has no member named ‘SqliteError’
npm error ./src/objects/database.lzz: In member function ‘bool Database::Log(v8::Isolate*, sqlite3_stmt*)’:
npm error ./src/objects/database.lzz:69:32: error: ‘logger’ was not declared in this scope
npm error ./src/objects/database.lzz:69:67: error: expected primary-expression before ‘>’ token
npm error ./src/objects/database.lzz:69:69: error: expected primary-expression before ‘)’ token
npm error ./src/objects/database.lzz: In constructor ‘Database::Database(v8::Isolate*, Addon*, sqlite3*, v8::Localv8::Value)’:
npm error ./src/objects/database.lzz:131:203: error: class ‘Database’ does not have any field named ‘logger’
npm error ./src/objects/database.lzz: In static member function ‘static void Database::JS_new(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/database.lzz:194:64: error: ‘class CS’ has no member named ‘memory’
npm error ./src/objects/database.lzz:195:64: error: ‘class CS’ has no member named ‘readonly’
npm error ./src/objects/database.lzz:196:64: error: ‘class CS’ has no member named ‘name’
npm error ./src/objects/database.lzz: In static member function ‘static void Database::JS_prepare(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/database.lzz:210:52: error: ‘struct Addon’ has no member named ‘Statement’
npm error ./src/objects/database.lzz: In static member function ‘static void Database::JS_backup(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/database.lzz:268:52: error: ‘struct Addon’ has no member named ‘Backup’
npm error ./src/objects/statement.lzz: In static member function ‘static v8::Localv8::Function Statement::Init(v8::Isolate*, v8::Localv8::External)’:
npm error ./src/objects/statement.lzz:16:35: error: invalid conversion from ‘void ()(v8::Localv8::String, const v8::PropertyCallbackInfov8::Value&)’ to ‘int’ [-fpermissive]
npm error ./src/util/macros.lzz:158:29: note: initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate
, v8::Localv8::External, v8::Localv8::FunctionTemplate, const char*, int)’
npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_new(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/statement.lzz:148:64: error: ‘class CS’ has no member named ‘reader’
npm error ./src/objects/statement.lzz:149:64: error: ‘class CS’ has no member named ‘readonly’
npm error ./src/objects/statement.lzz:150:64: error: ‘class CS’ has no member named ‘source’
npm error ./src/objects/statement.lzz:151:64: error: ‘class CS’ has no member named ‘database’
npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_run(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/statement.lzz:168:52: error: ‘class CS’ has no member named ‘changes’
npm error ./src/objects/statement.lzz:169:52: error: ‘class CS’ has no member named ‘lastInsertRowid’
npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_iterate(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/statement.lzz:218:52: error: ‘struct Addon’ has no member named ‘StatementIterator’
npm error ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_columns(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/statement.lzz:290:56: error: ‘class CS’ has no member named ‘name’
npm error ./src/objects/statement.lzz:291:62: error: ‘class CS’ has no member named ‘column’
npm error ./src/objects/statement.lzz:292:61: error: ‘class CS’ has no member named ‘table’
npm error ./src/objects/statement.lzz:293:64: error: ‘class CS’ has no member named ‘database’
npm error ./src/objects/statement.lzz:294:60: error: ‘class CS’ has no member named ‘type’
npm error ./src/objects/statement-iterator.lzz: In static member function ‘static void StatementIterator::JS_new(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/statement-iterator.lzz:52:64: error: ‘class CS’ has no member named ‘statement’
npm error ./src/objects/backup.lzz: In static member function ‘static void Backup::JS_new(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/backup.lzz:93:94: error: ‘class CS’ has no member named ‘database’
npm error ./src/objects/backup.lzz: In static member function ‘static void Backup::JS_transfer(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/objects/backup.lzz:115:52: error: ‘class CS’ has no member named ‘totalPages’
npm error ./src/objects/backup.lzz:116:52: error: ‘class CS’ has no member named ‘remainingPages’
npm error ./src/util/custom-function.lzz: In constructor ‘CustomFunction::CustomFunction(v8::Isolate*, Database*, const char*, v8::Localv8::Function, bool)’:
npm error ./src/util/custom-function.lzz:10:46: error: class ‘CustomFunction’ does not have any field named ‘fn’
npm error ./src/util/custom-function.lzz: In static member function ‘static void CustomFunction::xFunc(sqlite3_context*, int, sqlite3_value**)’:
npm error ./src/util/custom-function.lzz:33:68: error: ‘class CustomFunction’ has no member named ‘fn’
npm error ./src/util/custom-aggregate.lzz: In constructor ‘CustomAggregate::CustomAggregate(v8::Isolate*, Database*, const char*, v8::Localv8::Value, v8::Localv8::Function, v8::Localv8::Value, v8::Localv8::Value, bool)’:
npm error ./src/util/custom-aggregate.lzz:13:132: error: class ‘CustomAggregate’ does not have any field named ‘inverse’
npm error ./src/util/custom-aggregate.lzz:13:231: error: class ‘CustomAggregate’ does not have any field named ‘result’
npm error ./src/util/custom-aggregate.lzz:13:327: error: class ‘CustomAggregate’ does not have any field named ‘start’
npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xStep(sqlite3_context*, int, sqlite3_value**)’:
npm error ./src/util/custom-aggregate.lzz:22:69: error: ‘fn’ is not a member of ‘CustomAggregate’
npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xInverse(sqlite3_context*, int, sqlite3_value**)’:
npm error ./src/util/custom-aggregate.lzz:26:69: error: ‘inverse’ is not a member of ‘CustomAggregate’
npm error ./src/util/custom-aggregate.lzz: In member function ‘CustomAggregate::Accumulator* CustomAggregate::GetAccumulator(sqlite3_context*)’:
npm error ./src/util/custom-aggregate.lzz:94:71: error: ‘start’ was not declared in this scope
npm error ./src/util/custom-aggregate.lzz:94:105: error: expected primary-expression before ‘>’ token
npm error ./src/util/custom-aggregate.lzz:94:107: error: expected primary-expression before ‘)’ token
npm error ./src/util/custom-aggregate.lzz:96:43: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz:99:38: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-aggregate.lzz:99:59: error: ‘start’ was not declared in this scope
npm error ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::DestroyAccumulator(sqlite3_context*)’:
npm error ./src/util/custom-aggregate.lzz:108:22: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
npm error ./src/util/custom-table.lzz: In constructor ‘CustomTable::CustomTable(v8::Isolate*, Database*, const char*, v8::Localv8::Function)’:
npm error ./src/util/custom-table.lzz:9:70: error: class ‘CustomTable’ does not have any field named ‘factory’
npm error ./src/util/custom-table.lzz: At global scope:
npm error ./src/util/custom-table.lzz:45:9: warning: missing initializer for member ‘sqlite3_module::xIntegrity’ [-Wmissing-field-initializers]
npm error ./src/util/custom-table.lzz:72:9: warning: missing initializer for member ‘sqlite3_module::xIntegrity’ [-Wmissing-field-initializers]
npm error ./src/util/custom-table.lzz: In constructor ‘CustomTable::VTab::VTab(CustomTable*, v8::Localv8::Function, std::vector<std::__cxx11::basic_string >, bool)’:
npm error ./src/util/custom-table.lzz:83:87: error: class ‘CustomTable::VTab’ does not have any field named ‘generator’
npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xConnect(sqlite3*, void*, int, const char* const*, sqlite3_vtab**, char**)’:
npm error ./src/util/custom-table.lzz:168:68: error: ‘class CustomTable’ has no member named ‘factory’
npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xFilter(sqlite3_vtab_cursor*, int, const char*, int, sqlite3_value**)’:
npm error ./src/util/custom-table.lzz:263:65: error: ‘class CustomTable::VTab’ has no member named ‘generator’
npm error ./src/util/custom-table.lzz:273:77: error: ‘class CS’ has no member named ‘next’
npm error ./src/util/custom-table.lzz:273:128: error: expected primary-expression before ‘>’ token
npm error ./src/util/custom-table.lzz:273:130: error: expected primary-expression before ‘)’ token
npm error ./src/util/custom-table.lzz:274:25: error: ‘class CustomTable::Cursor’ has no member named ‘iterator’
npm error ./src/util/custom-table.lzz:275:25: error: ‘class CustomTable::Cursor’ has no member named ‘next’
npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xNext(sqlite3_vtab_cursor*)’:
npm error ./src/util/custom-table.lzz:292:58: error: ‘class CustomTable::Cursor’ has no member named ‘iterator’
npm error ./src/util/custom-table.lzz:293:56: error: ‘class CustomTable::Cursor’ has no member named ‘next’
npm error ./src/util/custom-table.lzz:302:56: error: ‘class CS’ has no member named ‘done’
npm error ./src/util/custom-table.lzz:302:106: error: expected primary-expression before ‘>’ token
npm error ./src/util/custom-table.lzz:302:108: error: expected primary-expression before ‘)’ token
npm error ./src/util/custom-table.lzz:304:33: error: ‘class CustomTable::Cursor’ has no member named ‘row’; did you mean ‘rowid’?
npm error ./src/util/custom-table.lzz:304:79: error: ‘class CS’ has no member named ‘value’
npm error ./src/util/custom-table.lzz:304:128: error: expected primary-expression before ‘>’ token
npm error ./src/util/custom-table.lzz:304:130: error: expected primary-expression before ‘)’ token
npm error ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xColumn(sqlite3_vtab_cursor*, sqlite3_context*, int)’:
npm error ./src/util/custom-table.lzz:325:52: error: ‘class CustomTable::Cursor’ has no member named ‘row’; did you mean ‘rowid’?
npm error ./src/better_sqlite3.lzz: In static member function ‘static void Addon::JS_setErrorConstructor(const v8::FunctionCallbackInfov8::Value&)’:
npm error ./src/better_sqlite3.lzz:37:104: error: ‘struct Addon’ has no member named ‘SqliteError’
npm error ./src/util/data.lzz: In function ‘v8::Localv8::Value Data::GetValueJS(v8::Isolate*, sqlite3_stmt*, int, bool)’:
npm error ./src/util/data.lzz:73:92: warning: this statement may fall through [-Wimplicit-fallthrough=]
npm error ./src/util/data.lzz:73:197: note: here
npm error ./src/util/data.lzz: In function ‘v8::Localv8::Value Data::GetValueJS(v8::Isolate*, sqlite3_value*, bool)’:
npm error ./src/util/data.lzz:77:81: warning: this statement may fall through [-Wimplicit-fallthrough=]
npm error ./src/util/data.lzz:77:175: note: here
npm error make: *** [better_sqlite3.target.mk:118: Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: make failed with exit code: 2
npm error gyp ERR! stack at ChildProcess. (/usr/lib/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Linux 6.12.1-arch1-1
npm error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd /nasd3/nascab/nascab-releases/node_modules/better-sqlite3
npm error gyp ERR! node -v v23.1.0
npm error gyp ERR! node-gyp -v v10.2.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /home/dream/.npm/_logs/2024-11-29T01_59_30_114Z-debug-0.log

@Prinzhorn
Copy link
Contributor

I assume you're using v11.6.0?

@neoxpert
Copy link
Contributor

npm error /home/dream/.cache/node-gyp/23.1.0/include/node/v8config.h:13:2: error: #error "C++20 or later required."
npm error 13 | #error "C++20 or later required."

Which version/s of gcc is/are installed and which one is set as the default goto (system and / or node gyp)?

@ivan-avalos
Copy link

ivan-avalos commented Nov 30, 2024

You need to have lzz installed. https://github.com/WiseLibs/lzz

It is a bit funny that the whole C++ codebase of this project was written in a non-standard way, using a tool, lzz, that is distributed in binary form, because apparently, the tool was written using the tool itself, and thus it requires bootstrapping itself from a binary. Now that the tool is unmaintained, the developers of better-sqlite3 maintain a repository with the binary for different architectures in ZIP files.

Dear better-sqlite3 developers, no offense, but can't you do better? :P

EDIT: I was wrong, lzz is not required to build the module as downloaded from NPM, as it comes pre-compiled. lzz is only required when contributing to the project, bu still, distributing binaries in ZIP files is not what I'd call optimal for an important project like this.

@neoxpert
Copy link
Contributor

And what would be "optimal" to distribute binaries instead of a zip? Just uncompressed? It's just about saving some bits .. It's the default if you use other projects like node-gyp or prebuild to handle and lookup pre-compiled native modules.

In the end this module relies on native C (and C++) code of the SQlite project, which has to be compiled against a/the target runtime's API. The lookup for prebuilt binaries relies on other best practice projects and a proper / compatible setup on a build host. If this lookup fails, it's either an issue caused by a precompiled binary not being correctly pushed to npm from a build agent or some special configuration on the used machine - or because the combination of better-sqlite, OS and NodeJS / Electron version is out of scope.

When it comes down to Linux, it may still be a gamble due to the amount of different potential combinations out there on top on the desired target runtime. If a suitable binary could not be resolved by node-gyp taking a local rebuild may be required. And if so, restrictions like having a proper C++20 compatible compiler and the required glibc are required by the v8 API and not by this library per se.

@jlvcm
Copy link

jlvcm commented Dec 4, 2024

Had this issue on macos, and the only fix i found was using zsh instead o fish, not sure if it is a env var, like the specific node bin because of nvm, or something related to that, but after going back to zsh it just worked

clang version on both is the same

Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

It seems that i had a issue with nvm, so I was using the wrong node version while trying to install

@hourianto
Copy link

In my case on Arch Linux the build failed with the newest Node (23.4.0 as of writing this), so I installed nodejs-lts-iron instead (20.18.1 as of now) and it installed fine. Hope this helps someone else.

@neoxpert
Copy link
Contributor

neoxpert commented Jan 1, 2025

@dream7180 Any update on this topic?

It looks like nascab is still referencing version 10.0.0 of better-sqlite3 which did not have prebuilt binaries for NodeJS 23. Did you try overriding the dependency version of better-sqlite3 within your project to the latest version 11.7.0 which has prebuilt binaries for NodeJS 23? Have you tried downgrading to NodeJS 22 LTS? Have you tried installing and configuring a compiler that supports C++20?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants