Set up problem. Anyway to manually setup conda environment?

341 views
Skip to first unread message

namae zieud

unread,
Feb 24, 2024, 4:06:34 AM2/24/24
to Chipyard
Hello,

I am new to chipyard and computer science. For study purpose I am trying to set up chipyard repo and get some examples simulated.
I followed the instruction from the stable official doc to set up chipyard.  
Everytime I tried to run the build-setup.sh, STEP 1: Conda environment abort would abort and the error message is like "[Errno 11] Resource temporarily unavailable" or md5 mismatch because of bad Internet service.
Is there anyway to manually set up the necessary conda environment?

Thanks!

namae zieud

unread,
Feb 24, 2024, 8:53:41 PM2/24/24
to Chipyard
problem solved. when conda-lock downloads packages using conda, if the package is not fully downloaded, which will leave *.partial in miniforge3/pkgs, the later md5-check will somehow use these partially-downloaded packages as the default ones, causing md5mismatch error and abort. I removed all the *.partial and executed the line `conda-lock install --conda $(which conda) -p .conda-env ./conda-reqs/conda-lock-reqs/conda-requirements-riscv-tools-linux-64.conda-lock.yml` several times, using wget to download the packages failed to be downloaded to miniforge3/pkgs. then I executed the following 2 commands in build-setup.sh `source $CYDIR/.conda-env/etc/profile.d/conda.sh; conda activate $CYDIR/.conda-env`.

I didn't run the following command in STEP 1. they looks like this:
    # Conda Setup
    # Provide a sourceable snippet that can be used in subshells that may not have
    # inhereted conda functions that would be brought in under a login shell that
    # has run conda init (e.g., VSCode, CI)
    read -r -d '\0' CONDA_ACTIVATE_PREAMBLE <<'END_CONDA_ACTIVATE'
if ! type conda >& /dev/null; then
    echo "::ERROR:: you must have conda in your environment first"
    return 1  # don't want to exit here because this file is sourced
fi

# if we're sourcing this in a sub process that has conda in the PATH but not as a function, init it again
conda activate --help >& /dev/null || source $(conda info --base)/etc/profile.d/conda.sh
\0
END_CONDA_ACTIVATE

    replace_content env.sh build-setup-conda "# line auto-generated by $0
$CONDA_ACTIVATE_PREAMBLE
conda activate $CYDIR/.conda-env
source $CYDIR/scripts/fix-open-files.sh"


I don't know what these lines are intended to do but I didn't run them and until step 3 it seems okay.

namae zieud

unread,
Feb 25, 2024, 3:11:40 AM2/25/24
to Chipyard
step 9, Pre-compiling FireMarshal buildroot sources, error:

filenotfounderror: [errno 2] no such file or directory: 'guestmount'
[ERROR] Failed to build workload br-base.json

I just ran step 9 again and it worked. maybe an Internet connection problem again. or maybe it has something to do with this:

and setup is now completed.

黃浩展

unread,
Feb 25, 2024, 7:11:36 PM2/25/24
to Chipyard
I am facing same error in "STEP 9: Pre-compiling FireMarshal buildroot sources":

 ========== BEGINNING STEP 9: Pre-compiling FireMarshal buildroot sources ==========
To check on progress, either call marshal with '-v' or see the live output at:
/home/hhc/chipyard/software/firemarshal/logs/br-base-build-2024-02-25--16-39-36-GEONFCKL33CCHFKI.log
.  /home/hhc/chipyard/software/firemarshal/boards/firechip/base-workloads/br-base/host-init.sh
.  /home/hhc/chipyard/software/firemarshal/images/firechip/br.8fff/br.8fff.img
Attempting to download cached image: https://raw.githubusercontent.com/firesim/firemarshal-public-br-images/main/images/firechip/br.8fff/br.8fff.img.zip
Unzipping cached image: /home/hhc/chipyard/software/firemarshal/boards/firechip/distros/br/br.8fff.img.zip
Skipping full buildroot build. Using cached image /home/hhc/chipyard/software/firemarshal/images/firechip/br.8fff/br.8fff.img from /home/hhc/chipyard/software/firemarshal/boards/firechip/distros/br/br.8fff.img.zip
.  build_busybox
.  /home/hhc/chipyard/software/firemarshal/images/firechip/br-base/br-base-bin
.  calc_br-base_dep
.  /home/hhc/chipyard/software/firemarshal/images/firechip/br-base/br-base.img
TaskError - taskid:/home/hhc/chipyard/software/firemarshal/images/firechip/br-base/br-base.img
PythonAction Error
Traceback (most recent call last):
  File "/home/hhc/chipyard/.conda-env/lib/python3.10/site-packages/doit/action.py", line 461, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/home/hhc/chipyard/software/firemarshal/wlutil/build.py", line 602, in makeImage
    wlutil.applyOverlay(config['img'], config['overlay'])
  File "/home/hhc/chipyard/software/firemarshal/wlutil/wlutil.py", line 671, in applyOverlay
    copyImgFiles(img, flist, 'in')
  File "/home/hhc/chipyard/software/firemarshal/wlutil/wlutil.py", line 652, in copyImgFiles
    with mountImg(img, getOpt('mnt-dir')):
  File "/home/hhc/chipyard/.conda-env/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/hhc/chipyard/software/firemarshal/wlutil/wlutil.py", line 589, in mountImg
    run(['guestmount', '--pid-file', 'guestmount.pid', '-a', imgPath, '-m', '/dev/sda', mntPath])
  File "/home/hhc/chipyard/software/firemarshal/wlutil/wlutil.py", line 521, in run
    p = sp.Popen(*args, universal_newlines=True, stderr=sp.STDOUT, stdout=sp.PIPE, **kwargs)
  File "/home/hhc/chipyard/.conda-env/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/hhc/chipyard/.conda-env/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'guestmount'


ERROR: Failed to build workload br-base.json
Log available at: /home/hhc/chipyard/software/firemarshal/logs/br-base-build-2024-02-25--16-39-36-GEONFCKL33CCHFKI.log
ERROR: FAILURE: 1 builds failed
build-setup.sh: Build script failed with exit code 1 at step 9: Pre-compiling FireMarshal buildroot sources


How can I fix it ?


namae zieud 在 2024年2月25日 星期日下午4:11:40 [UTC+8] 的信中寫道:

namae zieud

unread,
Feb 25, 2024, 8:05:39 PM2/25/24
to Chipyard
Reply all
Reply to author
Forward
0 new messages