jetsom compile

This commit is contained in:
awe
2026-09-17 19:26:22 +03:00
parent e202f57ef8
commit fa9da949df
4 changed files with 69 additions and 8 deletions
+17 -2
View File
@@ -225,14 +225,29 @@ run_privileged() {
}
ensure_system_dependencies() {
if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists libusb-1.0; then
# Qt >= 6.5 xcb platform plugin needs libxcb-cursor0; aarch64/Jetson images
# (and some minimal desktops) ship without it, and the GUI then dies at
# startup with "could not load the Qt platform plugin xcb". apt-only: other
# distros/managers name these differently and usually have them preinstalled.
local qt_gui_packages_missing=0
if command -v apt-get >/dev/null 2>&1 && command -v dpkg-query >/dev/null 2>&1; then
local package
for package in libxcb-cursor0 libxkbcommon-x11-0; do
if ! dpkg-query -W -f='${Status}' "${package}" 2>/dev/null | grep -q "install ok installed"; then
qt_gui_packages_missing=1
fi
done
fi
if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists libusb-1.0 \
&& ((qt_gui_packages_missing == 0)); then
return
fi
echo "[start.sh] Installing system dependency: libusb-1.0 dev headers..."
if command -v apt-get >/dev/null 2>&1; then
run_privileged apt-get update
run_privileged apt-get install -y pkg-config libusb-1.0-0-dev
run_privileged apt-get install -y pkg-config libusb-1.0-0-dev libxcb-cursor0 libxkbcommon-x11-0
elif command -v dnf >/dev/null 2>&1; then
run_privileged dnf install -y pkgconf-pkg-config libusb1-devel
elif command -v yum >/dev/null 2>&1; then