Skip to content

Fix missing linux-aarch64 rust-pruner natives (issue #29) - #30

Draft
MagicJinn wants to merge 1 commit into
mainfrom
slop/linux-aarch64-native-build-ebe9
Draft

Fix missing linux-aarch64 rust-pruner natives (issue #29)#30
MagicJinn wants to merge 1 commit into
mainfrom
slop/linux-aarch64-native-build-ebe9

Conversation

@MagicJinn

Copy link
Copy Markdown
Owner

Problem

Fixes #29. On Linux ARM64 servers, backups fail with:

Missing native rust-pruner resource: /natives/linux-aarch64/librust_pruner.so

The Java loader already looks for linux-aarch64 when os.arch is aarch64/arm64, and rustNativeTargets lists the target, but CI never built or packaged that library.

Root cause

buildall.yml runs buildRust on each runner's host architecture only:

  • ubuntu-latestlinux-x86_64
  • windows-latestwindows-x86_64
  • macos-latestmacos-aarch64

No job produced linux-aarch64, so release jars (e.g. chronosbackups-26.x-1.1.0-fabric.jar) ship without it.

Note: the native library is used for world copy on all backup paths (not only when chunk pruning is enabled), so ARM64 Linux cannot run backups at all with current published builds.

Feasibility

Confirmed: cargo +nightly zigbuild --release --target aarch64-unknown-linux-gnu (and aarch64-unknown-linux-gnu.2.17 for old glibc) compiles successfully. Output is a valid ELF 64-bit ARM aarch64 shared object.

Changes

  • Add ubuntu-24.04-arm to the rust native CI matrix so linux-aarch64 is built natively and merged with other platform artifacts.
  • CI verification step ensures natives/linux-aarch64/librust_pruner.so is staged and present in fabric jars.
  • Extend Docker zigbuild cross-compile path for aarch64-unknown-linux-gnu when building from non-ARM hosts (e.g. -PchronosRustExtraTargets=linux-aarch64 on x86_64 with Docker).
  • README note that CI builds both Linux architectures.

Follow-up for users on 1.1.0

They need a new release built with this CI change. Until then, disabling pruning does not avoid the failure because copyWorldToCache also requires the native library.

Open in Web Open in Cursor 

GitHub Actions previously built rust-pruner only on the host architecture
of each runner (linux-x86_64 on ubuntu-latest), so published jars lacked
natives/linux-aarch64/librust_pruner.so and backups failed on ARM64 Linux
servers.

Add ubuntu-24.04-arm to the rust native matrix so linux-aarch64 is built
natively in CI, verify the library is staged and packaged, and extend Docker
zigbuild cross-compile support for aarch64-unknown-linux-gnu when building
from non-ARM hosts.

Co-authored-by: MagicJinn <MagicJinn@mail.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.

unable to backup with pruning on Arm64 servers

2 participants