From: Hannes Laimer <h.laimer@proxmox.com>
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 [thread overview]
Message-ID: <20260918144152.575163-6-h.laimer@proxmox.com> (raw)
In-Reply-To: <20260918144152.575163-1-h.laimer@proxmox.com>
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 <h.laimer@proxmox.com>
---
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
next prev parent reply other threads:[~2026-09-18 14:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 14:41 [RFC cluster/manager 00/10] pmxcfs: add a change notification socket Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 01/10] buildsys: add rust workspace under src/rust Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 02/10] rust: notify: add change notification socket server Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 03/10] rust: ffi: add C ABI staticlib for pmxcfs Hannes Laimer
2026-09-21 9:57 ` Robert Obkircher
2026-09-18 14:41 ` [PATCH pve-cluster 04/10] pmxcfs: memdb: add change notification hook Hannes Laimer
2026-09-18 14:41 ` Hannes Laimer [this message]
2026-09-18 14:41 ` [PATCH pve-cluster 06/10] pmxcfs: notify: emit change events over the notification socket Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 07/10] cfs: add perl client for the change " Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 08/10] cfs: add hook registry for change notification consumers Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-manager 09/10] hooks: add runner executing cluster change hooks in children Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-manager 10/10] pvescheduler: run cluster change hooks from a listener child Hannes Laimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260918144152.575163-6-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.