Termux Android build hits shell and libc portability assumptions in extras patches #77

Open
opened 2026-09-12 01:48:08 -04:00 by ober · 0 comments
Owner

Two smaller Termux/Android build blockers came up while getting all-features jsh-android to build on-device:

  1. support/patch-extras-build.sh invokes tools/apply-vendor-overrides.sh with sh, but that script uses bash-specific syntax. Local workaround was to invoke it with bash.
  2. jerboa-sed/support/secure-inplace.c used the generic __linux__ path on Android. Android/Bionic did not support that path cleanly; local workaround was to use #elif defined(__linux__) && !defined(__ANDROID__) so Android falls back to /dev/urandom.

Expected: Termux/Android builds should use bash for bash scripts and avoid full-Linux libc assumptions when __ANDROID__ is defined.
Actual: both assumptions blocked the on-device build until patched locally.

Two smaller Termux/Android build blockers came up while getting all-features `jsh-android` to build on-device: 1. `support/patch-extras-build.sh` invokes `tools/apply-vendor-overrides.sh` with `sh`, but that script uses bash-specific syntax. Local workaround was to invoke it with `bash`. 2. `jerboa-sed/support/secure-inplace.c` used the generic `__linux__` path on Android. Android/Bionic did not support that path cleanly; local workaround was to use `#elif defined(__linux__) && !defined(__ANDROID__)` so Android falls back to `/dev/urandom`. Expected: Termux/Android builds should use bash for bash scripts and avoid full-Linux libc assumptions when `__ANDROID__` is defined. Actual: both assumptions blocked the on-device build until patched locally.
Sign in to join this conversation.
No labels
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
ober/jerboa-shell#77
No description provided.