Skip to content

node_sqlite3.node crashing on Windows arm64 #73

Closed
@dennisameling

Description

@dennisameling

I'm trying to get Signal Desktop to work on Windows arm64 (signalapp/Signal-Desktop#3745 (comment)), and it's crashing with error code 3228369023 when I try to run it. I debugged in Visual Studio (on an x64 machine, since Microsoft doesn't support debugging on arm64 yet) and it looks like it's crashing on node_sqlite3.node:

image

When I clone this repo and build it, it fails with the following error:

C:\repos\node-sqlcipher>npm install

> @journeyapps/[email protected] install C:\repos\node-sqlcipher
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(403): https://journeyapps-node-binary.s3.amazonaws.com/@journeyapps/sqlcipher/v5.0.0/napi-v6-win32-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @journeyapps/[email protected] and [email protected] (node-v83 ABI, unknown) (falling back 
to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  nothing.c
  win_delay_load_hook.cc
  nothing.vcxproj -> C:\repos\node-sqlcipher\build\Release\\nothing.lib
  unpack_sqlite_dep
  Copying C:\repos\node-sqlcipher\build\Release\obj/global_intermediate/sqlcipher-amalgamation-3031000/OpenSSL-Win64/msvcr120.dll to C
  :\repos\node-sqlcipher\build\Release\\msvcr120.dll
          1 file(s) copied.
  Copying C:\repos\node-sqlcipher\build\Release\obj/global_intermediate/sqlcipher-amalgamation-3031000/OpenSSL-Win64/libeay32.dll to C 
  :\repos\node-sqlcipher\build\Release\\libeay32.dll
          1 file(s) copied.
  sqlite3.c
C:\repos\node-sqlcipher\build\Release\obj\global_intermediate\sqlcipher-amalgamation-3031000\sqlite3.c(27233,1): error C2099: initiali
zer is not a constant [C:\repos\node-sqlcipher\build\deps\sqlite3.vcxproj]
C:\repos\node-sqlcipher\build\Release\obj\global_intermediate\sqlcipher-amalgamation-3031000\sqlite3.c(27234,1): error C2099: initiali 
zer is not a constant [C:\repos\node-sqlcipher\build\deps\sqlite3.vcxproj]
C:\repos\node-sqlcipher\build\Release\obj\global_intermediate\sqlcipher-amalgamation-3031000\sqlite3.c(27235,1): error C2099: initiali
zer is not a constant [C:\repos\node-sqlcipher\build\deps\sqlite3.vcxproj]
C:\repos\node-sqlcipher\build\Release\obj\global_intermediate\sqlcipher-amalgamation-3031000\sqlite3.c(27237,1): error C2099: initiali 
zer is not a constant [C:\repos\node-sqlcipher\build\deps\sqlite3.vcxproj]
C:\repos\node-sqlcipher\build\Release\obj\global_intermediate\sqlcipher-amalgamation-3031000\sqlite3.c(27238,1): error C2099: initiali 
zer is not a constant [C:\repos\node-sqlcipher\build\deps\sqlite3.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit 
code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\repos\\node-sqlcipher\\lib\\binding\\napi-v6-win32-arm64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\repos\\node-sqlcipher\\lib\\binding\\napi-v6-win32-arm64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd C:\repos\node-sqlcipher
gyp ERR! node -v v14.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\repos\node-sqlcipher\lib\binding\napi-v6-win32-arm64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\repos\node-sqlcipher\lib\binding\napi-v6-win32-arm64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\repos\node-sqlcipher\node_modules\node-pre-gyp\lib\util\compile.js:83:29)  
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19042
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\repos\\node-sqlcipher\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\repos\node-sqlcipher
node-pre-gyp ERR! node -v v14.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok 
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\repos\node-sqlcipher\lib\binding\napi-v6-win32-arm64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\repos\node-sqlcipher\lib\binding\napi-v6-win32-arm64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @journeyapps/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @journeyapps/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\denni\AppData\Roaming\npm-cache\_logs\2021-02-20T15_50_38_549Z-debug.log

C:\repos\node-sqlcipher>

I tried building node-sqlite3 locally, and it works. Running tests through npm test results in:

160 passing (16s)

... so that's a good start.

I don't know yet what exactly is going wrong, but will investigate later. Wanted to at least report my findings so far here 😊

Would love to get node-sqlcipher to build/run on Windows arm64 and have a device (Surface Pro X) at hand for testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions