Termux LD_PRELOAD from termux-exec makes all-features jsh fail at startup #73

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

On Termux, LD_PRELOAD is commonly set to $PREFIX/lib/libtermux-exec-ld-preload.so. The all-features Android jsh-android binary fails before running commands because embedded sed/pcre2 rejects production dynamic-loader override variables:

Exception in sed/pcre2: production dynamic-loader override variables are not accepted with irritant "LD_PRELOAD"

Smoke result:

  • ./jsh-android -c "echo smoke-ok" fails in the normal Termux environment.
  • env -u LD_PRELOAD ./jsh-android -c "echo smoke-ok" succeeds once the missing boot modules are embedded.

Expected: the Android/Termux build should either allow the known Termux termux-exec preload path or sanitize/handle it before sed/pcre2 initialization.
Actual: the raw binary fails in a default Termux shell environment.

On Termux, `LD_PRELOAD` is commonly set to `$PREFIX/lib/libtermux-exec-ld-preload.so`. The all-features Android `jsh-android` binary fails before running commands because embedded sed/pcre2 rejects production dynamic-loader override variables: ``` Exception in sed/pcre2: production dynamic-loader override variables are not accepted with irritant "LD_PRELOAD" ``` Smoke result: - `./jsh-android -c "echo smoke-ok"` fails in the normal Termux environment. - `env -u LD_PRELOAD ./jsh-android -c "echo smoke-ok"` succeeds once the missing boot modules are embedded. Expected: the Android/Termux build should either allow the known Termux `termux-exec` preload path or sanitize/handle it before sed/pcre2 initialization. Actual: the raw binary fails in a default Termux shell environment.
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#73
No description provided.