nandi/jolt-nativepublic Fork 0
3b4eb6b
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Link the ALSA the media plane has been calling all along

The desktop libjoltmoq.so had 68 undefined `snd_pcm_*` symbols and no
DT_NEEDED on libasound: cpal's ALSA host is compiled in, and the library
it calls was never named. alsa-sys's build script asks pkg-config for it
and emits `cargo:rustc-link-lib=asound`; buck2 keeps a build script's
cfgs and drops its link directives, so the flags file came out without
it.

The same defect as aws-lc-sys and openh264-sys2, and the same two lines
fix it. What hid this one is that Android never touched it — cpal uses
its AAudio host there, not ALSA — so the release that fixed the phone
shipped a desktop object that could not be dlopened at all. Undefined
symbols are legal in a cdylib, and nothing had loaded one until frq
pinned this release and tried.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-08-31T23:13:30-07:00 Browse files
3b4eb6b parent: 807f681
modified third-party/rust/BUCK +2 -0
@@ -699,6 +699,8 @@ buildscript_run(
699699 "CARGO_PKG_VERSION_PRE": "",
700700 "OPT_LEVEL": "2",
701701 },
702+ rustc_link_lib = True,
703+ rustc_link_search = True,
702704 version = "0.4.0",
703705 )
704706
@@ -699,6 +699,8 @@ buildscript_run(
699 "CARGO_PKG_VERSION_PRE": "",699 "CARGO_PKG_VERSION_PRE": "",
700 "OPT_LEVEL": "2",700 "OPT_LEVEL": "2",
701 },701 },
702+ rustc_link_lib = True,
703+ rustc_link_search = True,
702 version = "0.4.0",704 version = "0.4.0",
703 )705 )
704 706
modified third-party/rust/fixups/alsa-sys/fixups.toml +12 -0
@@ -3,3 +3,15 @@
33 # cargo sets OPT_LEVEL for every build script; buck2 does not, and cc-rs and
44 # a number of configure scripts read it unconditionally.
55 env = { OPT_LEVEL = "2" }
6+
7+# And honour the build script's linking directives, the same as aws-lc-sys and
8+# openh264-sys2 — see the longer note in the first. This build script asks
9+# pkg-config for alsa and emits `cargo:rustc-link-lib=asound`; buck2 drops that
10+# by default, which left 68 `snd_pcm_*` symbols undefined in every buck2-built
11+# desktop libjoltmoq.so and no DT_NEEDED on libasound to resolve them with.
12+#
13+# Nothing on Android hit it — cpal uses its AAudio host there, not ALSA — so
14+# the release that fixed the same class of defect for the phone shipped a
15+# desktop object that still could not be dlopened at all.
16+rustc_link_lib = true
17+rustc_link_search = true
@@ -3,3 +3,15 @@
3 # cargo sets OPT_LEVEL for every build script; buck2 does not, and cc-rs and3 # cargo sets OPT_LEVEL for every build script; buck2 does not, and cc-rs and
4 # a number of configure scripts read it unconditionally.4 # a number of configure scripts read it unconditionally.
5 env = { OPT_LEVEL = "2" }5 env = { OPT_LEVEL = "2" }
6+
7+# And honour the build script's linking directives, the same as aws-lc-sys and
8+# openh264-sys2 — see the longer note in the first. This build script asks
9+# pkg-config for alsa and emits `cargo:rustc-link-lib=asound`; buck2 drops that
10+# by default, which left 68 `snd_pcm_*` symbols undefined in every buck2-built
11+# desktop libjoltmoq.so and no DT_NEEDED on libasound to resolve them with.
12+#
13+# Nothing on Android hit it — cpal uses its AAudio host there, not ALSA — so
14+# the release that fixed the same class of defect for the phone shipped a
15+# desktop object that still could not be dlopened at all.
16+rustc_link_lib = true
17+rustc_link_search = true