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

Build-setup issue #2016

Open
3 tasks done
alsrbok opened this issue Aug 26, 2024 · 4 comments
Open
3 tasks done

Build-setup issue #2016

alsrbok opened this issue Aug 26, 2024 · 4 comments
Labels

Comments

@alsrbok
Copy link

alsrbok commented Aug 26, 2024

Background Work

Chipyard Version and Hash

Release: 1.5.0
Hash: a6a6a6

OS Setup

Ex: Output of uname -a + lsb_release -a + printenv + conda list
x86_64 GNU/Linux

LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterprise
Description: Red Hat Enterprise Linux release 8.10 (Ootpa)
Release: 8.10
Codename: Ootpa

Other Setup

Ex: Prior steps taken / Documentation Followed / etc...

Current Behavior

Build-setup issue

When we clone new version and try to run build-setup.sh with conda env, it failed.

  1. build-setup.sh try to use .conda-lock-env, not .conda-env. This is mismatch with generated env.sh file/
  2. There are changes on init-submodules-no-riscv-tools-nolog.sh file.
    The current version does not seem to download some required executables from .conda-env/bin.
    init-submodules-no-riscv-tools-nolog.csv
    I upload an older version that I have utilized successfully in the past.
    I resolved this problem by manually fixing lots of codes and files, but I hope we can correctly use it without any modification.

log.docx
This log file only contains the first error I encountered while using the current version.
After fixing this environment activation issue, I get many of the other errors mentioned above.

I think you can test it by cloning the project on new folder.
Thank you.

Expected Behavior

.

Other Information

No response

@alsrbok alsrbok added the bug label Aug 26, 2024
@jerryz123
Copy link
Contributor

Can you upload the logs as a raw text file instead of .docx?

@alsrbok
Copy link
Author

alsrbok commented Aug 26, 2024

$ git clone https://github.com/ucb-bar/chipyard.git
Cloning into 'chipyard'...
remote: Enumerating objects: 40993, done.
remote: Counting objects: 100% (1046/1046), done.
remote: Compressing objects: 100% (557/557), done.
remote: Total 40993 (delta 534), reused 825 (delta 422), pack-reused 39947 (from 1)
Receiving objects: 100% (40993/40993), 51.82 MiB | 36.85 MiB/s, done.
Resolving deltas: 100% (23062/23062), done.
$ conda create -n base_vpu python=3.10
(base_vpu) $ conda install conda-libmamba-solver
(base_vpu) $ conda config --set solver libmamba
(base_vpu) $ ./build-setup.sh riscv-tools
========== BEGINNING STEP 1: Conda environment setup ==========
Channels:

  • conda-forge
  • defaults
    Platform: linux-64
    Collecting package metadata (repodata.json): ...working... done
    Solving environment: ...working... done

Package Plan

environment location: /home/ mgpark/chipyard-test/chipyard/.conda-lock-env
added / updated specs:
- conda-lock=2.5.7
Downloading and Extracting Packages: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

To activate this environment, use

 $ conda activate /home/ mgpark/chipyard-test/chipyard/.conda-lock-env

To deactivate an active environment, use

 $ conda deactivate

Using lockfile for conda: /home/ mgpark/chipyard-test/chipyard/conda-reqs/conda-lock-reqs/conda-requirements-riscv-tools-linux-64.conda-lock.yml
Storing main conda environment in /home/ mgpark/chipyard-test/chipyard/.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_reactivate ;; *) __conda_exe "$@" ;; esac } /home/ mgpark/chipyard-test/chipyard/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

here it is.

@abejgonzalez
Copy link
Contributor

The error is unclear still. Can you run build-setup.sh with the -v flag for more output. (Also, you shouldn't have to create a new environment (base_vpu) to run build-setup.sh). My 1st guess is that there might be some version mismatch between conda-lock and conda but I don't know how that would happen. You could try running the conda-lock command yourself to debug as well:

conda-lock install --conda $(which conda) -p $CYDIR/.conda-env $CYDIR/conda-reqs/conda-lock-reqs/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml

https://github.com/ucb-bar/chipyard/blob/51b66dddb99146eacab3e5c7864e0fbc86859125/scripts/build-setup.sh#L190C5-L190C71 is where we create the conda environment with conda-lock.

@alsrbok
Copy link
Author

alsrbok commented Aug 26, 2024

Thanks for your help. I think I resolve this issue.
I'll explain the workaround I used for other users

In my case few things interrupted me to succesfully run ./build-setup.sh riscv-tools

  1. Change to GLOBAL_ENV_NAME=".conda-env" from GLOBAL_ENV_NAME=""
  2. Utilize CONDA_ENV_ARG="-p $GLOBAL_ENV_NAME" instaed of CONDA_ENV_ARG="-n $GLOBAL_ENV_NAME"
    (make sure to use -p option)
  3. Remove --conda $(which conda) from conda-lock install
    (In my case 'which conda' made unexpected argement error)
  4. Utilize conda activate .conda-env/ instead of conda activate $CONDA_ENV_NAME
    (In my case it gave wrong command, leading to error)

Also, we sometimes need to modify env.sh to ensure correct activate.
In that case skip some stages or disable replace_content command in build-setup.sh.

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

No branches or pull requests

3 participants