-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rust building and testing fails while bootstrapping it in poky #115642
Comments
I believe |
Yeah, I guess the assertion failure is main cause. |
Adding useful labels for triaging @rustbot label -I-prioritize +T-bootstrap -needs-triage |
I couldn't reproduce this problem from the e39976f HEAD. The assertation passes as expected(on `./x test bootstrap --target=..), I also printed them out. Sorry for sharing the the outputs in the image format; the attempt was done inside of QEMU(Debian 11). |
Thanks for checking @onur-ozkan,
Moreover, if I bypass the assertion check and then build, why do the compiler asks to switch to nightly channel instead of continuing to stable? I am wondering how does it gets the
Let me know if I am missing something |
Do you have a custom |
The
|
iirc |
Actually, I didn't understand removing |
Still, this is wrong.
Remove the following lines: rustc = "build_dir/rust-snapshot/bin/rustc"
cargo = "build_dir/rust-snapshot/bin/cargo" from your configuration |
Ok, will check and get back. |
@onur-ozkan Thanks for the suggestion, but I can't modify |
@onur-ozkan, any updates? |
Sorry, I somehow missed the notification. Bootstrap requires the immediate previous version to compile the next version, allowing it to handle unstable features. So there's an issue with your configuration (rustc and cargo), and you should find a way to update your config file. I'm surprised you didn't encounter an error message like: |
Actually, I see that More info- docs rust-lang/cargo#12221 rust-lang/cargo#12288 I suspect that |
As I explained above, you cannot build upstream rustc with 1.70 anymore, even for non-poky environments. You should either not set rustc manually in the build configuration or set it to the proper version. |
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: 769e3f7e3871a375b1037dfb391e67876f987450) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: 769e3f7e3871a375b1037dfb391e67876f987450) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: 769e3f7e3871a375b1037dfb391e67876f987450) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: 769e3f7e3871a375b1037dfb391e67876f987450) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: 3faebfc49cd8aa00a63fbe1cf4d21ff4e6f6a667) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: e5f007349ae92be839d13e489963b258b53d0c59) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@onur-ozkan , Thanks for the help to fix this issue.
Yeah, I faced this panic failures randomly after the test suite testing is completed starting from rust 1.71 version |
Just remembered now, How do I handle the assertion mentioned in #115642 (comment)?
|
I will add another commit to handle that. update: e7fc441 |
Do we still need the patch mentioned in #115642 (comment) along with the changes in #119619 PR? I think the three file changes in the #119619 PR should be sufficient, right? |
#119619 PR is enough, you don't need any other patches. |
…oli-obk mir-opt and custom target fixes From rust-lang#115642 (comment) > > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue. > I tested with the two commits and the errors of using nightly flag and custom target specs were not seen. Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental. Fixes rust-lang#115642
Rollup merge of rust-lang#119619 - onur-ozkan:panic-abort-mir-opt, r=oli-obk mir-opt and custom target fixes From rust-lang#115642 (comment) > > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue. > I tested with the two commits and the errors of using nightly flag and custom target specs were not seen. Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental. Fixes rust-lang#115642
mir-opt and custom target fixes From rust-lang/rust#115642 (comment) > > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue. > I tested with the two commits and the errors of using nightly flag and custom target specs were not seen. Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental. Fixes #115642
Hi @onur-ozkan, |
Not yet |
Are you able to run any tests with remote-test or does it give the error instantly at the beginning? |
Yes, I am able to run the tests. The error is seen at |
I meant sending tests and running in the qemu environment
Is the error always the same, like this? |
Yes, the error is always same. |
Can you try this patch onur-ozkan@43183f7 and tell me if it fixes the problem? |
The onur-ozkan@43183f7 patch does not fix the problem. Still, the same error is seen. |
I was able to repreduce the Unfortunately I don't know your use case, and I can't invest time on #115642 (comment) for debugging or trying to reproduce the error. If you can't debug and fix the problem you get, I suggest you to give more context about your use case (configurations, commands, etc.) under the #97669 issue. |
I got some work around for this, But, when I check for other cross-compiled targets(
I am investigating the problem and will let you know if there are any updates. |
That seems to be related with MirOptPanicAbortSyntheticTarget tests rust/src/bootstrap/src/core/build_steps/test.rs Lines 1530 to 1534 in f9c2421
|
Yes, the log says the same and the error was seen after Meanwhile, I came across the following and have a doubt, Earlier it was working without passing the flag explicitly. |
Earlier we didn't have those tests, so they might require passing |
Is there any way to handle this panic failure and make the tests run successfully? |
You can add |
mir-opt and custom target fixes From rust-lang/rust#115642 (comment) > > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue. > I tested with the two commits and the errors of using nightly flag and custom target specs were not seen. Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental. Fixes #115642
mir-opt and custom target fixes From rust-lang/rust#115642 (comment) > > Could you please test the last two commits from https://github.com/onur-ozkan/rust/commits/panic-abort-mir-opt when you have the time? The first commit should resolve the error of using the nightly flag with a stable compiler, and the second one should resolve the custom target issue. > I tested with the two commits and the errors of using nightly flag and custom target specs were not seen. Testing was completed for the test suites like ui, run-pass-valgrind, coverage, mir-opt, codegen, assembly, incremental. Fixes #115642
After rust is upgraded to 1.71 and later versions, the rust oe-selftest gives build errors due to unstable nightly options(see the error mentioned below). Thus, disable the test suite until the issue is fixed error: the option `Z` is only accepted on the nightly compiler thread 'main' panicked at 'failed to gather the target spec for x86_64-poky-linux-gnu', synthetic_targets.rs:66:9 Following issues are created in Yocto bugzilla and rust upstream to track this issue- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15275 rust-lang/rust#115642 https://users.rust-lang.org/t/does-rust-test-suite-supports-nightly-options-during-bootstrapping-in-rust/103108 https://users.rust-lang.org/t/unable-to-read-target-specs-when-rust-1-73-is-bootstrapped-in-yocto-poky/102959 (From OE-Core rev: fa2d3cda8f7f932c0ed5c534c4bc820af2761cd5) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Getting error while building & testing rust 1.72 via the
src/bootstrap/bootstrap.py
file in poky (cmd-bitbake rust
and thenpython3 src/bootstrap/bootstrap.py test test_suites_names --target x86_64-poky-linux-gnu
)in poky environment. Until rust 1.70 I was able to build & test the rust sources successfully.But after updating to rust 1.72, there's an assertion failure causing the problem. The rust build fails as follows-
The code at compile.rs:1474
Build terminates as follows-
Version it worked on
It most recently worked on Rust 1.70 and earlier versionsVersion with regression
Rust 1.72Backtrace
Backtrace
The text was updated successfully, but these errors were encountered: