From 95445e92528439059182126478c7a20a6201fa39 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Thu, 16 Apr 2026 14:34:05 -0300 Subject: [PATCH] lesavka: verify client build toolchain --- scripts/install/client.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/install/client.sh b/scripts/install/client.sh index e86de01..3a1b2f2 100755 --- a/scripts/install/client.sh +++ b/scripts/install/client.sh @@ -26,6 +26,16 @@ require_command() { exit 1 } +require_linkable() { + local path=$1 + local label=$2 + if ldd "$path" 2>/dev/null | grep -q 'not found'; then + echo "❌ $label is present but has unresolved shared-library dependencies:" >&2 + ldd "$path" 2>/dev/null | grep 'not found' >&2 || true + exit 1 + fi +} + run_as_user() { sudo -u "$ORIG_USER" env HOME="$USER_HOME" SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-}" "$@" } @@ -42,7 +52,7 @@ log "1. Installing base packages" # tightly versioned PipeWire packages, and Lesavka should not force an audio # stack upgrade just to install the client. sudo pacman -Sq --needed --noconfirm \ - git rustup protobuf abseil-cpp gcc clang evtest base-devel libpulse \ + git rustup protobuf abseil-cpp gcc clang llvm-libs compiler-rt evtest base-devel libpulse \ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav \ wmctrl qt6-tools wl-clipboard xclip xsel desktop-file-utils @@ -77,12 +87,18 @@ log "1d. Verifying runtime tools" require_command pactl "libpulse" require_command wmctrl "wmctrl" require_command qdbus6 "qt6-tools" +require_command protoc "protobuf" if ! command -v wl-paste >/dev/null 2>&1 \ && ! command -v xclip >/dev/null 2>&1 \ && ! command -v xsel >/dev/null 2>&1; then echo "❌ no clipboard reader found after install (expected one of wl-clipboard/xclip/xsel)" >&2 exit 1 fi +require_linkable "$(command -v protoc)" "protoc" +if [[ -e /usr/lib/libclang.so ]]; then + require_linkable /usr/lib/libclang.so "libclang" +fi +protoc --version >/dev/null if ! run_as_user pactl info >/dev/null 2>&1; then echo "⚠️ pactl is installed, but no PulseAudio/PipeWire Pulse server is reachable right now." echo " Lesavka will still install, but local speaker/mic staging may stay empty until the host audio session is up."