Skip to content

Can't build basic examples doing step-by-step from guide #102

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

Open
truebest opened this issue Mar 31, 2025 · 4 comments
Open

Can't build basic examples doing step-by-step from guide #102

truebest opened this issue Mar 31, 2025 · 4 comments

Comments

@truebest
Copy link

truebest commented Mar 31, 2025

Hi folks,

Once I failed with ubuntu docker, taken my MacBook Apple Silicon and tried to build default examples based on apple example docs

Current swift snapshot: swift-DEVELOPMENT-SNAPSHOT-2025-03-28-a-osx.pkg

TOOLCHAINS=org.swift.62202503281a swift --version
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0

during building led-blink " idf.py build " got follow error

[710/1257] Performing configure step for 'chip_gn'
Done. Made 253 targets from 211 files in 115ms
[711/1257] Performing build step for 'chip_gn'
FAILED: esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-build esp-idf/chip/lib/libCHIP.a /Users/truebest/swift-matter-examples/led-blink/build/esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-build /Users/truebest/swift-matter-examples/led-blink/build/esp-idf/chip/lib/libCHIP.a 
cd "/Users/truebest/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip;/Users/truebest/swift-matter-examples/led-blink/build/esp-idf/chip" && ninja esp32
/bin/sh: line 0: cd: /Users/truebest/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip;/Users/truebest/swift-matter-examples/led-blink/build/esp-idf/chip: No such file or directory
[713/1257] Performing configure step for 'bootloader'

also I tried to build other example, got around same issue.

`FAILED: esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-build esp-idf/chip/lib/libCHIP.a /Users/truebest/swift-matter-examples/smart-light/build/esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-build /Users/truebest/swift-matter-examples/smart-light/build/esp-idf/chip/lib/libCHIP.a 
cd "/Users/truebest/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip;/Users/truebest/swift-matter-examples/smart-light/build/esp-idf/chip" && ninja esp32
/bin/sh: line 0: cd: /Users/truebest/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip;/Users/truebest/swift-matter-examples/smart-light/build/esp-idf/chip: No such file or directory
`
@iCMDdev
Copy link
Contributor

iCMDdev commented Apr 22, 2025

Seems related to the Espressif SDK, did you install it properly? Does ESP-IDF work fine for you?

Also, based on the paths, I think you're referring to the swift-matter-examples repo.

@truebest
Copy link
Author

Hi. In that case, I just followed Apple’s example. Also I tested Espressif SDK without swift, that part works fine.

@kubamracek
Copy link
Collaborator

Did you try the Espressif SDK (IDF) + the Matter SDK (ESP Matter) without Swift? This command that's generated by those SDKs seems completely wrong (it's trying to cd into something that has a ";" in the middle):

cd "/Users/truebest/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip;/Users/truebest/swift-matter-examples/led-blink/build/esp-idf/chip" && ninja esp32

@truebest
Copy link
Author

truebest commented May 1, 2025

As I mentioned earlier, I used both macOS (Apple Silicon) and Ubuntu Linux to build the binaries for the default examples. I followed the instructions from this repository’s README, that link

The log from my initial post was captured on my Mac, using a Swift compiler downloaded from the "Development Snapshots" page.
For Linux, there's a Docker container available that comes with the Swift compiler preinstalled.

Regarding your question about using the Espressif SDK (IDF) and Matter SDK (ESP Matter) without Swift - yes, I’ve successfully built the project using Docker with the following command:

docker run --rm \ -v "$current_dir/light:/project" \ -w /project \ --user "$(id -u):$(id -g)" \ espressif/esp-matter:latest \ sh -c "idf.py set-target esp32c6 && idf.py build"

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

No branches or pull requests

3 participants