-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Milestone
Description
node-pty@1.2.0-beta.2 ships with a prebuilt binary for linux-arm64, but unfortunately it doesn’t work because it’s actually an x86-64 binary.
❯ file node_modules/node-pty/prebuilds/*/pty.node
node_modules/node-pty/prebuilds/darwin-arm64/pty.node: Mach-O 64-bit bundle arm64
node_modules/node-pty/prebuilds/darwin-x64/pty.node: Mach-O 64-bit bundle x86_64
node_modules/node-pty/prebuilds/linux-arm64/pty.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=9e27bfed53a8a0c4bd32668732638b8d70309795, not stripped
node_modules/node-pty/prebuilds/linux-x64/pty.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=f57211b22947c87ac6934de7f75c12dd37bcec7e, not stripped
node_modules/node-pty/prebuilds/win32-arm64/pty.node: PE32+ executable (DLL) (GUI) Aarch64, for MS Windows
node_modules/node-pty/prebuilds/win32-x64/pty.node: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
Notice how the file command recognizes that the binaries for macOS and Windows ARM actually are arm64/Aarch64 binaries. But for Linux it says that the one for arm64 is actually an x86-64 binary.
Here’s the failure:
https://github.com/lydell/node-pty-smoke-test/actions/runs/20697090233/job/59413955229
❯ node test.js
/home/runner/work/node-pty-smoke-test/node-pty-smoke-test/node_modules/node-pty/lib/utils.js:36
throw new Error("Failed to load native module: " + name + ".node, checked: " + dirs.join(', ') + ": " + lastError);
^
Error: Failed to load native module: pty.node, checked: build/Release, build/Debug, prebuilds/linux-arm64: Error: Cannot find module './prebuilds/linux-arm64//pty.node'
Require stack:
- /home/runner/work/node-pty-smoke-test/node-pty-smoke-test/node_modules/node-pty/lib/utils.js
- /home/runner/work/node-pty-smoke-test/node-pty-smoke-test/node_modules/node-pty/lib/index.js
at Object.loadNativeModule (/home/runner/work/node-pty-smoke-test/node-pty-smoke-test/node_modules/node-pty/lib/utils.js:36:11)
at Object.<anonymous> (/home/runner/work/node-pty-smoke-test/node-pty-smoke-test/node_modules/node-pty/lib/unixTerminal.js:27:22)
at Module._compile (node:internal/modules/cjs/loader:1761:14)
at Object..js (node:internal/modules/cjs/loader:1893:10)
at Module.load (node:internal/modules/cjs/loader:1481:32)
at Module._load (node:internal/modules/cjs/loader:1300:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.require (node:internal/modules/cjs/loader:1504:12)
at require (node:internal/modules/helpers:152:16)
- The file does exist.
- There’s a double slash in
'./prebuilds/linux-arm64//pty.node', but it works on the other platforms. - I tried marking the file as executable but it didn’t help.
- The error message says “Cannot find module” but I’m pretty sure the real error is the binary format.
- I’m not sure, but this might be fixed by: Fix linux arm compiling and add CI for cross-compiled builds #857
Frulfump and devm33
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug