From d4d099a0e41e165fea9825280959e16c27ddedb2 Mon Sep 17 00:00:00 2001 From: nandi Date: Wed, 25 Nov 2026 10:37:43 -0800 Subject: [PATCH] host-wasm: find pixi's libseat at runtime The login session starts chandra-host without the pixi environment, so the dynamic loader could not find libseat.so.1 and the session died before DRM. Record the pixi env's lib directory as an rpath on the host binary. Only the host gets it, so apps the compositor starts don't inherit it. Co-Authored-By: Claude Haiku 5.5 --- host-wasm/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/host-wasm/build.rs b/host-wasm/build.rs index 33ab998..6398e5e 100644 --- a/host-wasm/build.rs +++ b/host-wasm/build.rs @@ -12,6 +12,13 @@ fn main() { for lib in ["drm", "input", "seat", "xkbcommon", "udev"] { println!("cargo:rustc-link-lib={lib}"); } + // libseat comes from the pixi env (see pixi.toml). Record its lib dir in the binary so + // the login session finds it without LD_LIBRARY_PATH, which apps started by the + // compositor would inherit. + let pixi_lib = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../.pixi/envs/default/lib"); + if let Ok(dir) = pixi_lib.canonicalize() { + println!("cargo:rustc-link-arg-bins=-Wl,-rpath,{}", dir.display()); + } println!("cargo:rerun-if-changed=csrc/kms.c"); println!("cargo:rerun-if-changed=../compositor/kms/kms_stub.c"); }