Skip to content

build(fuse): support static compilation for curvine-fuse#616

Draft
shuoranliu wants to merge 1 commit intoCurvineIO:mainfrom
shuoranliu:build-static-fuse
Draft

build(fuse): support static compilation for curvine-fuse#616
shuoranliu wants to merge 1 commit intoCurvineIO:mainfrom
shuoranliu:build-static-fuse

Conversation

@shuoranliu
Copy link
Contributor

  • Add server feature to curvine-common to make rocksdb, raft, flate2 optional dependencies (only needed for master/worker nodes)
  • Move RaftPeer and NodeId to conf module to avoid circular dependencies
  • Add static feature to curvine-fuse to skip libfuse pkg-config check
  • Fix musl libc compatibility issues in orpc and curvine-fuse:
    • Handle TMPFS_MAGIC type difference (musl: i64, glibc: u64)
    • Handle ioctl request param type difference (musl: i32, glibc: u64)
    • Handle request_code_read! macro return type difference

This enables building a fully static curvine-fuse binary using musl:
cargo build --release --target x86_64-unknown-linux-musl
-p curvine-fuse --features static --no-default-features

@shuoranliu shuoranliu force-pushed the build-static-fuse branch 4 times, most recently from ee2bf51 to 1d991de Compare January 28, 2026 06:56
@shuoranliu shuoranliu marked this pull request as draft February 4, 2026 11:39
Add `static` feature to skip pkg-config FUSE library check during build,
enabling static compilation with glibc using `+crt-static` target feature.

Replace NSS-dependent functions (getpwnam, getpwuid, getgrnam, getgrgid)
with direct /etc/passwd and /etc/group file parsing to avoid dynamic
loading of NSS modules which causes assertion failures with static glibc.

cargo rustc --release -p curvine-fuse --features static--bin curvine-fuse -- -C target-feature=+crt-static

Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant