Owner of platform runtime ordering after trailing C/C++ static archives on aarch64 Linux
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Start by reading the issue’s reference cc_library and Rust targets, then compare the trailing archive and runtime library ordering in the rules_rust link arguments. The report confirms the workaround on a pinned ARM64 executor but says the original failure came from a full native archive and has no current upstream reproduction. Establish a minimal regression and determine which linking layer owns the ordering before proposing a fix.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On aarch64 Linux with rules_rust 0.74.0, a native static archive reached through a Rust rlib can appear in the trailing C/C++ linker arguments, after rustc's system libraries. Our distribution binaries then failed to resolve aarch64 outline-atomic helpers and the loader's stack-protector guard from the archive. Repeating -lgcc -lc after the archive fixes our pinned downstream builds and exact-image startup.
We would like to remove that target-specific workaround rather than make the Cargo-graph emitter choose platform runtime libraries. Is the intended owner the C++ toolchain, the Rust native-dependency ordering, or a supported interface we have missed?
The reference shape is:
cc_library(
name = "atomics",
srcs = ["atomics.c"],
copts = ["-fstack-protector-all", "-moutline-atomics"],
)
rust_library(name = "shim", srcs = ["shim.rs"], edition = "2024", deps = [":atomics"])
rust_test(
name = "canary",
srcs = ["canary.rs"],
edition = "2024",
deps = [":shim"],
rustc_flags = ["-Clink-arg=-lgcc", "-Clink-arg=-lc"],
)
The C object uses a local character buffer with strncpy/strlen, __atomic_compare_exchange_n on a uint16_t, __atomic_fetch_or on a uint8_t, and __atomic_fetch_and on a uint32_t. The Rust shim owns the extern "C" reference in an rlib; the test calls the shim. This preserves the trailing-archive shape that our V8 objects use, without V8's additional Rust Temporal dependencies.
The shim control with the repeated libraries has been executed successfully on the pinned Linux ARM64 executor. The original failures came from the full native archive. I am not claiming an executed negative shim control or a reproduction on current upstream main. Existing discussion #2458 concerns incompatible unwind/runtime selection; this question concerns ordering with the admitted GNU toolchain. #1488 may be related to the longer-term linking owner.
Would you prefer a targeted rules_rust regression first, a toolchain-level recipe, or investigation in rustc? We will retain the downstream workaround until its full native linking behavior is established.
Assisted-by: OpenAI Codex
- Ngôn ngữ chính
- Starlark
- Star
- 857
- Fork
- 701
- Merge trung bình
- 4 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bazelbuild/rules_rust
-
`rust_test(crate = ...)` does not stage the crate's transitive dynamic libraries into runfilesCó thể đã có người làm @Wito-1 đã nhận 66 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
bazelbuild/rules_rust#4309 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Windows (no-symlink path): drain_runfiles_dir_windows deletes retained runfiles — inverted filename_suffixes_to_retain conditionCó thể đã có người làm @Mattbusel đã nhận 17 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
bazelbuild/rules_rust#4266 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
rust.toolchain(strip_level = ...) is silently ignoredCó thể đã có người làm @Mattbusel đã nhận 17 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
bazelbuild/rules_rust#4223 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
bazelbuild/rules_rust#4152 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
awaiting-response
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bazelbuild/rules_rust#3599 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của bazelbuild/rules_rust
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
bazelbuild/apple_support#707 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
blocky: new version 0.38.0Đang mởout-of-date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CachyOS/CachyOS-PKGBUILDS#2232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
blast/large refactor risk/low spend-dem
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
chriskelly/MusicWall#87 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
neilotoole/sq#1503 ·
Maintainer thường phản hồi trong vòng 1 ngày