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

C++20 or later required ( Electron 32 ) #8465

Closed
automationghost opened this issue Sep 11, 2024 · 7 comments
Closed

C++20 or later required ( Electron 32 ) #8465

automationghost opened this issue Sep 11, 2024 · 7 comments

Comments

@automationghost
Copy link

"electron-builder": "25.0.5",
  • Electron-Builder Version:
  • Node Version:
  • 20.16

32.x

C++20 or later required ( Electron 32 )

  • Electron Version:
  • Electron Type (current, beta, nightly):
  • Target: Win32

There is this issue here .. which the team mention that electron builder is the issue.
electron/electron#43510

@mmaietta
Copy link
Collaborator

Happy to take a look asap but I'll need more details. Is this failing due to a native node module? Can you post back build logs using env var DEBUG=electron-builder?

If this is a native node module, please also test building the dependency directly via node-gyp or using electron-rebuild CLI to see if this is isolated to electron-builder or a broader issue.

Under-the-hood in electron-builder v25.x.x, we leverage the official electron/rebuild, which I think has pinned its own node-gyp dependency https://github.com/electron/rebuild/blob/main/package.json#L50. It might be worth trying a force-resolution to update the node-gyp dependency

@automationghost
Copy link
Author

Happy to take a look asap but I'll need more details. Is this failing due to a native node module? Can you post back build logs using env var DEBUG=electron-builder?

If this is a native node module, please also test building the dependency directly via node-gyp or using electron-rebuild CLI to see if this is isolated to electron-builder or a broader issue.

Under-the-hood in electron-builder v25.x.x, we leverage the official electron/rebuild, which I think has pinned its own node-gyp dependency https://github.com/electron/rebuild/blob/main/package.json#L50. It might be worth trying a force-resolution to update the node-gyp dependency

yes it fails because of native modules

I already switched back to 31 , but the error meesage is in the title. it happens no matter what . I tried
2019 and 2022 buildtools both same result. but you are probaly on the right track with node-gyp dependency.

@jhonpedro
Copy link

jhonpedro commented Oct 14, 2024

I got this, in my case it's probably not related to this project, but I think it worth sharing the log. In my case, it also happened when I changed the electron version to 32

> [email protected] start
> electron-forge start

