From e73410210479a3d56406ca8dcc341834b6d60278 Mon Sep 17 00:00:00 2001 From: Hermes Date: Fri, 19 Jun 2026 12:20:44 -0400 Subject: [PATCH] =?UTF-8?q?uConsole:=20remove=20clamav=20(cross-compile=20?= =?UTF-8?q?failure=20=E2=80=94=20cmake=20try=5Frun=20+=20Rust=20proc-macro?= =?UTF-8?q?=20linker)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 22 +++++++--------------- hosts/uconsole-cm5/configuration.nix | 13 ++++++------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/flake.nix b/flake.nix index 51af370..d4c17b9 100644 --- a/flake.nix +++ b/flake.nix @@ -116,6 +116,12 @@ # during codegen (preload_nlua.lua). No clean override option. # Fix: remove from system packages + install via native build # once uConsole is set up as remote builder. +# +# clamav: +# cmake try_run() + Rust proc-macro can't find native linker in +# cross-compile (cc crate uses cross CC, no cc in PATH for build +# scripts). Chain: clamav → system-path → etc → dbus → polkit. +# Fix: remove from system packages; clamscan available from server. # # ==== Remote builder setup (bidirectional) — TODO ==== @@ -184,21 +190,7 @@ (x: x?pname && x.pname != "perl-ldap") (old.propagatedBuildInputs or []); }); - # clamav try_run fails cross-compile (cmake modules all use the same - # generic `test_run_result` cache variable name for FD passing, uname - # POSIX, struct packing, and signed right-shift checks). - # On aarch64 Linux (glibc + GCC) all four return 0, so pre-set it. - clamav = prev.clamav.overrideAttrs (old: { - cmakeFlags = (old.cmakeFlags or []) ++ [ - "-Dtest_run_result=0" - "-Dtest_run_result__TRYRUN_OUTPUT=" - ]; - # Give cargo access to a native C compiler for Rust build script - # compilations (proc-macros run on the BUILD host, not the target). - nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ - prev.buildPackages.gcc - ]; - }); + # clamav: removed from system packages (see note above). }; uconsoleRpiPipewireOverlay = final: prev: { diff --git a/hosts/uconsole-cm5/configuration.nix b/hosts/uconsole-cm5/configuration.nix index 211820b..6e3de95 100644 --- a/hosts/uconsole-cm5/configuration.nix +++ b/hosts/uconsole-cm5/configuration.nix @@ -197,12 +197,11 @@ # Enable remote builder (distributed build via lazyworkhorse server) services.remoteBuilder.enable = true; - # ============================================================ - # ClamAV antivirus — daily automatic scans - # ============================================================ - gortium.clamav = { - enable = true; - enableDaemon = false; - }; + # ClamAV REMOVED — cross-compile failure (try_run + Rust linker) + # clamscan available from server when needed. + # gortium.clamav = { + # enable = true; + # enableDaemon = false; + # }; }