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

small build setup edits to prevent common failures #2219

Merged
merged 4 commits into from
Mar 29, 2025

Conversation

Fi50
Copy link
Contributor

@Fi50 Fi50 commented Mar 28, 2025

Edit 1

At some point the build-setup.sh line:

conda-lock install --conda $CONDA_EXE $CONDA_ENV_ARG $LOCKFILE &&

Got changed to:

conda-lock install --conda $(which conda) $CONDA_ENV_ARG $LOCKFILE &&

Which does not work in all cases (such as BWRC and EDA machines), due to this behavior of which conda:

As seen in the issues here:

Specifically it causes this build error:

Using lockfile for conda: [redacted]/conda-reqs/conda-lock-reqs/conda-requirements-riscv-tools-linux-64.conda-lock.yml
Storing main conda environment in /bwrcq/C/srevi/chipyard-simple-bugs/.conda-env
Usage: conda-lock install [OPTIONS] [LOCK_FILE]
Try 'conda-lock install --help' for help.

Error: Got unexpected extra arguments ({ \local cmd="${1-__missing__}"; case "$cmd" in activate | deactivate) __conda_activate "$@" ;; install | update | upgrade | remove | uninstall) __conda_exe "$@" || \return; __conda_activate reactivate ;; *) __conda_exe "$@" ;; esac } [redacted]/conda-reqs/conda-lock-reqs/conda-requirements-riscv-tools-linux-64.conda-lock.yml)
build-setup.sh: Build script failed with exit code 2 at step 1: Conda environment setup

I suggest reverting back to $CONDA_EXE (or figure out the reason for the change, but this fix has not failed me so far).

Edit 2

The conda-requirements-riscv-tools-linux-64.conda-lock.yml contains this dependency (lean version doesn't):

- name: open_pdks.sky130a
  version: 1.0.471_0_g97d0844
  manager: conda
  platform: linux-64
  dependencies: {}
  url: https://conda.anaconda.org/litex-hub/noarch/open_pdks.sky130a-1.0.471_0_g97d0844-20240223_100318.tar.bz2
  hash:
    md5: 3f9dab167b1bac3a6636f3f4311eb17e
    sha256: 37736ab56036733eaaff5f8f77a42c98caf75c82bc6b5dae59a727d24eabdd83
  category: main
  optional: false

Which I do not believe is complete yet, and it seems most SKY130 flows do not yet make use of it yet anyway.

As seen in the issue here:

Specifically it causes this build error (x 20):

ERROR:root:CondaVerificationError: The package for open_pdks.sky130a located at /[redacted]/conda/pkgs/open_pdks.sky130a-1.0.471_0_g97d0844-20240223_100318
ERROR:root:appears to be corrupted. The path 'share/pdk/sky130A/libs.tech/xschem/xschem_verilog_import/spm.v'
ERROR:root:specified in the package manifest cannot be found.
ERROR:root:
ERROR:root:

I suggest commenting it out for now until someone digs into the setup deeper.


Related PRs / Issues:

Type of change:

  • Bug fix
  • New feature
  • Other enhancement

Impact:

  • RTL change
  • Software change (RISC-V software)
  • Build system change
  • Other

Contributor Checklist:

  • Did you set main as the base branch?
  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you state the type-of-change/impact?
  • Did you delete any extraneous prints/debugging code?
  • Did you mark the PR with a changelog: label?
  • (If applicable) Did you update the conda .conda-lock.yml file if you updated the conda requirements file?

Updated /conda-reqs/chipyard-extended.yaml, although I didn't have to do that in my other repos so a glance might be useful.

  • (If applicable) Did you add documentation for the feature?
  • (If applicable) Did you add a test demonstrating the PR?
  • (If applicable) Did you mark the PR as Please Backport?

CI Help:
Add the following labels to modify the CI for a set of features.
Generally, a label added only affect subsequent changes to the PR (i.e. new commits, force pushing, closing/reopening).
See ci:* for full list of labels:

  • ci:fpga-deploy - Run FPGA-based E2E testing
  • ci:local-fpga-buildbitstream-deploy - Build local FPGA bitstreams for platforms that are released
  • ci:disable - Disable CI

Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1555 was the o.g. PR that added the --conda flag with which conda. I think this should also work so LGTM on that. Have you tested if the lockfile works with the bad package being commented out?

@Fi50
Copy link
Contributor Author

Fi50 commented Mar 29, 2025

Makes sense + I see, thanks for the context! I've commented out that package on every repo I've used recently and never ran into issues. Ran build again on a clean repo for the sake of this PR and that worked fine too.

Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM thanks.

@abejgonzalez
Copy link
Contributor

Merging since the CI failure is not related to this PR (an auth. issue accessing a CI machine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants