From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id B5DED1FF0C1 for ; Fri, 18 Sep 2026 16:42:45 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 6361A21625; Fri, 18 Sep 2026 16:42:12 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com Subject: [PATCH pve-cluster 05/10] buildsys: link pmxcfs against the rust notify staticlib Date: Fri, 18 Sep 2026 16:41:47 +0200 Message-ID: <20260918144152.575163-6-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260918144152.575163-1-h.laimer@proxmox.com> References: <20260918144152.575163-1-h.laimer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789742528317 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.491 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4776HR3BA5MCETSJLU3TKG5YVG4UGHM5 X-Message-ID-Hash: 4776HR3BA5MCETSJLU3TKG5YVG4UGHM5 X-MailFrom: h.laimer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Only the daemon binary links the Rust staticlib, while the database tools and the unit tests keep linking the plain C convenience library. Building it from here as well keeps a standalone make in src/pmxcfs working and picks up Rust changes without a manual step. Signed-off-by: Hannes Laimer --- src/pmxcfs/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/pmxcfs/Makefile b/src/pmxcfs/Makefile index 90bc6a5..981171e 100644 --- a/src/pmxcfs/Makefile +++ b/src/pmxcfs/Makefile @@ -12,6 +12,10 @@ CFLAGS += -I../rust/pmxcfs-ffi/include LDFLAGS += -Wl,-z,relro $(shell pkg-config --libs $(DEPENDENCIES)) +NOTIFY_LIB := ../rust/target/release/libpmxcfs_ffi.a +# from `cargo rustc -p pmxcfs-ffi --release -- --print native-static-libs` +NOTIFY_LIBS := -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc + AR = ar ARFLAGS = crs @@ -26,8 +30,14 @@ libpmxcfs.a: cfs-utils.o memdb.o database.o libpmxcfs.a: $(AR) $(ARFLAGS) $@ $^ -pmxcfs: pmxcfs.o libpmxcfs.a - $(CC) -o $@ $^ $(LDFLAGS) +pmxcfs: pmxcfs.o libpmxcfs.a $(NOTIFY_LIB) + $(CC) -o $@ $^ $(LDFLAGS) $(NOTIFY_LIBS) + +$(NOTIFY_LIB): FORCE + $(MAKE) -C ../rust all + +.PHONY: FORCE +FORCE: create_pmxcfs_db: create_pmxcfs_db.o libpmxcfs.a -- 2.47.3