✔ Checking your system
❯ Locating application
✔ Locating application
❯ Loading configuration
✔ Loading configuration
❯ Preparing native dependencies
› make: Entering directory 'PATH_IN_MY_COMPUTER/node_modules/better-sqlite3/build'
›   TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate
›   ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate
›   TOUCH Release/obj.target/deps/locate_sqlite3.stamp
›   CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
› 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`
› ar crs Release/obj.target/deps/sqlite3.a @Release/obj.target/deps/sqlite3.a.ar-file-list
›   COPY Release/sqlite3.a
›   CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
› In file included from /home/jhon/.electron-gyp/32.2.0/include/node/cppgc/common.h:8,
›                  from /home/jhon/.electron-gyp/32.2.0/include/node/v8.h:23,
›                  from /home/jhon/.electron-gyp/32.2.0/include/node/node.h:79,
›                  from ./src/better_sqlite3.lzz:11,
›                  from ../src/better_sqlite3.cpp:4:
› /home/jhon/.electron-gyp/32.2.0/include/node/v8config.h:13:2: error: #error "C++20 or later required."
›    13 | #error "C++20 or later required."
›       |  ^~~~~
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/macros.lzz:31:69: error: ‘CopyablePersistentTraits’ is not a member of ‘v8’; did you mean ‘NonCopyablePersistentTraits’?
› ./src/util/macros.lzz:31:94: error: template argument 2 is invalid
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/macros.lzz:149:2: error: ‘v8::AccessorGetterCallback’ has not been declared
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/macros.lzz:33:97: error: ‘CopyablePersistent’ has not been declared
› ./src/util/macros.lzz:33:116: error: expected ‘,’ or ‘...’ before ‘<’ token
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:119:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:120:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:121:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:122:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:123:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:124:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:125:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:126:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:127:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:128:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:129:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:130:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:131:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:132:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:133:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:134:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:135:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:136:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:140:49: error: ‘CopyablePersistent’ has not been declared
› ./src/util/constants.lzz:140:68: error: expected ‘,’ or ‘...’ before ‘<’ token
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/constants.lzz:150:28: error: ‘CopyablePersistent’ was not declared in this scope
› ./src/util/constants.lzz:150:57: error: template argument 2 is invalid
› ./src/util/constants.lzz:150:57: error: template argument 5 is invalid
› ./src/util/constants.lzz:150:59: error: expected unqualified-id before ‘>’ token
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/bind-map.lzz:25:5: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/objects/database.lzz:465:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-function.lzz:57:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz:39:90: error: ‘CopyablePersistent’ has not been declared
› ./src/util/custom-aggregate.lzz:39:109: error: expected ‘,’ or ‘...’ before ‘<’ token
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz:83:5: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz:118:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz:119:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz:120:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-table.lzz:104:5: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-table.lzz:123:5: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-table.lzz:124:5: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-table.lzz:125:5: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-table.lzz:403:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/better_sqlite3.lzz:56:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/better_sqlite3.lzz:57:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/better_sqlite3.lzz:58:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/better_sqlite3.lzz:59:3: error: ‘CopyablePersistent’ does not name a type
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/macros.lzz:33:108: error: ‘CopyablePersistent’ has not been declared
› ./src/util/macros.lzz:33:127: error: expected ‘,’ or ‘...’ before ‘<’ token
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/macros.lzz: In function ‘void SetFrozen(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Object>, int)’:
› ./src/util/macros.lzz:34:37: error: ‘key’ was not declared in this scope; did you mean ‘key_t’?
› ./src/util/macros.lzz:34:55: error: ‘value’ was not declared in this scope
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/bind-map.lzz: In member function ‘v8::Local<v8::String> BindMap::Pair::GetName(v8::Isolate*)’:
› ./src/util/bind-map.lzz:14:40: error: ‘name’ was not declared in this scope; did you mean ‘tzname’?
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/objects/statement-iterator.lzz: In static member function ‘static v8::Local<v8::Object> StatementIterator::NewRecord(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, Addon*, bool)’:
› ./src/objects/statement-iterator.lzz:121:44: error: ‘class CS’ has no member named ‘value’
› ./src/objects/statement-iterator.lzz:122:44: error: ‘class CS’ has no member named ‘done’
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz: At global scope:
› ./src/util/custom-aggregate.lzz:39:109: error: ‘CopyablePersistent’ has not been declared
› ./src/util/custom-aggregate.lzz:39:128: error: expected ‘,’ or ‘...’ before ‘<’ token
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xStepBase(sqlite3_context*, int, sqlite3_value**, int)’:
› ./src/util/custom-aggregate.lzz:40:269: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-aggregate.lzz:44:32: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-aggregate.lzz:47:70: error: ‘ptrtm’ was not declared in this scope
› ./src/util/custom-aggregate.lzz:54:63: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› In file included from ../src/better_sqlite3.cpp:4:
› ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xValueBase(sqlite3_context*, bool)’:
› ./src/util/custom-aggregate.lzz:59:269: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-aggregate.lzz:68:52: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-aggregate.lzz:70:71: error: ‘class CustomAggregate’ has no member named ‘result’
› ./src/util/macros.lzz: At global scope:
› ./src/util/macros.lzz:158:2: error: ‘v8::AccessorGetterCallback’ has not been declared
› ./src/util/macros.lzz: In function ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’:
› ./src/util/macros.lzz:172:28: error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessor’
› In file included from ./src/better_sqlite3.lzz:11,
›                  from ../src/better_sqlite3.cpp:4:
› ./src/better_sqlite3.lzz: At global scope:
› /home/jhon/.electron-gyp/32.2.0/include/node/node.h:1261:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)’ to ‘node::addon_context_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, void*)’} [-Wcast-function-type]
›  1261 |       (node::addon_context_register_func) (regfunc),                  \
›       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
› /home/jhon/.electron-gyp/32.2.0/include/node/node.h:1279:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE_X’
›  1279 |   NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
›       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
› /home/jhon/.electron-gyp/32.2.0/include/node/node.h:1310:3: note: in expansion of macro ‘NODE_MODULE_CONTEXT_AWARE’
›  1310 |   NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME,                     \
›       |   ^~~~~~~~~~~~~~~~~~~~~~~~~
› ./src/better_sqlite3.lzz:67:1: note: in expansion of macro ‘NODE_MODULE_INIT’
› ./src/better_sqlite3.lzz: In function ‘void node_register_module_v128(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)’:
› ./src/better_sqlite3.lzz:84:9: error: ‘struct Addon’ has no member named ‘Statement’
› ./src/better_sqlite3.lzz:85:9: error: ‘struct Addon’ has no member named ‘StatementIterator’
› ./src/better_sqlite3.lzz:86:9: error: ‘struct Addon’ has no member named ‘Backup’
› ./src/util/constants.lzz: In member function ‘v8::Local<v8::String> CS::Code(v8::Isolate*, int)’:
› ./src/util/constants.lzz:5:32: error: ‘codes’ was not declared in this scope; did you mean ‘code’?
› ./src/util/constants.lzz: In constructor ‘CS::CS(v8::Isolate*)’:
› ./src/util/constants.lzz:11:36: error: ‘database’ was not declared in this scope; did you mean ‘Database’?
› ./src/util/constants.lzz:12:36: error: ‘reader’ was not declared in this scope; did you mean ‘read’?
› ./src/util/constants.lzz:13:36: error: ‘source’ was not declared in this scope
› ./src/util/constants.lzz:14:36: error: ‘memory’ was not declared in this scope; did you mean ‘memcpy’?
› ./src/util/constants.lzz:15:36: error: ‘readonly’ was not declared in this scope
› ./src/util/constants.lzz:16:36: error: ‘name’ was not declared in this scope; did you mean ‘tzname’?
› ./src/util/constants.lzz:17:36: error: ‘next’ was not declared in this scope; did you mean ‘std::next’?
› In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
›                  from /usr/include/c++/11/bits/char_traits.h:39,
›                  from /usr/include/c++/11/string:40,
›                  from ./src/better_sqlite3.lzz:5,
›                  from ../src/better_sqlite3.cpp:4:
› /usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: ‘std::next’ declared here
›   213 |     next(_InputIterator __x, typename
›       |     ^~~~
› ./src/util/constants.lzz:18:36: error: ‘length’ was not declared in this scope
› ./src/util/constants.lzz:19:36: error: ‘done’ was not declared in this scope
› ./src/util/constants.lzz:20:36: error: ‘value’ was not declared in this scope
› ./src/util/constants.lzz:21:36: error: ‘changes’ was not declared in this scope
› ./src/util/constants.lzz:22:36: error: ‘lastInsertRowid’ was not declared in this scope
› ./src/util/constants.lzz:23:36: error: ‘statement’ was not declared in this scope; did you mean ‘Statement’?
› ./src/util/constants.lzz:24:36: error: ‘column’ was not declared in this scope
› ./src/util/constants.lzz:25:36: error: ‘table’ was not declared in this scope
› ./src/util/constants.lzz:26:36: error: ‘type’ was not declared in this scope; did you mean ‘wctype’?
› ./src/util/constants.lzz:27:36: error: ‘totalPages’ was not declared in this scope
› ./src/util/constants.lzz:28:36: error: ‘remainingPages’ was not declared in this scope
› ./src/util/constants.lzz: At global scope:
› ./src/util/constants.lzz:140:44: error: ‘CopyablePersistent’ has not been declared
› ./src/util/constants.lzz:140:63: error: expected ‘,’ or ‘...’ before ‘<’ token
› ./src/util/constants.lzz: In static member function ‘static void CS::SetString(v8::Isolate*, int)’:
› ./src/util/constants.lzz:141:17: error: ‘constant’ was not declared in this scope
› ./src/util/constants.lzz:141:73: error: ‘str’ was not declared in this scope; did you mean ‘std’?
› ./src/util/constants.lzz: In member function ‘void CS::SetCode(v8::Isolate*, int, const char*)’:
› ./src/util/constants.lzz:145:17: error: ‘codes’ was not declared in this scope; did you mean ‘code’?
› ./src/util/bind-map.lzz: In constructor ‘BindMap::Pair::Pair(v8::Isolate*, const char*, int)’:
› ./src/util/bind-map.lzz:20:5: error: class ‘BindMap::Pair’ does not have any field named ‘name’
› ./src/util/bind-map.lzz: In constructor ‘BindMap::Pair::Pair(v8::Isolate*, BindMap::Pair*)’:
› ./src/util/bind-map.lzz:23:5: error: class ‘BindMap::Pair’ does not have any field named ‘name’
› ./src/util/bind-map.lzz:23:26: error: ‘class BindMap::Pair’ has no member named ‘name’
› ./src/objects/database.lzz: In static member function ‘static v8::Local<v8::Function> Database::Init(v8::Isolate*, v8::Local<v8::External>)’:
› ./src/objects/database.lzz:17:35: error: invalid conversion from ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’ to ‘int’ [-fpermissive]
› ./src/util/macros.lzz:158:29: note:   initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’
› ./src/objects/database.lzz:18:35: error: invalid conversion from ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’ to ‘int’ [-fpermissive]
› ./src/util/macros.lzz:158:29: note:   initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’
› ./src/objects/database.lzz: In static member function ‘static void Database::ThrowSqliteError(Addon*, const char*, int)’:
› ./src/objects/database.lzz:58:48: error: ‘struct Addon’ has no member named ‘SqliteError’
› ./src/objects/database.lzz: In member function ‘bool Database::Log(v8::Isolate*, sqlite3_stmt*)’:
› ./src/objects/database.lzz:69:32: error: ‘logger’ was not declared in this scope
› ./src/objects/database.lzz:69:67: error: expected primary-expression before ‘>’ token
› ./src/objects/database.lzz:69:69: error: expected primary-expression before ‘)’ token
› ./src/objects/database.lzz: In constructor ‘Database::Database(v8::Isolate*, Addon*, sqlite3*, v8::Local<v8::Value>)’:
› ./src/objects/database.lzz:131:203: error: class ‘Database’ does not have any field named ‘logger’
› ./src/objects/database.lzz: In static member function ‘static void Database::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/database.lzz:194:64: error: ‘class CS’ has no member named ‘memory’
› ./src/objects/database.lzz:195:64: error: ‘class CS’ has no member named ‘readonly’
› ./src/objects/database.lzz:196:64: error: ‘class CS’ has no member named ‘name’
› ./src/objects/database.lzz: In static member function ‘static void Database::JS_prepare(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/database.lzz:210:52: error: ‘struct Addon’ has no member named ‘Statement’
› ./src/objects/database.lzz: In static member function ‘static void Database::JS_backup(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/database.lzz:268:52: error: ‘struct Addon’ has no member named ‘Backup’
› ./src/objects/statement.lzz: In static member function ‘static v8::Local<v8::Function> Statement::Init(v8::Isolate*, v8::Local<v8::External>)’:
› ./src/objects/statement.lzz:16:35: error: invalid conversion from ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’ to ‘int’ [-fpermissive]
› ./src/util/macros.lzz:158:29: note:   initializing argument 5 of ‘void SetPrototypeGetter(v8::Isolate*, v8::Local<v8::External>, v8::Local<v8::FunctionTemplate>, const char*, int)’
› ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/statement.lzz:148:64: error: ‘class CS’ has no member named ‘reader’
› ./src/objects/statement.lzz:149:64: error: ‘class CS’ has no member named ‘readonly’
› ./src/objects/statement.lzz:150:64: error: ‘class CS’ has no member named ‘source’
› ./src/objects/statement.lzz:151:64: error: ‘class CS’ has no member named ‘database’
› ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_run(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/statement.lzz:168:52: error: ‘class CS’ has no member named ‘changes’
› ./src/objects/statement.lzz:169:52: error: ‘class CS’ has no member named ‘lastInsertRowid’
› ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_iterate(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/statement.lzz:218:52: error: ‘struct Addon’ has no member named ‘StatementIterator’
› ./src/objects/statement.lzz: In static member function ‘static void Statement::JS_columns(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/statement.lzz:290:56: error: ‘class CS’ has no member named ‘name’
› ./src/objects/statement.lzz:291:62: error: ‘class CS’ has no member named ‘column’
› ./src/objects/statement.lzz:292:61: error: ‘class CS’ has no member named ‘table’
› ./src/objects/statement.lzz:293:64: error: ‘class CS’ has no member named ‘database’
› ./src/objects/statement.lzz:294:60: error: ‘class CS’ has no member named ‘type’
› ./src/objects/statement-iterator.lzz: In static member function ‘static void StatementIterator::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/statement-iterator.lzz:52:64: error: ‘class CS’ has no member named ‘statement’
› ./src/objects/backup.lzz: In static member function ‘static void Backup::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/backup.lzz:93:94: error: ‘class CS’ has no member named ‘database’
› ./src/objects/backup.lzz: In static member function ‘static void Backup::JS_transfer(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/objects/backup.lzz:115:52: error: ‘class CS’ has no member named ‘totalPages’
› ./src/objects/backup.lzz:116:52: error: ‘class CS’ has no member named ‘remainingPages’
› ./src/util/custom-function.lzz: In constructor ‘CustomFunction::CustomFunction(v8::Isolate*, Database*, const char*, v8::Local<v8::Function>, bool)’:
› ./src/util/custom-function.lzz:10:46: error: class ‘CustomFunction’ does not have any field named ‘fn’
› ./src/util/custom-function.lzz: In static member function ‘static void CustomFunction::xFunc(sqlite3_context*, int, sqlite3_value**)’:
› ./src/util/custom-function.lzz:33:68: error: ‘class CustomFunction’ has no member named ‘fn’
› ./src/util/custom-aggregate.lzz: In constructor ‘CustomAggregate::CustomAggregate(v8::Isolate*, Database*, const char*, v8::Local<v8::Value>, v8::Local<v8::Function>, v8::Local<v8::Value>, v8::Local<v8::Value>, bool)’:
› ./src/util/custom-aggregate.lzz:13:132: error: class ‘CustomAggregate’ does not have any field named ‘inverse’
› ./src/util/custom-aggregate.lzz:13:231: error: class ‘CustomAggregate’ does not have any field named ‘result’
› ./src/util/custom-aggregate.lzz:13:327: error: class ‘CustomAggregate’ does not have any field named ‘start’
› ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xStep(sqlite3_context*, int, sqlite3_value**)’:
› ./src/util/custom-aggregate.lzz:22:69: error: ‘fn’ is not a member of ‘CustomAggregate’
› ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::xInverse(sqlite3_context*, int, sqlite3_value**)’:
› ./src/util/custom-aggregate.lzz:26:69: error: ‘inverse’ is not a member of ‘CustomAggregate’
› ./src/util/custom-aggregate.lzz: In member function ‘CustomAggregate::Accumulator* CustomAggregate::GetAccumulator(sqlite3_context*)’:
› ./src/util/custom-aggregate.lzz:94:71: error: ‘start’ was not declared in this scope
› ./src/util/custom-aggregate.lzz:94:105: error: expected primary-expression before ‘>’ token
› ./src/util/custom-aggregate.lzz:94:107: error: expected primary-expression before ‘)’ token
› ./src/util/custom-aggregate.lzz:96:43: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-aggregate.lzz:99:38: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-aggregate.lzz:99:59: error: ‘start’ was not declared in this scope
› ./src/util/custom-aggregate.lzz: In static member function ‘static void CustomAggregate::DestroyAccumulator(sqlite3_context*)’:
› ./src/util/custom-aggregate.lzz:108:22: error: ‘struct CustomAggregate::Accumulator’ has no member named ‘value’
› ./src/util/custom-table.lzz: In constructor ‘CustomTable::CustomTable(v8::Isolate*, Database*, const char*, v8::Local<v8::Function>)’:
› ./src/util/custom-table.lzz:9:70: error: class ‘CustomTable’ does not have any field named ‘factory’
› ./src/util/custom-table.lzz: At global scope:
› ./src/util/custom-table.lzz:45:9: warning: missing initializer for member ‘sqlite3_module::xIntegrity’ [-Wmissing-field-initializers]
› ./src/util/custom-table.lzz:72:9: warning: missing initializer for member ‘sqlite3_module::xIntegrity’ [-Wmissing-field-initializers]
› ./src/util/custom-table.lzz: In constructor ‘CustomTable::VTab::VTab(CustomTable*, v8::Local<v8::Function>, std::vector<std::__cxx11::basic_string<char> >, bool)’:
› ./src/util/custom-table.lzz:83:87: error: class ‘CustomTable::VTab’ does not have any field named ‘generator’
› ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xConnect(sqlite3*, void*, int, const char* const*, sqlite3_vtab**, char**)’:
› ./src/util/custom-table.lzz:168:68: error: ‘class CustomTable’ has no member named ‘factory’
› ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xFilter(sqlite3_vtab_cursor*, int, const char*, int, sqlite3_value**)’:
› ./src/util/custom-table.lzz:263:65: error: ‘class CustomTable::VTab’ has no member named ‘generator’
› ./src/util/custom-table.lzz:273:77: error: ‘class CS’ has no member named ‘next’
› ./src/util/custom-table.lzz:273:128: error: expected primary-expression before ‘>’ token
› ./src/util/custom-table.lzz:273:130: error: expected primary-expression before ‘)’ token
› ./src/util/custom-table.lzz:274:25: error: ‘class CustomTable::Cursor’ has no member named ‘iterator’
› ./src/util/custom-table.lzz:275:25: error: ‘class CustomTable::Cursor’ has no member named ‘next’
› ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xNext(sqlite3_vtab_cursor*)’:
› ./src/util/custom-table.lzz:292:58: error: ‘class CustomTable::Cursor’ has no member named ‘iterator’
› ./src/util/custom-table.lzz:293:56: error: ‘class CustomTable::Cursor’ has no member named ‘next’
› ./src/util/custom-table.lzz:302:56: error: ‘class CS’ has no member named ‘done’
› ./src/util/custom-table.lzz:302:106: error: expected primary-expression before ‘>’ token
› ./src/util/custom-table.lzz:302:108: error: expected primary-expression before ‘)’ token
› ./src/util/custom-table.lzz:304:33: error: ‘class CustomTable::Cursor’ has no member named ‘row’; did you mean ‘rowid’?
› ./src/util/custom-table.lzz:304:79: error: ‘class CS’ has no member named ‘value’
› ./src/util/custom-table.lzz:304:128: error: expected primary-expression before ‘>’ token
› ./src/util/custom-table.lzz:304:130: error: expected primary-expression before ‘)’ token
› ./src/util/custom-table.lzz: In static member function ‘static int CustomTable::xColumn(sqlite3_vtab_cursor*, sqlite3_context*, int)’:
› ./src/util/custom-table.lzz:325:52: error: ‘class CustomTable::Cursor’ has no member named ‘row’; did you mean ‘rowid’?
› ./src/better_sqlite3.lzz: In static member function ‘static void Addon::JS_setErrorConstructor(const v8::FunctionCallbackInfo<v8::Value>&)’:
› ./src/better_sqlite3.lzz:37:104: error: ‘struct Addon’ has no member named ‘SqliteError’
› ./src/util/data.lzz: In function ‘v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_stmt*, int, bool)’:
› ./src/util/data.lzz:73:92: warning: this statement may fall through [-Wimplicit-fallthrough=]
› ./src/util/data.lzz:73:197: note: here
› ./src/util/data.lzz: In function ‘v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_value*, bool)’:
› ./src/util/data.lzz:77:81: warning: this statement may fall through [-Wimplicit-fallthrough=]
› ./src/util/data.lzz:77:175: note: here
› make: *** [better_sqlite3.target.mk:134: Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
› rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
› make: Leaving directory 'PATH_IN_MY_COMPUTER/node_modules/better-sqlite3/build'
› Error: `make` failed with exit code: 2
›     at ChildProcess.onExit (PATH_IN_MY_COMPUTER/node_modules/node-gyp/lib/build.js:203:23)
›     at ChildProcess.emit (node:events:514:28)
›     at ChildProcess._handle.onexit (node:internal/child_process:294:12)


✖ Preparing native dependencies: 0 / 1 [FAILED: node-gyp failed to rebuild 'PATH_IN_MY_COMPUTER/node_modules/better-sqlite3']

An unhandled rejection has occurred inside Forge:
Error: node-gyp failed to rebuild 'PATH_IN_MY_COMPUTER/node_modules/better-sqlite3'
at ChildProcess.<anonymous> (PATH_IN_MY_COMPUTER/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:118:24)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

@avivsalman
Copy link

same error to me

@mmaietta
Copy link
Collaborator

Additional note, electron-builder uses the official upstream @electron/rebuild package and we're on their latest 3.7.0 (which just migrated to their own fork of @electron/node-gyp). There's nothing I can do from the electron-builder side. This issue was reproducible directly via @electron/rebuild and forge, so it must be a bug in either electron or in the @electron/rebuild module.

@mmaietta mmaietta closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
@ZouJiu1
Copy link

ZouJiu1 commented Dec 17, 2024

the reason is the version of node is too high, you should downgrade the version to v20

brew install node@20

v22 is too higher

https://zoujiu.com.cn

https://nodejs.org/zh-cn/download/package-manager

@devopstales
Copy link

This solved my problem. THX

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

No branches or pull requests

6 participants