SiliconLabs / matter

Matter is creating more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://www.silabs.com/wireless/matter
Apache License 2.0
151 stars 45 forks source link

Lighting app build error #84

Closed eos1d3 closed 1 year ago

eos1d3 commented 1 year ago

Description of the issue

Trying to build lighting app and got the error:

BUILD_DIR=./out/lighting-app/BRD2601B
+ '[' false == true ']'
+ '[' -z '' ']'
+ gn gen --check --fail-on-unused-args --export-compile-commands --root=./examples/lighting-app/silabs/efr32/ '--args=silabs_board="BRD2601B"' ./out/lighting-app/BRD2601B
ERROR at //third_party/connectedhomeip/third_party/openthread/BUILD.gn:27:23: Unable to load "/Users/me/connectedhomeip/examples/lighting-app/silabs/efr32/third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread/BUILD.gn".
      public_deps = [ "${openthread_root}:libopenthread-ftd" ]

Steps to reproduce the issue

Start with the commands:

git clone https://github.com/SiliconLabs/matter.git connectedhomeip   
cd connectedhomeip
export PATH="/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/bin:$PATH"
./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app BRD4161A

Device type(s) and network topology

No device involved yet. Just build on Mac.

Proposed solution(s)

v1.0.2-1.0

SMG version

release_0.1.0

Protocol(s)

Openthread

Hardware platform(s)

BRD2601B, BRD4161A

Development platform(s)

macOS 11.7.2

Captured data or logs


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

  ACTIVATOR! This sets your shell environment variables.

Activating environment (setting environment variables):

  Setting environment variables for CIPD package manager...done
  Setting environment variables for Python environment.....done
  Setting environment variables for pw packages............skipped
  Setting environment variables for Host tools.............done

Checking the environment:

20230108 04:26:47 INF Environment passes all checks!

Environment looks good, you are ready to go!

+ env
PW_PIGWEED_CIPD_INSTALL_DIR=/Users/me/connectedhomeip/.environment/cipd/packages/pigweed
TERM_PROGRAM=Apple_Terminal
PW_PACKAGE_ROOT=/Users/me/connectedhomeip/.environment/packages
SHELL=/bin/zsh
TERM=xterm-256color
TMPDIR=/var/folders/0s/mb7yvbg14yl6_kgn8tkl7s3r0000gn/T/
TERM_PROGRAM_VERSION=440
TERM_SESSION_ID=2607A424-A0F7-4A92-B364-2E0018AA9D15
USER=me
PW_BRANDING_BANNER=/Users/me/connectedhomeip/scripts/matter_banner.txt
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SZ7Uq74tIh/Listeners
_PW_ENVIRONMENT_CONFIG_FILE=/Users/me/connectedhomeip/scripts/environment.json
VIRTUAL_ENV=/Users/me/connectedhomeip/.environment/pigweed-venv
PATH=/Users/me/connectedhomeip/third_party/pigweed/repo/out/host/host_tools:/Users/me/connectedhomeip/.environment/pigweed-venv/bin:/Users/me/connectedhomeip/.environment/cipd/packages/python/bin:/Users/me/connectedhomeip/.environment/cipd/packages/python:/Users/me/connectedhomeip/.environment/cipd/packages/pigweed/bin:/Users/me/connectedhomeip/.environment/cipd/packages/pigweed:/Users/me/connectedhomeip/.environment/cipd/packages/arm/bin:/Users/me/connectedhomeip/.environment/cipd/packages/arm:/Users/me/connectedhomeip/.environment/cipd:/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/bin:/Applications/ArmGNUToolchain/12.2.rel1/arm-none-eabi/bin:/Users/me/esp/xtensa-esp32-elf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Users/me/esp/esp-rainmaker/cli
PW_ROOT=/Users/me/connectedhomeip/third_party/pigweed/repo
PW_ARM_CIPD_INSTALL_DIR=/Users/me/connectedhomeip/.environment/cipd/packages/arm
__CFBundleIdentifier=com.apple.Terminal
PWD=/Users/me/connectedhomeip
XPC_FLAGS=0x0
_PW_ACTUAL_ENVIRONMENT_ROOT=/Users/me/connectedhomeip/.environment
XPC_SERVICE_NAME=0
SHLVL=2
HOME=/Users/me
_PW_ROSETTA=0
LOGNAME=me
LC_CTYPE=UTF-8
IDF_CCACHE_ENABLE=0
PW_PYTHON_CIPD_INSTALL_DIR=/Users/me/connectedhomeip/.environment/cipd/packages/python
PW_PROJECT_ROOT=/Users/me/connectedhomeip
RMAKER_PATH=/Users/me/esp/esp-rainmaker
_=/usr/bin/env
+ USE_WIFI=false
+ SILABS_THREAD_TARGET='"../silabs:ot-efr32-cert"'
+ USAGE='./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <silabs_board_name> [<Build options>]'
+ '[' 3 == 0 ']'
+ '[' 3 -lt 2 ']'
+ ROOT=./examples/lighting-app/silabs/efr32/
+ OUTDIR=./out/lighting-app
+ '[' 3 -gt 2 ']'
+ SILABS_BOARD=BRD2601B
+ shift
+ shift
+ shift
+ '[' 0 -gt 0 ']'
+ '[' -z BRD2601B ']'
+ BUILD_DIR=./out/lighting-app/BRD2601B
+ echo BUILD_DIR=./out/lighting-app/BRD2601B
BUILD_DIR=./out/lighting-app/BRD2601B
+ '[' false == true ']'
+ '[' -z '' ']'
+ gn gen --check --fail-on-unused-args --export-compile-commands --root=./examples/lighting-app/silabs/efr32/ '--args=silabs_board="BRD2601B"' ./out/lighting-app/BRD2601B
ERROR at //third_party/connectedhomeip/third_party/openthread/BUILD.gn:27:23: Unable to load "/Users/me/connectedhomeip/examples/lighting-app/silabs/efr32/third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread/BUILD.gn".
      public_deps = [ "${openthread_root}:libopenthread-ftd" ]
                      ^-------------------------------------
eos1d3 commented 1 year ago

I followed https://developers.home.google.com/matter/vendors/silicon-labs

And this works. But it includes a lot other silicon solutions. What is the correct way to setup SMG on Mac?

silabs-sebastien commented 1 year ago

I followed https://developers.home.google.com/matter/vendors/silicon-labs And this works. But it includes a lot other silicon solutions.

Yes, the steps you mention above should work fine. As you may have noticed, they perform more steps than just cloning the repo.

What is the correct way to setup SMG on Mac?

If you browse the SMG documentation for building a MAD (Matter Accessory Device), you will find in step one the requirements for how to set up the SMG for this task. Those are under the heading Building the Matter Image File from the Repository.

There you will find two links you should check out:

  1. The Matter Software Requirements page, which includes steps specific to Mac.
  2. The README for building a Matter EFR32 Lighting Example.

If you have further support questions about using the SMG, please create a post in the Silabs Matter Community.