Owner of platform runtime ordering after trailing C/C++ static archives on aarch64 Linux
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- build-system, tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Starlark
- Estrellas
- 857
- Forks
- 701
- Merge medio
- 4 d 7 h
- PR fusionados (30 d)
- 46
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bazelbuild/rules_rust
-
`rust_test(crate = ...)` does not stage the crate's transitive dynamic libraries into runfilesPosiblemente ocupada @Wito-1 la tomó hace 65 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
bazelbuild/rules_rust#4309 ·
Los mantenedores suelen responder en 3 días
-
Windows (no-symlink path): drain_runfiles_dir_windows deletes retained runfiles — inverted filename_suffixes_to_retain conditionPosiblemente ocupada @Mattbusel la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
bazelbuild/rules_rust#4266 ·
Los mantenedores suelen responder en 3 días
-
rust.toolchain(strip_level = ...) is silently ignoredPosiblemente ocupada @Mattbusel la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
bazelbuild/rules_rust#4223 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
bazelbuild/rules_rust#4152 · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
awaiting-response
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bazelbuild/rules_rust#3599 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de bazelbuild/rules_rust
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bazelbuild/apple_support#707 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
blocky: new version 0.38.0Abiertoout-of-date
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CachyOS/CachyOS-PKGBUILDS#2232 ·
Los mantenedores suelen responder en 1 día
-
blast/large refactor risk/low spend-dem
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chriskelly/MusicWall#87 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
neilotoole/sq#1503 ·
Los mantenedores suelen responder en 1 día