From 11cd35590c4c259bf9b50a7c774bd99548896259 Mon Sep 17 00:00:00 2001 From: Pedram Amini Date: Tue, 23 Dec 2025 13:27:15 -0600 Subject: [PATCH] fix: add build-essential and Python 3.11 for Linux ARM64 node-pty compilation Fixes #75 - Linux ARM64 builds were failing because: 1. Missing build-essential (gcc, g++, make) needed to compile node-pty 2. Missing Python 3.11 for node-gyp (Python 3.12+ removed distutils) Also adds architecture verification step that fails early if node-pty is incorrectly built for x86_64 instead of ARM64. --- .github/workflows/release.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4231c754..5bf96470 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,11 +53,19 @@ jobs: sudo apt-get install -y libarchive-tools rpm # Linux ARM64: Install build dependencies for native modules and electron-builder + # Requires build-essential for compiling node-pty native module - name: Install Linux ARM64 build dependencies if: matrix.platform == 'linux-arm64' run: | sudo apt-get update - sudo apt-get install -y libarchive-tools rpm + sudo apt-get install -y libarchive-tools rpm build-essential + + # Linux ARM64: Setup Python 3.11 for node-gyp (Python 3.12+ removed distutils) + - name: Setup Python for node-gyp (Linux ARM64) + if: matrix.platform == 'linux-arm64' + uses: actions/setup-python@v5 + with: + python-version: '3.11' # Windows: Setup for native module compilation - name: Setup Windows build tools @@ -111,6 +119,27 @@ jobs: env: npm_config_build_from_source: true + # Verify native module architecture (Linux ARM64 only) + - name: Verify node-pty architecture + if: matrix.platform == 'linux-arm64' + run: | + echo "Checking node-pty binary architecture..." + PTY_PATH=$(find node_modules/node-pty -name "pty.node" -type f 2>/dev/null | head -1) + if [ -n "$PTY_PATH" ]; then + file "$PTY_PATH" + # Verify it's ARM64, not x86_64 + if file "$PTY_PATH" | grep -q "ARM aarch64\|aarch64"; then + echo "✓ node-pty is correctly built for ARM64" + else + echo "✗ ERROR: node-pty is NOT built for ARM64!" + file "$PTY_PATH" + exit 1 + fi + else + echo "✗ ERROR: node-pty binary not found!" + exit 1 + fi + - name: Build application run: npm run build env: