Pin the jolt the APK needs
An upstream jolt cannot open a TLS connection on Android: `jolt.mvn-http` reads the socket address out of `struct addrinfo` at glibc's offset, which is Bionic's `ai_canonname` — a null pointer — so every connect fails and the loop reports a refusal the network never made. An APK built with one cannot sign in, cannot fetch a picture, and cannot send one. So the Android build takes its jolt from the fork carrying that fix, the way it already takes buck2 and rustc: DotSlash fetches it by digest, and `JOLT=` still overrides for anyone who wants their own. The binary is linked against static lz4, zlib and ncurses so it carries no runpath into the machine that built it. Nothing else on the desktop side changes — `just run` is still whatever jolt is on PATH. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2308a7e parent: 81efdfb modified
android/build-jolt-boot.sh +6 -1 | @@ -9,7 +9,12 @@ VIDYA="${VIDYA:-$(cd "$ROOT/../vidya" && pwd)}" | ||
| 9 | 9 | # has to be named here. |
| 10 | 10 | GLIMMER="${GLIMMER:-$HOME/.jolt/gitlibs/https___github.com_jolt-lang_glimmer/5581c331c51aff989259b9e8e92ec920fe5e6741/src}" |
| 11 | 11 | OUT="${1:?usage: build-jolt-boot.sh OUTPUT_DIRECTORY}" |
| 12 | -JOLT="${JOLT:-$(command -v jolt)}" | |
| 12 | +# The DotSlash-pinned jolt beside this script, not whatever is on PATH: an | |
| 13 | +# upstream jolt cannot open a TLS connection on Android — it reads the socket | |
| 14 | +# address out of `struct addrinfo` at glibc's offset, which is Bionic's | |
| 15 | +# `ai_canonname` — so a build made with one produces an APK that cannot sign in | |
| 16 | +# or send a picture. Override with JOLT= to use another. | |
| 17 | +JOLT="${JOLT:-$ROOT/scripts/jolt}" | |
| 13 | 18 | MODULE="${MODULE:-frq.app}" |
| 14 | 19 | CHEZ_ANDROID="${CHEZ_ANDROID:-$HOME/.cache/vidya-chez-android}" |
| 15 | 20 | HOST_SCHEME="$CHEZ_ANDROID/ta6le/bin/ta6le/scheme" |
| @@ -9,7 +9,12 @@ VIDYA="${VIDYA:-$(cd "$ROOT/../vidya" && pwd)}" | |||
| 9 | # has to be named here. | 9 | # has to be named here. |
| 10 | GLIMMER="${GLIMMER:-$HOME/.jolt/gitlibs/https___github.com_jolt-lang_glimmer/5581c331c51aff989259b9e8e92ec920fe5e6741/src}" | 10 | GLIMMER="${GLIMMER:-$HOME/.jolt/gitlibs/https___github.com_jolt-lang_glimmer/5581c331c51aff989259b9e8e92ec920fe5e6741/src}" |
| 11 | OUT="${1:?usage: build-jolt-boot.sh OUTPUT_DIRECTORY}" | 11 | OUT="${1:?usage: build-jolt-boot.sh OUTPUT_DIRECTORY}" |
| 12 | -JOLT="${JOLT:-$(command -v jolt)}" | 12 | +# The DotSlash-pinned jolt beside this script, not whatever is on PATH: an |
| 13 | +# upstream jolt cannot open a TLS connection on Android — it reads the socket | ||
| 14 | +# address out of `struct addrinfo` at glibc's offset, which is Bionic's | ||
| 15 | +# `ai_canonname` — so a build made with one produces an APK that cannot sign in | ||
| 16 | +# or send a picture. Override with JOLT= to use another. | ||
| 17 | +JOLT="${JOLT:-$ROOT/scripts/jolt}" | ||
| 13 | MODULE="${MODULE:-frq.app}" | 18 | MODULE="${MODULE:-frq.app}" |
| 14 | CHEZ_ANDROID="${CHEZ_ANDROID:-$HOME/.cache/vidya-chez-android}" | 19 | CHEZ_ANDROID="${CHEZ_ANDROID:-$HOME/.cache/vidya-chez-android}" |
| 15 | HOST_SCHEME="$CHEZ_ANDROID/ta6le/bin/ta6le/scheme" | 20 | HOST_SCHEME="$CHEZ_ANDROID/ta6le/bin/ta6le/scheme" |
added
scripts/jolt +28 -0 | new file mode 100755 | ||
| @@ -0,0 +1,28 @@ | ||
| 1 | +#!/usr/bin/env dotslash | |
| 2 | + | |
| 3 | +// jolt with the Bionic `struct addrinfo` fix, from the fork at | |
| 4 | +// gitlab.com/nandithebull/jolt (commit 2b80d68d). Upstream's own release reads | |
| 5 | +// `ai_addr` at glibc's offset, which on Android is `ai_canonname` — a null | |
| 6 | +// pointer — so every TLS connect fails there and reports a refusal the network | |
| 7 | +// never made. Nothing else differs from v0.7.28. | |
| 8 | +// | |
| 9 | +// Linux x86_64 only: it is what the APK is built on. Other platforms fall back | |
| 10 | +// to whatever `jolt` is on PATH, which is upstream's, which is fine for | |
| 11 | +// everything but an Android build. | |
| 12 | +{ | |
| 13 | + "name": "jolt", | |
| 14 | + "platforms": { | |
| 15 | + "linux-x86_64": { | |
| 16 | + "size": 15782379, | |
| 17 | + "hash": "sha256", | |
| 18 | + "digest": "aabb71f809aebd9d607b7a5036229f933c733ae90785cb29df899f116be9589f", | |
| 19 | + "format": "tar.gz", | |
| 20 | + "path": "jolt-v0.7.28-1-g2b80d68d-x86_64-linux/jolt", | |
| 21 | + "providers": [ | |
| 22 | + { | |
| 23 | + "url": "https://gitlab.com/nandithebull/jolt/-/releases/v0.7.28-android/downloads/jolt-v0.7.28-1-g2b80d68d-x86_64-linux.tar.gz" | |
| 24 | + } | |
| 25 | + ] | |
| 26 | + } | |
| 27 | + } | |
| 28 | +} | |
| new file mode 100755 | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | +#!/usr/bin/env dotslash | ||
| 2 | + | ||
| 3 | +// jolt with the Bionic `struct addrinfo` fix, from the fork at | ||
| 4 | +// gitlab.com/nandithebull/jolt (commit 2b80d68d). Upstream's own release reads | ||
| 5 | +// `ai_addr` at glibc's offset, which on Android is `ai_canonname` — a null | ||
| 6 | +// pointer — so every TLS connect fails there and reports a refusal the network | ||
| 7 | +// never made. Nothing else differs from v0.7.28. | ||
| 8 | +// | ||
| 9 | +// Linux x86_64 only: it is what the APK is built on. Other platforms fall back | ||
| 10 | +// to whatever `jolt` is on PATH, which is upstream's, which is fine for | ||
| 11 | +// everything but an Android build. | ||
| 12 | +{ | ||
| 13 | + "name": "jolt", | ||
| 14 | + "platforms": { | ||
| 15 | + "linux-x86_64": { | ||
| 16 | + "size": 15782379, | ||
| 17 | + "hash": "sha256", | ||
| 18 | + "digest": "aabb71f809aebd9d607b7a5036229f933c733ae90785cb29df899f116be9589f", | ||
| 19 | + "format": "tar.gz", | ||
| 20 | + "path": "jolt-v0.7.28-1-g2b80d68d-x86_64-linux/jolt", | ||
| 21 | + "providers": [ | ||
| 22 | + { | ||
| 23 | + "url": "https://gitlab.com/nandithebull/jolt/-/releases/v0.7.28-android/downloads/jolt-v0.7.28-1-g2b80d68d-x86_64-linux.tar.gz" | ||
| 24 | + } | ||
| 25 | + ] | ||
| 26 | + } | ||
| 27 | + } | ||
| 28 | +} | ||