Using -C prefer-dynamic on Apple lipo-able targets results in mismatched libstd load commands
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- build-system
Direzione di ricerca
Start by reproducing the two cargo build --release commands with RUSTFLAGS="-C prefer-dynamic" for the aarch64-apple-darwin and x86_64-apple-darwin targets. Compare the executables’ libstd load commands and investigate how Rust chooses their dylib names for Apple targets; the report provides no Rust source file or test to begin from. Done means both architectures use compatible load command names so their executables and libstd dylibs can be combined.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I tried this code:
git clone https://gitlab.freedesktop.org/amyspark/dragonfire.git
env RUSTFLAGS="-C prefer-dynamic" cargo build --release --target aarch64-apple-darwin
env RUSTFLAGS="-C prefer-dynamic" cargo build --release --target x86_64-apple-darwin
I expected to see this happen: both dragonfire executables lipo'able together with the respective libstd
Instead, this happened: the dragonfire executables differ in the load commands, as the libstd dylibs have mismatched names. The mismatch will also affect libraries targeting e.g. iOS, iOS simulator, etc. for which we (GStreamer) also ship fat binaries, so we can't ship the libstd dylibs nor their dSYMs and must build stuff the usual way.
I'm not sure if this was intended, so I'm filing this bug to figure things out.
Meta
rustc --version --verbose:
rustc 1.100.0 (0ef1bc386 2026-11-09)
binary: rustc
commit-hash: 0ef1bc386059596dada8fb65b50425aab2ea637a
commit-date: 2026-11-09
host: aarch64-apple-darwin
release: 1.100.0
LLVM version: 23.1.5
- Lingua principale
- Rust
- Stelle
- 123k
- Fork
- 16.6k
- Merge medio
- 2g 17h
- PR unite (30g)
- 532
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/rust
-
C-bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
rust-lang/rust#166722 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
A-attributes relnotes relnotes-needs-review relnotes-tracking-issue T-compiler T-lang
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
A-run-make C-bug T-bootstrap
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Tracking issue for release notes of #161531: Remove `T: Send + Sync` bound from `Arc::downcast`Apertarelnotes relnotes-tracking-issue T-libs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
A-str A-Unicode relnotes relnotes-tracking-issue T-libs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rust-lang/rust
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tamatebako/tebako#1155 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
swc-project/swc-next-issues#1148 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#2828 ·
I maintainer di solito rispondono entro 1 giorno
-
agent:triaged arch-audit bug priority:p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
SocketDev/socket-patch#2364 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno