Description
While trying to add Windows arm64 support to GitHub Desktop, I came across some issues with the NodeJS Windows arm64 binaries. The Electron part of the app works fine, as they've been supporting Windows arm64 for a while (e.g. http://electronjs.org/headers/v9.3.1/win-arm64/node.lib).
The last NodeJS release that had unofficial arm64 builds was 12.15.0: https://unofficial-builds.nodejs.org/download/release/v12.15.0/win-arm64/, all versions after that don't have a win-arm64
folder anymore.
gyp http 404 https://nodejs.org/download/release/v12.18.4/win-arm64/node.lib
Even in the latest 14.13.0: no trace of Windows arm64. (https://unofficial-builds.nodejs.org/download/release/v14.13.0/ and https://nodejs.org/download/release/v14.13.0/). Cross-compilation support for Windows arm64 was restored in nodejs/node#32867, but since then no new builds have been released.
error D:\repos\desktop\node_modules\keytar: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: D:\repos\desktop\node_modules\keytar
Output:
prebuild-install WARN install No prebuilt binaries found (target=12.18.4 runtime=node arch=arm64 libc= platform=win32)
D:\repos\desktop\node_modules\keytar>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node ""C:\Users\Dennis\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js"" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@12.18.4 | win32 | x64
gyp info find Python using Python version 3.7.3 found at "C:\Program Files\Python37\python.exe"
gyp http GET https://nodejs.org/download/release/v12.18.4/node-v12.18.4-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v12.18.4/node-v12.18.4-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v12.18.4/SHASUMS256.txt
gyp http GET https://nodejs.org/download/release/v12.18.4/win-x86/node.lib
gyp http GET https://nodejs.org/download/release/v12.18.4/win-x64/node.lib
gyp http GET https://nodejs.org/download/release/v12.18.4/win-arm64/node.lib
gyp http 200 https://nodejs.org/download/release/v12.18.4/SHASUMS256.txt
gyp http 404 https://nodejs.org/download/release/v12.18.4/win-arm64/node.lib
gyp http 200 https://nodejs.org/download/release/v12.18.4/win-x86/node.lib
gyp http 200 https://nodejs.org/download/release/v12.18.4/win-x64/node.lib
gyp info find VS using VS2019 (16.7.30503.244) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Program Files\Python37\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\Dennis\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'D:\\repos\\desktop\\node_modules\\keytar\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Dennis\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Dennis\\AppData\\Local\\node-gyp\\Cache\\12.18.4\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Dennis\\AppData\\Local\\node-gyp\\Cache\\12.18.4',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Dennis\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\Dennis\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\12.18.4\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=D:\\repos\\desktop\\node_modules\\keytar',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'D:\\repos\\desktop\\node_modules\\keytar\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=ARM64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
async.cc
main.cc
keytar_win.cc
win_delay_load_hook.cc
LINK : fatal error LNK1181: cannot open input file 'C:\\Users\\Dennis\\AppData\\Local\\node-gyp\\Cache\\12.18.4\\arm64\\node.lib' [D:\repos\desktop\node_modules\keytar\build\keytar.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:\Users\Dennis\AppData\Roaming\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:275:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Dennis\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\repos\desktop\node_modules\keytar
Are there any blockers to start releasing Windows arm64 builds for NodeJS? AFAIK we should be good to go:
- jenkins: add ARM64 Windows #2408 is merged (add arm64 to Jenkins)
- build: move compiling for Windows ARM64 to Tier 2 node#34721 is merged (move Windows arm64 to Tier 2 support)
According to nodejs/node#25998 (comment):
The next step is to update the job used for unofficial releases and start publishing them again. Note that for now there will be no MSI because WiX 3.14 is not yet released, but as soon as it is we should get the MSI as well.
Please let me know if I can be of any help. Very eager to help open source projects get arm64 support to the Windows platform soon 😊