-
Notifications
You must be signed in to change notification settings - Fork 610
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
Added useful "Build script exited at step X" errors for each step in build-setup.sh #1614
Conversation
This was the only way I knew how to display the step at which the build-setup process failed. I've personally experienced failures at multiple of the build steps, and before I got used to Chipyard, it was hard to figure out which step was the culprit. With this, users should have a bit more info to troubleshoot their issues. For some of the build steps that required multiple lines, I figured it made more sense to put them into a sub-script, rather than putting a && at the end of each line. But for the firesim one for example, since it was two .sh calls, I just put a && after the first one, inside of the try block, to make sure both lines run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this change. @abejgonzalez does this look fine to you?
Actually, hang on. For some reason, when the Conda steps are put into the separate script
Any idea why gcc would not recognize the I tested this multiple times, and I'm confident that the Conda step is what causes this error. But it seems like a non sequitur, since all the same commands are being run, and |
Creating the conda env adds a new environment variable called $RISCV that is needed for cross-compiling things. So activating conda in a sub-shell probably doesn't work here. |
This also fixed the weird issue I was experiencing where the try-catch in step 1 caused step 3 to break
Learned a lot about bash today! When making the new set of functions, I originally tried to make an alias After being inspired by http://mywiki.wooledge.org/BashFAQ/105, I added some |
This revision should be good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SFTM! Thanks!
This was the only way I knew how to display the step at which the build-setup process failed. I've personally experienced failures at multiple of the build steps, and before I got used to Chipyard, it was hard to figure out which step was the culprit. With this, users should have a bit more info to troubleshoot their issues. For some of the build steps that required multiple lines, I figured it made more sense to put them into a sub-script, rather than putting a && at the end of each line. But for the firesim one for example, since it was two .sh calls, I just put a && after the first one, inside of the try block, to make sure both lines run.
Of course, it would be ideal if all the build steps work without issue, but Chipyard has so many moving parts that I think there's the potential for any of the steps to break. For example, when working with my own fork, I've often accidentally left typos or syntax errors in the code before cloning and re-running setup, leading to step 5 breaking.
Related PRs / Issues:
Type of change:
Impact:
Contributor Checklist:
main
as the base branch?changelog:<topic>
label?changelog:
label?.conda-lock.yml
file if you updated the conda requirements file?Please Backport
?** I checked the help text
./build-setup.sh --help
and Chapter 1.4 of readthedocs and I don't see any specific place that needs to be changed. It may be beneficial to include general tips on debugging issues? But I think that may be outside of the scope of this PR.Example output (I intentionally added a typo to
DigitalTop.scala
and ran./build-setup.sh -s 1 -s 2 -s 3 -s 4
):