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
Use pre built zap binary #29
Conversation
snap/snapcraft.yaml
Outdated
|
||
# Install zap | ||
npm install | ||
mkdir -p /bin && mv zap-cli /bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the bin directory meant to be relative to the current directory, as added to the PATH?
mkdir -p /bin && mv zap-cli /bin | |
mkdir -p bin && mv zap-cli bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see this comment; the zap-cli doesn't need to be moved to the bin directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needed to be in the ./bin
directory because your environment variables pointed to that:
echo "export ZAP_DEVELOPMENT_PATH=$PWD/bin" >> env
echo "export ZAP_INSTALL_PATH=$PWD/bin" >> env
echo "export PATH=$PWD/bin:$PATH" > env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the doc, ZAP_DEVELOPMENT_PATH
and PATH
are no longer needed. Only ZAP_INSTALL_PATH
needs to point to where zap-linux-arm64.zip was unpacked.
The code is already updated as follows::
wget https://github.com/project-chip/zap/releases/download/$ZAP_VERSION/zap-linux-$SNAP_ARCH.zip
unzip -o zap-linux-$SNAP_ARCH.zip
# Define the environment needed for the app build
echo "export ZAP_INSTALL_PATH=$PWD" >> env
reference: https://project-chip.github.io/connectedhomeip-doc/guides/BUILDING.html#which-zap-to-use According to the above reference, that only |
The code can be built successfully on arm64 Pi, but it failed on snapcraft remote-build with the following error:
|
The issue isn't related to zap. On remote build, the env file created in Remote build:
On Pi:
Note that remote build uses Launchpad and as far as I know those builds use the destructive mode, i.e. building directly on the host. The difference in paths appears related to that. |
This PR downloads and unzips the prebuilt ZAP (Zigbee Cluster Library configuration tool and generator) binary for the ARM64 architecture, which will make the build more efficient.