atom/node-keytar

Wrong prebuild architecture published for electron linux arm64

joaomoreno opened this issue · 3 comments

Description

All Electron ARM64 bits have the wrong target: they are targeting ia32.

Steps to Reproduce

$ wget https://github.com/atom/node-keytar/releases/download/v7.2.0/keytar-v7.2.0-electron-v75-linux-arm64.tar.gz
--2021-01-27 16:16:45--  https://github.com/atom/node-keytar/releases/download/v7.2.0/keytar-v7.2.0-electron-v75-linux-arm64.tar.gz
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/9682834/2be33d00-2a8d-11eb-9fc2-608a91a8c294?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210127T151644Z&X-Amz-Expires=300&X-Amz-Signature=e1ab174f0dd2a43ccdb1448108b877be68884dd80f22da708d64ffb5a59016b8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9682834&response-content-disposition=attachment%3B%20filename%3Dkeytar-v7.2.0-electron-v75-linux-arm64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2021-01-27 16:16:45--  https://github-production-release-asset-2e65be.s3.amazonaws.com/9682834/2be33d00-2a8d-11eb-9fc2-608a91a8c294?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210127T151644Z&X-Amz-Expires=300&X-Amz-Signature=e1ab174f0dd2a43ccdb1448108b877be68884dd80f22da708d64ffb5a59016b8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9682834&response-content-disposition=attachment%3B%20filename%3Dkeytar-v7.2.0-electron-v75-linux-arm64.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.238.91
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.238.91|:443... connected.
taHTTP request sent, awaiting response... r 200 OK
Length: 25129 (25K) [application/octet-stream]
Saving to: ‘keytar-v7.2.0-electron-v75-linux-arm64.tar.gz’

keytar-v7.2.0-electron-v75-linux-arm64.tar.gz                            100%[================================================================================================================================================================================>]  24.54K  --.-KB/s    in 0.1s

2021-01-27 16:16:46 (256 KB/s) - ‘keytar-v7.2.0-electron-v75-linux-arm64.tar.gz’ saved [25129/25129]

$ tar xvzf keytar-v7.2.0-electron-v75-linux-arm64.tar.gz
build/Release/keytar.node
$ file build/Release/keytar.node
build/Release/keytar.node: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=29161f0c2a6a7b8007765e15efb1b85cab773035, stripped

Versions

v7.2.0

Additional Information

Downstream issue: microsoft/vscode#113467

Ugh, guess I need to back this out further. cc @dennisameling for 👀 and 💭

That's weird - let me have a look in the coming hour to see if we can either 1) fix the architecture 2) rollback arm64 altogether for now

Found the issue. Turns out cross-compilation doesn't work for non-Windows platforms in node-gyp, sorry about that. config.gypi etc. correctly mentions target_arch=arm64 and happily compiles, but the generated binary is x86 as mentioned in this issue. Should be fixed in #349, which builds the arm64 prebuild on an arm64 host, like lovell/sharp does as well. Waiting for Travis to run. Can confirm that building locally on an arm64 host (Surface Pro X WSL2) fixes this issue:

$ file build/Release/keytar.node
build/Release/keytar.node: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f6d1a7a785ae195f70853351fb27eecba1d10b0b, stripped