Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When an archive fails to build, print the path #127830

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 16, 2024

Currently the output on failure is as follows:

   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling digest v0.10.7
   Compiling sha2 v0.10.8
   Compiling xz2 v0.1.7
error: failed to build archive: No such file or directory

error: could not compile `bootstrap` (lib) due to 1 previous error

Change this to print which file is being constructed, to give some hint about what is going on.

error: failed to build archive at `path/to/output`: No such file or directory

Currently the output on failure is as follows:

       Compiling block-buffer v0.10.4
       Compiling crypto-common v0.1.6
       Compiling digest v0.10.7
       Compiling sha2 v0.10.8
       Compiling xz2 v0.1.7
    error: failed to build archive: No such file or directory

    error: could not compile `bootstrap` (lib) due to 1 previous error

Print which file is being constructed to give some hint about what is
going on.
@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 16, 2024
@tgross35
Copy link
Contributor Author

Unfortunately I have no easy way to test this because I can't build stage1 on the platform where the error happens 😠.

This PR only helps if it is failing because it can't find the output directory. The other possibility is a failure in one of these

let path = CString::new(path.to_str().unwrap())?;
let name = CString::new(name_in_archive.as_bytes())?;
members.push(llvm::LLVMRustArchiveMemberNew(
path.as_ptr(),
name.as_ptr(),
None,
));
strings.push(path);
strings.push(name);

Open to suggestions for what would work better here, but I think even just this message should help narrow things down.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jul 28, 2024

Where is the failure from? You said you cant test this but you must have gotten the output in the PR description from somewhere right?

@tgross35
Copy link
Contributor Author

This was from trying to run ./x inside the aarch64-gnu docker container on aarch64 macos, a bit more context here #127828 (comment). Very open to suggestions to trace that back further since I didn't dig too deep, this PR is just meant to hopefully give some hint.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jul 30, 2024

@bors r+

feels a bit weird but I don't think it can really hurt, if someone else has opinions here feel free to take over 🤷‍♀️

@bors
Copy link
Contributor

bors commented Jul 30, 2024

📌 Commit e0af3c6 has been approved by BoxyUwU

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2024
@tgross35
Copy link
Contributor Author

feels a bit weird but I don't think it can really hurt, if someone else has opinions here feel free to take over 🤷‍♀️

My feelings exactly. Thanks!

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 30, 2024
…r=BoxyUwU

When an archive fails to build, print the path

Currently the output on failure is as follows:

       Compiling block-buffer v0.10.4
       Compiling crypto-common v0.1.6
       Compiling digest v0.10.7
       Compiling sha2 v0.10.8
       Compiling xz2 v0.1.7
    error: failed to build archive: No such file or directory

    error: could not compile `bootstrap` (lib) due to 1 previous error

Change this to print which file is being constructed, to give some hint about what is going on.

    error: failed to build archive at `path/to/output`: No such file or directory
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 30, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#127830 (When an archive fails to build, print the path)
 - rust-lang#128151 (Structured suggestion for `extern crate foo` when `foo` isn't resolved in import)
 - rust-lang#128161 (nested aux-build in tests/rustdoc/ tests)
 - rust-lang#128387 (More detailed note to deprecate ONCE_INIT)
 - rust-lang#128388 (Match LLVM ABI in `extern "C"` functions for `f128` on Windows)
 - rust-lang#128402 (Attribute checking simplifications)

r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 31, 2024
…r=BoxyUwU

When an archive fails to build, print the path

Currently the output on failure is as follows:

       Compiling block-buffer v0.10.4
       Compiling crypto-common v0.1.6
       Compiling digest v0.10.7
       Compiling sha2 v0.10.8
       Compiling xz2 v0.1.7
    error: failed to build archive: No such file or directory

    error: could not compile `bootstrap` (lib) due to 1 previous error

Change this to print which file is being constructed, to give some hint about what is going on.

    error: failed to build archive at `path/to/output`: No such file or directory
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2024
Rollup of 8 pull requests

Successful merges:

 - rust-lang#125048 (PinCoerceUnsized trait into core)
 - rust-lang#127681 (derive(SmartPointer): rewrite bounds in where and generic bounds)
 - rust-lang#127830 (When an archive fails to build, print the path)
 - rust-lang#128147 (migrate fmt-write-bloat to rmake)
 - rust-lang#128356 (Migrate `cross-lang-lto-clang` and `cross-lang-lto-pgo-smoketest` `run-make` tests to rmake)
 - rust-lang#128387 (More detailed note to deprecate ONCE_INIT)
 - rust-lang#128388 (Match LLVM ABI in `extern "C"` functions for `f128` on Windows)
 - rust-lang#128412 (Remove `crate_level_only` from `ELIDED_LIFETIMES_IN_PATHS`)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 31, 2024
…r=BoxyUwU

When an archive fails to build, print the path

Currently the output on failure is as follows:

       Compiling block-buffer v0.10.4
       Compiling crypto-common v0.1.6
       Compiling digest v0.10.7
       Compiling sha2 v0.10.8
       Compiling xz2 v0.1.7
    error: failed to build archive: No such file or directory

    error: could not compile `bootstrap` (lib) due to 1 previous error

Change this to print which file is being constructed, to give some hint about what is going on.

    error: failed to build archive at `path/to/output`: No such file or directory
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#127681 (derive(SmartPointer): rewrite bounds in where and generic bounds)
 - rust-lang#127830 (When an archive fails to build, print the path)
 - rust-lang#128356 (Migrate `cross-lang-lto-clang` and `cross-lang-lto-pgo-smoketest` `run-make` tests to rmake)
 - rust-lang#128387 (More detailed note to deprecate ONCE_INIT)
 - rust-lang#128388 (Match LLVM ABI in `extern "C"` functions for `f128` on Windows)
 - rust-lang#128412 (Remove `crate_level_only` from `ELIDED_LIFETIMES_IN_PATHS`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#126454 (bump-stage0: use IndexMap for determinism)
 - rust-lang#127681 (derive(SmartPointer): rewrite bounds in where and generic bounds)
 - rust-lang#127830 (When an archive fails to build, print the path)
 - rust-lang#128151 (Structured suggestion for `extern crate foo` when `foo` isn't resolved in import)
 - rust-lang#128387 (More detailed note to deprecate ONCE_INIT)
 - rust-lang#128388 (Match LLVM ABI in `extern "C"` functions for `f128` on Windows)
 - rust-lang#128402 (Attribute checking simplifications)
 - rust-lang#128412 (Remove `crate_level_only` from `ELIDED_LIFETIMES_IN_PATHS`)
 - rust-lang#128430 (Use a separate pattern type for `rustc_pattern_analysis` diagnostics )

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 75dfe1e into rust-lang:master Jul 31, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Jul 31, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2024
Rollup merge of rust-lang#127830 - tgross35:archive-failure-message, r=BoxyUwU

When an archive fails to build, print the path

Currently the output on failure is as follows:

       Compiling block-buffer v0.10.4
       Compiling crypto-common v0.1.6
       Compiling digest v0.10.7
       Compiling sha2 v0.10.8
       Compiling xz2 v0.1.7
    error: failed to build archive: No such file or directory

    error: could not compile `bootstrap` (lib) due to 1 previous error

Change this to print which file is being constructed, to give some hint about what is going on.

    error: failed to build archive at `path/to/output`: No such file or directory
@tgross35 tgross35 deleted the archive-failure-message branch July 31, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants