rust-osdev / rust-osdev/bootloader

Hang during release build with UEFI

Aperta
#412 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Rust
Stelle
1.7k
Fork
240
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Running cargo b -r -vv produces the following output where it hangs (seemingly indefinitely) at zero CPU usage:

[bootloader 0.11.5] warning: `bootloader-x86_64-bios-stage-2` (bin "bootloader-x86_64-bios-stage-2") generated 2 warnings
[bootloader 0.11.5]     Finished stage-2 [optimized] target(s) in 1.51s
[bootloader 0.11.5]    Replacing /home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-stage-2
[bootloader 0.11.5]     Replaced package `bootloader-x86_64-bios-stage-2 v0.11.5 (/tmp/bootloader/bios/stage-2)` with `bootloader-x86_64-bios-stage-2 v0.11.5 (/tmp/bootloader/bios/stage-2)` (executable `bootloader-x86_64-bios-stage-2`)
[bootloader 0.11.5] warning: be sure to add `/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin` to your PATH to be able to run the installed binaries
[bootloader 0.11.5]     Finished stage-3 [optimized + debuginfo] target(s) in 1.52s
[bootloader 0.11.5]    Replacing /home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-stage-3
[bootloader 0.11.5]     Replaced package `bootloader-x86_64-bios-stage-3 v0.11.5 (/tmp/bootloader/bios/stage-3)` with `bootloader-x86_64-bios-stage-3 v0.11.5 (/tmp/bootloader/bios/stage-3)` (executable `bootloader-x86_64-bios-stage-3`)
[bootloader 0.11.5] warning: be sure to add `/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin` to your PATH to be able to run the installed binaries
[bootloader 0.11.5]     Finished stage-4 [optimized + debuginfo] target(s) in 1.52s
[bootloader 0.11.5]    Replacing /home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-stage-4
[bootloader 0.11.5]     Replaced package `bootloader-x86_64-bios-stage-4 v0.11.5 (/tmp/bootloader/bios/stage-4)` with `bootloader-x86_64-bios-stage-4 v0.11.5 (/tmp/bootloader/bios/stage-4)` (executable `bootloader-x86_64-bios-stage-4`)
[bootloader 0.11.5] warning: be sure to add `/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin` to your PATH to be able to run the installed binaries
[bootloader 0.11.5] cargo:rustc-env=BIOS_BOOT_SECTOR_PATH=/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-boot-sector.bin
[bootloader 0.11.5] cargo:rustc-env=BIOS_STAGE_2_PATH=/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-stage-2.bin
[bootloader 0.11.5] cargo:rustc-env=BIOS_STAGE_3_PATH=/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-stage-3.bin
[bootloader 0.11.5] cargo:rustc-env=BIOS_STAGE_4_PATH=/home/fm208/.cargo/target/release/build/bootloader-ad4dca68f01168c6/out/bin/bootloader-x86_64-bios-stage-4.bin
    Building [=======================> ] 133/135: bootloader(build)    

I believe this is cargo install boot loader-x86_64-uefi hanging in build_uefi_bootloader due to my usage of a globally shared target-dir set in ~/.cargo/config.toml.

I can fix this by creating a temporary directory and overriding the target directory to use that, or override the target directory to create one in the root of the bootloader directory, or some other place. Also happy to close this as a WONTFIX, but I know quite a few people use a global directory to avoid large build directories cluttering their drive in different locations.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il blocco con cargo b -r -vv usando una directory target condivisa globalmente, quindi esamina build_uefi_bootloader e il passaggio cargo install bootloader-x86_64-uefi descritto nel report. Confrontalo con una directory target temporanea isolata. Il lavoro è completato quando la build release non si blocca più con la configurazione segnalata, oppure quando la limitazione è documentata chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
build-system
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.