[GH-ISSUE #752] Termux/Android: Installation fails on sharp dependency and PWA build memory exhaustion #358

Closed
opened 2026-10-20 17:27:58 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @vanta-jack on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/752

Problem Description

The official start-termux.sh script currently fails to provide a 'one-click' installation experience on fresh Termux/Android environments due to three specific factors:

  1. Sharp Binary Mismatch: sharp v0.34+ does not provide pre-compiled binaries for android-arm64. Without wasm32 architecture support in .npmrc, it attempts to compile from source and fails due to missing NDK/toolchain dependencies.
  2. Interactive Prompt Hangs: The standard pkg update and pkg install commands in the script hang indefinitely when they encounter configuration file conflicts, requiring manual user intervention that isn't always visible.
  3. Build Memory Exhaustion: Generating the PWA service worker during vite build consistently causes Out-Of-Memory (OOM) errors on mobile devices with standard RAM (4GB-8GB).

Proposed Solution

  • Add dynamic wasm32 architecture injection to start-termux.sh to enable sharp's WASM fallback.
  • Use non-interactive flags (--force-confold) for pkg commands.
  • Ensure SKIP_PWA=1 is used as a fallback for the client build process.

I have a Pull Request ready that addresses these issues.

Originally created by @vanta-jack on GitHub (May 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/752 ### Problem Description The official `start-termux.sh` script currently fails to provide a 'one-click' installation experience on fresh Termux/Android environments due to three specific factors: 1. **Sharp Binary Mismatch**: `sharp` v0.34+ does not provide pre-compiled binaries for `android-arm64`. Without `wasm32` architecture support in `.npmrc`, it attempts to compile from source and fails due to missing NDK/toolchain dependencies. 2. **Interactive Prompt Hangs**: The standard `pkg update` and `pkg install` commands in the script hang indefinitely when they encounter configuration file conflicts, requiring manual user intervention that isn't always visible. 3. **Build Memory Exhaustion**: Generating the PWA service worker during `vite build` consistently causes Out-Of-Memory (OOM) errors on mobile devices with standard RAM (4GB-8GB). ### Proposed Solution - Add dynamic `wasm32` architecture injection to `start-termux.sh` to enable `sharp`'s WASM fallback. - Use non-interactive flags (`--force-confold`) for `pkg` commands. - Ensure `SKIP_PWA=1` is used as a fallback for the client build process. I have a Pull Request ready that addresses these issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#358
No description provided.