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

[BUG] Error on activation script: bash: scripts/setup/gen_pigweed_cipd_json.py: No such file or directory #32860

Closed
locnnil opened this issue Apr 4, 2024 · 0 comments · Fixed by #32822
Labels
bug Something isn't working linux needs triage

Comments

@locnnil
Copy link

locnnil commented Apr 4, 2024

Reproduction steps

The problem

I've following the documentation present here and using instructions present here to check out the components for a specific platform. But when I try to run the activation script, I got:

bash: scripts/setup/gen_pigweed_cipd_json.py: No such file or directory

It happens:

Whenever I try to follow the documentation to try to compile the lightning app example.

Steps to reproduce

  • Install the dependencies
sudo apt-get install git gcc g++ python3 pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip
  • Install ZAP
wget --no-verbose https://github.com/project-chip/zap/releases/download/v2024.04.03/zap-linux-x64.zip

mkdir zap

unzip  zap-linux-x64.zip -d zap

cd zap 

ZAP_INSTALL_PATH=$PWD

cd ..
  • Clone the repository:
git clone --depth=1 git@github.com:project-chip/connectedhomeip.git
  • Get submodules for Linux platform:
cd connectedhomeip && ./scripts/checkout_submodules.py --shallow --platform  linux

cd ~/connectedhomeip/examples/lighting-app/linux
  • Go to the lighlighting-app Linux folder and run the activation script:
cd examples/lighting-app/linux/

source third_party/connectedhomeip/scripts/activate.sh

Then the output is:

docker@72911bd09d95:~/connectedhomeip/examples/lighting-app/linux$ source third_party/connectedhomeip/scripts/activate.sh 
bash: scripts/setup/gen_pigweed_cipd_json.py: No such file or directory

  WELCOME TO...

         █
         █
     ▄   █   ▄                                █     █
     ▀▀█████▀▀      ▄▀▀▀▄ ▄▀▀▀▄    ▄▀▀▀▀▄█  ▀▀█▀▀▀▀▀█▀▀   ▄▀▀▀▀▄    ▄▀▀
   ▀█▄       ▄█▀   █     █     █  █      █    █     █    █▄▄▄▄▄▄█  █   
     ▀█▄   ▄█▀     █     █     █  █      █    █     █    █         █   
  ▄██▀▀█   █▀▀██▄  █     █     █   ▀▄▄▄▄▀█    ▀▄▄   ▀▄▄   ▀▄▄▄▄▀   █   
 ▀▀    █   █    ▀▀

  BOOTSTRAP! Bootstrap may take a few minutes; please be patient.

Downloading and installing packages into local source directory:

  Setting up CIPD package manager...done (10.4s)
warning: pattern "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/.environment/pigweed.json" matched 0 files
  Setting up Project actions........skipped (0.1s)
  Setting up Python environment.....Traceback (most recent call last):
  File "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 995, in <module>
    sys.exit(main())
  File "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 987, in main
    return EnvSetup(**vars(parse())).setup()
  File "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 577, in setup
    result = step(spin)
  File "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/env_setup.py", line 766, in virtualenv
    if not virtualenv_setup.install(
  File "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py", line 443, in install
    install_packages(gn_target)
  File "/opt/tests/connectedhomeip/examples/lighting-app/linux/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/virtualenv_setup/install.py", line 402, in install_packages
    subprocess.check_call(
  File "/usr/lib/python3.10/subprocess.py", line 364, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 345, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/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: 'gn'
Installing pip requirements for all...

[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

Bug prevalence

Whenever I try to follow the documentation to try to compile the lightning app example.

GitHub hash of the SDK that was being used

cd0e262

Platform

other

Platform Version(s)

No response

Anything else?

I'm doing these steps from a container based on Ubuntu 22.04 image.
Not sure if it's a bug or an error on documentation.

@locnnil locnnil added bug Something isn't working needs triage labels Apr 4, 2024
@github-actions github-actions bot added the linux label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant