-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Prebuild compilation error on win32-arm64 + Electron v25 #1192
Comments
Same problem: win32-arm64 + electron v28.3.3 This problem appeared in better-sqlite3 v10.1.0 |
I'm running into the same issue with Node 20, Electron 30 on Windows arm64:
Logsnpm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild --release npm error copy_builtin_sqlite3 npm error sqlite3.c npm error C:\repos\Mailspring\app\node_modules\better-sqlite3\build\Release\obj\global_intermediate\sqlite3\sqlite3.c(24885,3): error C2099: initializer is not a constant [C:\repos\Mailspring\app\node_modules\better-sqlite3\build\deps\sqlite3.vcxproj] npm error prebuild-install warn install No prebuilt binaries found (target=20.14.0 runtime=node arch=arm64 libc= platform=win32) npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.0.1 npm error gyp info using node@20.14.0 | win32 | arm64 npm error gyp info find Python using Python version 3.11.2 found at "C:\Program Files\Python311-arm64\python.exe" npm error gyp info find VS using VS2022 (17.9.34728.123) found at: npm error gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm error gyp info find VS run with --verbose for detailed information npm error gyp info spawn C:\Program Files\Python311-arm64\python.exe npm error gyp info spawn args [ npm error gyp info spawn args 'C:\\repos\\Mailspring\\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 'msvs', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\\repos\\Mailspring\\app\\node_modules\\better-sqlite3\\build\\config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\\repos\\Mailspring\\node_modules\\node-gyp\\addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\\Users\\denni\\AppData\\Local\\node-gyp\\Cache\\20.14.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=C:\\Users\\denni\\AppData\\Local\\node-gyp\\Cache\\20.14.0', npm error gyp info spawn args '-Dnode_gyp_dir=C:\\repos\\Mailspring\\node_modules\\node-gyp', npm error gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\denni\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.14.0\\\\<(target_arch)\\\\node.lib', npm error gyp info spawn args '-Dmodule_root_dir=C:\\repos\\Mailspring\\app\\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 'C:\\repos\\Mailspring\\app\\node_modules\\better-sqlite3\\build', npm error gyp info spawn args '-Goutput_dir=.' npm error gyp info spawn args ] npm error gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\arm64\MSBuild.exe npm error gyp info spawn args [ npm error gyp info spawn args 'build\\binding.sln', npm error gyp info spawn args '/clp:Verbosity=minimal', npm error gyp info spawn args '/nologo', npm error gyp info spawn args '/p:Configuration=Release;Platform=ARM64' npm error gyp info spawn args ] npm error gyp ERR! build error npm error gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\arm64\MSBuild.exe` failed with exit code: 1 npm error gyp ERR! stack at ChildProcess. (C:\repos\Mailspring\node_modules\node-gyp\lib\build.js:209:23) npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm error gyp ERR! System Windows_NT 10.0.22631 npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\repos\\Mailspring\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release" npm error gyp ERR! cwd C:\repos\Mailspring\app\node_modules\better-sqlite3 npm error gyp ERR! node -v v20.14.0 npm error gyp ERR! node-gyp -v v10.0.1 npm error gyp ERR! not ok |
Closing: we dropped support for electron v25. |
#1190 breaks the windows arm64 build, which seems to be unrelated to the electron version |
I looked into this, fixing it just required: static const struct {
u8 nName; /* Length of the name */
char zName[7]; /* Name of the transformation */
float rLimit; /* Maximum NNN value for this transform */
float rXform; /* Constant used for this transform */
} aXformType[] = {
/* 0 */ { 6, "second", 4.6427e+14, 1.0 },
/* 1 */ { 6, "minute", 7.7379e+12, 60.0 },
/* 2 */ { 4, "hour", 1.2897e+11, 3600.0 },
/* 3 */ { 3, "day", 5373485.0, 86400.0 },
- /* 4 */ { 5, "month", 176546.0, 30.0*86400.0 },
- /* 5 */ { 4, "year", 14713.0, 365.0*86400.0 },
+ /* 4 */ { 5, "month", 176546.0, 2592000.0 },
+ /* 5 */ { 4, "year", 14713.0, 31536000.0 },
}; |
Unfortunately, that file is overwritten by the SQLite tarball -- so applying that diff would require running something like |
This has already been fixed upstream, looks like we just have to wait... |
See https://github.com/WiseLibs/better-sqlite3/actions/runs/9306758002/job/25616996400#step:10:742 👍
I think we should drop Electron v25: it went EOL 2023-12-05.
The text was updated successfully, but these errors were encountered: