This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-CC2652R7: ninja / zap-cli throwing errors.

Part Number: LP-CC2652R7

Ninja (zap-cli) script is throwing the following errors with this set of instructions:

$ ninja -C out/debug

https://github.com/project-chip/connectedhomeip/blob/master/examples/lock-app/cc13x2x7_26x2x7/README.md

ninja: Entering directory `out/debug'
[1/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.IPPacketInfo.cpp.o
[2/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.IPAddress-StringFuncts.cpp.o
[3/670] stamp obj/third_party/connectedhomeip/src/lib/address_resolve/address_resolve.inputdeps.stamp
[4/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.IPPrefix.cpp.o
[5/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.IPAddress.cpp.o
[6/670] stamp obj/third_party/connectedhomeip/src/lib/asn1/asn1.inputdeps.stamp
[7/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.InetArgParser.cpp.o
[8/670] c++ obj/third_party/connectedhomeip/src/crypto/libChipCrypto.RandUtils.cpp.o
[9/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.InetError.cpp.o
[10/670] ACTION //third_party/connectedhomeip/examples/lock-app/lock-common:lock-common_zapgen_zap_pregen(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
FAILED: gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated/access.h gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated/gen_config.h gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated/endpoint_config.h gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated/CHIPClientCallbacks.h gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated/CHIPClusters.h gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated/IMClusterCommandHandler.cpp
python ../../third_party/connectedhomeip/third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../../third_party/connectedhomeip/examples/lock-app/lock-common --default-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --current-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --capture-output --python-dep-list-files gen/third_party/connectedhomeip/examples/lock-app/lock-common/lock-common_zapgen_zap_pregen_metadata_path_list.txt -- ../../third_party/connectedhomeip/scripts/tools/zap/generate.py --no-prettify-output --templates /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/third_party/connectedhomeip/src/app/zap-templates/app-templates.json --output-dir /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/gen/third_party/connectedhomeip/examples/lock-app/lock-common/zap_pregen/zap-generated --lock-file /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/zap_gen.lock --parallel /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/third_party/connectedhomeip/examples/lock-app/lock-common/lock-app.zap
Usage: zap-cli [OPTIONS] COMMAND [ARGS]...
Try 'zap-cli --help' for help.

Error: No such option: --version Did you mean --verbose?
Searching for zcl file from /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/third_party/connectedhomeip/examples/lock-app/lock-common/lock-app.zap
Traceback (most recent call last):
File "/home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/../../third_party/connectedhomeip/scripts/tools/zap/generate.py", line 325, in <module>
main()
File "/home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/../../third_party/connectedhomeip/scripts/tools/zap/generate.py", line 307, in main
runGeneration(cmdLineArgs)
File "/home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/../../third_party/connectedhomeip/scripts/tools/zap/generate.py", line 190, in runGeneration
tool.version_check()
File "/home/jmarkel/connectedhomeip/scripts/tools/zap/zap_execution.py", line 69, in version_check
for line in subprocess.check_output(self.zap_start + ['--version'], cwd=self.working_directory).splitlines():
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['zap-cli', '--version']' returned non-zero exit status 2.
[11/670] c++ obj/third_party/connectedhomeip/src/lib/asn1/libASN1.ASN1Error.cpp.o
[12/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.UDPEndPoint.cpp.o
[13/670] c++ obj/third_party/connectedhomeip/src/lib/asn1/libASN1.ASN1OID.cpp.o
[14/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.InetInterface.cpp.o
[15/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.TCPEndPoint.cpp.o
[16/670] c++ obj/third_party/connectedhomeip/src/crypto/libChipCrypto.PersistentStorageOperationalKeystore.cpp.o
[17/670] ACTION //third_party/connectedhomeip/src/controller/data_model:data_model_zapgen_zap_pregen(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
FAILED: gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated/access.h gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated/gen_config.h gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated/endpoint_config.h gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated/CHIPClientCallbacks.h gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated/CHIPClusters.h gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated/IMClusterCommandHandler.cpp
python ../../third_party/connectedhomeip/third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../../third_party/connectedhomeip/src/controller/data_model --default-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --current-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --capture-output --python-dep-list-files gen/third_party/connectedhomeip/src/controller/data_model/data_model_zapgen_zap_pregen_metadata_path_list.txt -- ../../third_party/connectedhomeip/scripts/tools/zap/generate.py --no-prettify-output --templates /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/third_party/connectedhomeip/src/app/zap-templates/app-templates.json --output-dir /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/gen/third_party/connectedhomeip/src/controller/data_model/zap_pregen/zap-generated --lock-file /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/zap_gen.lock --parallel /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/third_party/connectedhomeip/src/controller/data_model/controller-clusters.zap
Usage: zap-cli [OPTIONS] COMMAND [ARGS]...
Try 'zap-cli --help' for help.

Error: No such option: --version Did you mean --verbose?
Searching for zcl file from /home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/third_party/connectedhomeip/src/controller/data_model/controller-clusters.zap
Traceback (most recent call last):
File "/home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/../../third_party/connectedhomeip/scripts/tools/zap/generate.py", line 325, in <module>
main()
File "/home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/../../third_party/connectedhomeip/scripts/tools/zap/generate.py", line 307, in main
runGeneration(cmdLineArgs)
File "/home/jmarkel/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/out/debug/../../third_party/connectedhomeip/scripts/tools/zap/generate.py", line 190, in runGeneration
tool.version_check()
File "/home/jmarkel/connectedhomeip/scripts/tools/zap/zap_execution.py", line 69, in version_check
for line in subprocess.check_output(self.zap_start + ['--version'], cwd=self.working_directory).splitlines():
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['zap-cli', '--version']' returned non-zero exit status 2.
[18/670] c++ obj/third_party/connectedhomeip/src/lib/asn1/libASN1.ASN1Reader.cpp.o
[19/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.TCPEndPointImplLwIP.cpp.o
[20/670] c++ obj/third_party/connectedhomeip/src/lib/asn1/libASN1.ASN1Time.cpp.o
[21/670] c++ obj/third_party/connectedhomeip/src/lib/address_resolve/address_resolve.AddressResolve.cpp.o
[22/670] c++ obj/third_party/connectedhomeip/src/inet/libInetLayer.UDPEndPointImplLwIP.cpp.o
[23/670] c++ obj/third_party/connectedhomeip/src/lib/address_resolve/address_resolve.AddressResolve_DefaultImpl.cpp.o
ninja: build stopped: subcommand failed.

whihc zap-cli -> connectedhomeip/.environment/pigweed-venv/bin/zap-cli

  • Do you see this on Ubuntu? If so, try to run the following command to install necessary packages to build again.

    sudo apt-get install -y git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev

  • Same issue: 

    sudo apt-get install -y git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev

    [sudo] password for jmarkel:

    Reading package lists... Done

    Building dependency tree... Done

    Reading state information... Done

    g++ is already the newest version (4:11.2.0-1ubuntu1).

    gcc is already the newest version (4:11.2.0-1ubuntu1).

    libavahi-client-dev is already the newest version (0.8-5ubuntu5).

    libcairo2-dev is already the newest version (1.16.0-5ubuntu2).

    libgirepository1.0-dev is already the newest version (1.72.0-1).

    libreadline-dev is already the newest version (8.1.2-1).

    pkg-config is already the newest version (0.29.2-1ubuntu3).

    ninja-build is already the newest version (1.10.1-1).

    git is already the newest version (1:2.34.1-1ubuntu1.6).

    libdbus-1-dev is already the newest version (1.12.20-2ubuntu4.1).

    libglib2.0-dev is already the newest version (2.72.4-0ubuntu1).

    libssl-dev is already the newest version (3.0.2-0ubuntu1.7).

    python3-dev is already the newest version (3.10.6-1~22.04).

    unzip is already the newest version (6.0-26ubuntu3.1).

    python3-venv is already the newest version (3.10.6-1~22.04).

    The following packages will be upgraded:

      python3-pip

    1 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

    Need to get 1306 kB of archives.

    After this operation, 0 B of additional disk space will be used.

    Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-pip all 22.0.2+dfsg-1ubuntu0.1 [1306 kB]

    Fetched 1306 kB in 0s (3265 kB/s)

    (Reading database ... 37299 files and directories currently installed.)

    Preparing to unpack .../python3-pip_22.0.2+dfsg-1ubuntu0.1_all.deb ...

    Unpacking python3-pip (22.0.2+dfsg-1ubuntu0.1) over (22.0.2+dfsg-1) ...

    Setting up python3-pip (22.0.2+dfsg-1ubuntu0.1) ...

    Processing triggers for man-db (2.10.2-1) ...

     

     

    .

    .

    .

    lusters-app/all-clusters-common/zap_pregen/zap-generated --lock-file /home/jmarkel/connectedhomeip/examples/all-clusters-app/cc13x2x7_26x2x7/out/debug/zap_gen.lock --parallel /home/jmarkel/connectedhomeip/examples/all-clusters-app/cc13x2x7_26x2x7/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
    Usage: zap-cli [OPTIONS] COMMAND [ARGS]...
    Try 'zap-cli --help' for help.

    Error: No such option: --version Did you mean --verbose?

    Usage: zap-cli [OPTIONS] COMMAND [ARGS]...
    
      ZAP CLI v0.10.0 - A simple commandline tool for OWASP ZAP.
    
    Options:
      --boring            Remove color from console output.
      -v, --verbose       Add more verbose debugging output.
      --zap-path TEXT     Path to the ZAP daemon. Defaults to /zap or the value of
                          the environment variable ZAP_PATH.
      -p, --port INTEGER  Port of the ZAP proxy. Defaults to 8090 or the value of
                          the environment variable ZAP_PORT.
      --zap-url TEXT      The URL of the ZAP proxy. Defaults to http://127.0.0.1
                          or the value of the environment variable ZAP_URL.
      --api-key TEXT      The API key for using the ZAP API if required. Defaults
                          to the value of the environment variable ZAP_API_KEY.
      --log-path TEXT     Path to the directory in which to save the ZAP output
                          log file. Defaults to the value of the environment
                          variable ZAP_LOG_PATH and uses the value of --zap-path
                          if it is not set.
      --help              Show this message and exit.
    
    Commands:
      active-scan  Run an Active Scan.
      ajax-spider  Run the AJAX Spider against a URL.
      alerts       Show alerts at the given alert level.
      context      Manage contexts for the current session.
      exclude      Exclude a pattern from all scanners.
      open-url     Open a URL using the ZAP proxy.
      policies     Enable or list a set of policies.
      quick-scan   Run a quick scan.
      report       Generate XML, MD or HTML report.
      scanners     Enable, disable, or list a set of scanners.
      scripts      Manage scripts.
      session      Manage sessions.
      shutdown     Shutdown the ZAP daemon.
      spider       Run the spider against a URL.
      start        Start the ZAP daemon.
      status       Check if ZAP is running.

  • Hi,

    Which commit are you using?

    Can you try with the commit recommended here: https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1082428/faq-cc2652r7-matter----getting-started-guide

    At the time of writing, it is 3af0acd06cfb4a3e1b1a38c4d2091942ed0ef8a5.

    I just checked, and the project is building ok.

    Thanks,
    Toby

  • Hi.

    We had to download zap-linux.zip and point update the path to zap-cli and zap tools. We are using WSL2/Ubuntu to build. Is downloading zap generally not needed? Just wondering if this could've been resolved differently.

    Thanks

  • I don't recall needing to install zap. I believe this should've been part of setup scripts (i.e. bootstrap.sh, activate.sh).