macOS libtool check no longer matches the apple_support archiver wrapper
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start by reading the archiver selection logic that checks whether the filename contains libtool, then trace how it sets AR and ARFLAGS for macOS builds. The report says the append bug is fixed upstream in apple_support#670 and that the upstream regression test covers two object batches; check the rules_rust behavior against that fix. Done means the wrapper works with the supported apple_support versions without dropping objects from multi batch archives.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
We hit this after updating apple_support from 2.9.1 to 2.10.1 on macOS arm64.
The build script runner still checks file_name.contains("libtool") before removing AR and ARFLAGS, but apple_support now calls the wrapper apple-support-ar-wrapper, so that check no longer matches.
The rename came with ar argument support in bazelbuild/apple_support#601, so using the wrapper is presumably intended now.
There is a bug in its append handling though: cc-rs adds object files in batches with ar cq / cqD, and the wrapper overwrites the archive on each call, losing earlier batches.
That showed up for us as undefined ring_core_0_17_14_* symbols when linking a SQLx proc-macro.
I've opened a fix on the apple_support side: https://github.com/bazelbuild/apple_support/pull/670.
Filing this here too since the filename-based workaround is now stale, and it wasn't obvious why the upgrade changed which archiver our Rust builds used.
Not sure whether you'd prefer to retire the check once the upstream fix is released or keep a compatibility workaround for affected versions.
Reproduction steps
On macOS arm64, use rules_rust 0.74.0 with apple_support 2.10.1 and build a target that links ring 0.17.14 through a Cargo build script.
Our failing target was a SQLx proc-macro.
With AR pointing to apple-support-ar-wrapper, cc-rs uses the wrapper rather than falling back to the system archiver.
If archive creation takes multiple batches, earlier object files are dropped.
I don't have a standalone rules_rust repro repo, but the apple_support PR includes a small regression test that appends two object batches and links a binary needing both.
Additional context
Related: #4083 proposed removing this check after the wrapper gained ar support.
The append fix above was enough to get our macOS build passing without a rules_rust change.
Impact
Blocked our macOS nightly build after the apple_support upgrade.
Applying the apple_support patch fixes it; keeping the older apple_support version avoids this wrapper path.
Bazel and rules_rust version
Bazel 9.3.0, rules_rust 0.74.0, apple_support 2.10.1, macOS arm64.
- 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 65 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