efabless / nix-eda

Nix derivations for EDA tools
Apache License 2.0
7 stars 3 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'sta' #2

Closed daquintero closed 5 months ago

daquintero commented 5 months ago

Hello!

This is related to https://github.com/efabless/openlane2/issues/479

I have tried running openlane --smoke-test on openlane 2.08, 2.07 and 2.06 all within the nix-eda environment. Does the nix environment just involve the downgrade suggested or a future patch?

I installed nix following these instructions tested in the latest ubuntu 22.04 native. The command I run for nix-eda is nix shell .#{ngspice,xschem,verilator,yosys}

Full error is:

  File "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/lib/python3.10/site-packages/openlane/steps/openroad.py", line 711, in run_corner
    return super().run_corner(state_in, current_env, corner, corner_dir)
  File "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/lib/python3.10/site-packages/openlane/steps/openroad.py", line 565, in run_corner
    subprocess_result = self.run_subprocess(
  File "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/lib/python3.10/site-packages/openlane/steps/tclstep.py", line 272, in run_subprocess
    return super().run_subprocess(
  File "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/lib/python3.10/site-packages/openlane/steps/step.py", line 1265, in run_subprocess
    process = _popen_callable(
  File "/home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/lib/python3.10/site-packages/psutil/__init__.py", line 1378, in __init__
    self.__subproc = subprocess.Popen(*args, **kwargs)
  File "/home/daquintero/.pyenv/versions/3.10.13/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/daquintero/.pyenv/versions/3.10.13/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: 'sta'
Classic - Stage 11 - STA (Pre-PnR) ━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10/75 0:00:02

Environement info as requested:

± |full_spice_integration U:10 ?:6 ✗| → openlane.env_info || python3 ./openlane/env_info.py
Failed to get Docker info: [Errno 2] No such file or directory: 'docker'
kernel: Linux
kernel_version: 6.5.0-35-generic
supported: True
distro: ubuntu
distro_version: 22.04
python_version: 3.10.13
python_path:
  - /home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/bin
  - /home/daquintero/.pyenv/versions/3.10.13/lib/python310.zip
  - /home/daquintero/.pyenv/versions/3.10.13/lib/python3.10
  - /home/daquintero/.pyenv/versions/3.10.13/lib/python3.10/lib-dynload
  - /home/daquintero/.pyenv/versions/3.10.13/envs/piel_0_1_0/lib/python3.10/site-packages
  - /home/daquintero/phd/piel_private/docs/examples/designs/simple_design
  - /home/daquintero/phd/piel_private
tkinter: True
container_info: None
nix_info:
  version_string: nix (Nix) 2.19.2
  channels:
    nixpkgs: https://nixos.org/channels/nixpkgs-unstable
  nix_command: True
  flakes: True
donn commented 5 months ago

Hi Dario, sorry just saw this-- that's a different error.

nix shell .#{ngspice,xschem,verilator,yosys} would not install OpenSTA, so OpenLane would not run. You need to get OpenLane with its dependencies in the same shell:

nix shell github:efabless/nix-eda#{ngspice,xschem,verilator,yosys} github:efabless/openlane2

Then invoke it using simply openlane (not python3 -m openlane).

daquintero commented 5 months ago

Hi Donn, thanks so much for the help! This is a really modular way of implementing the nix environments, and quite extensible. Sorry today had intended to try it out and now it's working great because of this! Look forward to meeting in Paris for FSIC