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] [nrfconnect] Chef build broken on connectedhomeip/chip-build-vscode:0.7.16 #27316

Closed
erwinpan1 opened this issue Jun 19, 2023 · 1 comment · Fixed by #27317
Closed

[BUG] [nrfconnect] Chef build broken on connectedhomeip/chip-build-vscode:0.7.16 #27316

erwinpan1 opened this issue Jun 19, 2023 · 1 comment · Fixed by #27317

Comments

@erwinpan1
Copy link
Contributor

Reproduction steps

  1. Docker pull connectedhomeip/chip-build-vscode:0.7.16
  2. Checkout project-chip/connectedhomeip/ master
  3. Run the run_in script below and it finally failed with the error message: nrfconnect toolchain was not found. Make sure nrfconnect.ZEPHYR_SDK_INSTALL_DIR is set on your config.yaml file...
root@9559ad961dc3:/workspace# ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect"

  WELCOME TO...

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

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

... (ignored) ...

Building ./chef.py -cbr -d rootnode_dimmablelight_bCwGYSDpoe -t nrfconnect
--------------------------------------------------------------------------


  ______  __    __   _______  _______
 /      ||  |  |  | |   ____||   ____|
|  ,----'|  |__|  | |  |__   |  |__
|  |     |   __   | |   __|  |   __|
|  `----.|  |  |  | |  |____ |  |
 \______||__|  |__| |_______||__|

Target is set to rootnode_dimmablelight_bCwGYSDpoe
Setting up environment...
The path for nrfconnect toolchain was not found. Make sure nrfconnect.ZEPHYR_SDK_INSTALL_DIR is set on your config.yaml file. This is typically <NCS INSTALL PATH>/ncs/toolchains/vX.X.X/opt/zephyr-sdk
Traceback (most recent call last):
  File "/workspace/./examples/chef/chef.py", line 932, in <module>
    sys.exit(main())
  File "/workspace/./examples/chef/chef.py", line 382, in main
    shell.run_cmd(command)
  File "/workspace/examples/chef/stateful_shell.py", line 139, in run_cmd
    raise RuntimeError(
RuntimeError: Error. Nonzero return code.
Returncode: 1
Cmd: ./chef.py -cbr -d rootnode_dimmablelight_bCwGYSDpoe -t nrfconnect

Bug prevalence

Everytime

GitHub hash of the SDK that was being used

12d8fec

Platform

nrf

Platform Version(s)

No response

Anything else?

It is caused by the [nrfconnect] Update nRF Connect SDK version to 2.4.0 (#27010) where the PR is forcing to check the env ZEPHYR_SDK_INSTALL_DIR. Unfortunately, this env doesn't exist in the docker image connectedhomeip/chip-build-vscode:0.7.16
4c7f38d#diff-3dca1b4a352864488fc76b756c0c50d4af075e886073bb5b02236065c2c6b713R471-R473

...
        config["nrfconnect"]["ZEPHYR_SDK_INSTALL_DIR"] = os.environ.get(
            'ZEPHYR_SDK_INSTALL_DIR')
...
        if config['nrfconnect']['ZEPHYR_SDK_INSTALL_DIR'] is None:
            flush_print(
                'The path for nrfconnect toolchain was not found. Make sure nrfconnect.ZEPHYR_SDK_INSTALL_DIR is set on your config.yaml file. This is typically <NCS INSTALL PATH>/ncs/toolchains/vX.X.X/opt/zephyr-sdk')
            exit(1)
@erwinpan1
Copy link
Contributor Author

After exporting the ENV variable, I re-run the script again successfully.

$ export ZEPHYR_SDK_INSTALL_DIR="/opt/NordicSemiconductor/nRF5_tools/zephyr-sdk-0.16.0"
$ rm examples/chef/config.yaml 
$ ./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect"
...
[821/821] Linking CXX executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      827620 B         1 MB     78.93%
             RAM:      233956 B       256 KB     89.25%
        IDT_LIST:          0 GB         2 KB      0.00%
Done
-------------------
Bundling nrfconnect
-------------------

Cleaning /workspace/examples/chef/staging
Checking for bundle_nrfconnect
Found bundle_nrfconnect
Copying rootnode_dimmablelight_bCwGYSDpoe.matter
Generating metadata for rootnode_dimmablelight_bCwGYSDpoe

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

Successfully merging a pull request may close this issue.

1 participant