Bug 14905 - Error in compiling rustfmt does not cause do_compile to fail
Summary: Error in compiling rustfmt does not cause do_compile to fail
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 4.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 5.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-08-26 00:40 UTC by Randy MacLeod
Modified: 2024-11-21 14:24 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
do_compile log for rustfmt (80.75 KB, text/plain)
2024-11-21 11:34 UTC, Yash Shinde
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy MacLeod 2022-08-26 00:40:59 UTC
Richard reported that an error in compiling rustfmt does not cause do_compile to fail.

This explains how we could get to do_install to find that rustfmt for qemuppc was not available. Investigate why the error isn't being handled and fix in relevant code (oe-core or upstream rust).
Comment 1 Randy MacLeod 2022-09-01 14:34:37 UTC
Likley a shell exit code propagation issue.
Comment 2 Randy MacLeod 2022-11-03 15:22:50 UTC
Naveen is this still happening on 1.64?
Comment 3 Randy MacLeod 2022-12-22 16:43:38 UTC
Naveen, add a patch that makes rustfmt compilation fail and you should be able to see what the problem is or confirm that the issue is resolved.
Comment 4 Randy MacLeod 2023-01-09 15:49:32 UTC
Even with a patch that make rustfmt fail to build, this is not reproducible.
Naveen to state what version he tested.

Also test using the version of rust used on 2022-08-26.

Naveen, please also attach the patch you used to make rustfmt fail to compile.
Comment 5 Randy MacLeod 2023-02-22 16:33:46 UTC
Naveen is working on another project, assign to Yash.
Comment 6 Randy MacLeod 2023-05-08 14:19:40 UTC
@Yash I'd like you to fix this or at least confirm that it's no longer a problem sooner than M4. It's not urgent but please make time to work on it in the next month. You should deliberately add a patch (from Naveen?) that makes rustfmt fail to compile and see if the overall build fails.
Comment 7 Randy MacLeod 2023-08-04 21:17:18 UTC
We should just ensure that this isn't going to aftect the master branch so change target to 4.3.*
Comment 8 Randy MacLeod 2023-11-06 22:31:34 UTC
Yash, when you get time, I'd still like to understand if do_compile will fail if a Rust component like rustfmt fails to build. It doesn't seem to be urgent so set to 5.0-M2.
Comment 9 Randy MacLeod 2024-04-24 17:04:27 UTC
We should do this at some point but realistically, we may not get to it for quite a while. Move to 5.99 to refect that plan.
Comment 10 Yash Shinde 2024-11-21 11:34:29 UTC
Created attachment 5084 [details]
do_compile log for rustfmt

I built the rustfmt recipe from meta-rust layer in oe-core latest sources and error in compiling rustfmt makes do_compile to fail now.

Attached log file for more details.
Comment 11 Yash Shinde 2024-11-21 14:24:17 UTC
Error in compiling rustfmt gives do_compile failure for 
bitbake rustfmt. (checked in rust v1.80)

The log file for do_compile is attached for reference.