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

Unable to compile all-clusters-app on M1 Mac #24734

Closed
phonnakasturi-apple opened this issue Jan 30, 2023 · 8 comments · Fixed by #24973
Closed

Unable to compile all-clusters-app on M1 Mac #24734

phonnakasturi-apple opened this issue Jan 30, 2023 · 8 comments · Fixed by #24973

Comments

@phonnakasturi-apple
Copy link

Reproduction steps / Feature

With SHA 7237d34

I am running into "CMake Error" when I execute idf.py

Steps to reproduce:

  1. cd ~/connectedhomeip
  2. git reset --hard 7237d34
  3. git clean -Xdf
  4. git submodule update --init
  5. export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
  6. source scripts/bootstrap.sh
  7. source scripts/activate.sh
  8. cd ~/tools/esp-idf
  9. git pull
  10. git checkout v4.4.3
  11. git submodule update --init
  12. ./install.sh
  13. . ./export.sh
  14. cd ~/connectedhomeip/examples/all-clusters-app/esp32
  15. idf.py build

Step 15 throws the following error:

CMake Error at /Users/priyankahonnakasturi/tools/esp-idf/tools/cmake/build.cmake:452 (message):
Call Stack (most recent call first):
  /Users/priyankahonnakasturi/tools/esp-idf/tools/cmake/project.cmake:384 (idf_build_process)
  CMakeLists.txt:38 (project)


-- Configuring incomplete, errors occurred!
See also "/Users/priyankahonnakasturi/connectedhomeip/examples/all-clusters-app/esp32/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1

Note: This error has been seen from the following SHA

commit 955f7f5
Author: Shubham Patil [email protected]
Date: Wed Jan 25 20:41:15 2023 +0530

Attaching the complete log
cmake_error.txt

Platform

darwin

Platform Version(s)

No response

Type

Platform validated

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

No response

@bzbarsky-apple
Copy link
Contributor

@shubhamdp @dhrishi

@shubhamdp
Copy link
Contributor

@phonnakasturi-apple can you please share the version of idf-component-manager

python3 -m pip show idf-component-manager | grep Version

I am guessing its old, so may be try upgrading it

python3 -m pip install idf-component-manager --upgrade

Also, the script sourcing sequence should be idf first and connectedhomeip later. Since you have the environment setup,

# open a new terminal
cd esp-idf
. ./export.sh
cd connectedhomeip
source scripts/activate.sh

@bzbarsky-apple
Copy link
Contributor

can you please share the version of idf-component-manager

Shouldn't install.sh handle that?

@bzbarsky-apple
Copy link
Contributor

So I tried this:

% cd examples/all-clusters-app/esp32
% source ~/tools/esp-idf/export.sh
% source ../../../scripts/activate.sh 
% % idf.py build
The following Python requirements are not satisfied:
idf-component-manager~=1.0
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5
itsdangerous<2.1
kconfiglib==13.7.1
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6
construct==2.10.54
To install the missing packages, please run "/Users/bzbarsky/tools/esp-idf/install.sh"

But I absolutely ran `install.sh` before all this (though not in the "activate" environment, because `docs/guides/esp32/setup_idf_chip.md` certainly does not mention activate anywhere in that part).

What are the actual steps for setting up an ESP32 build environment and building, and can we please have the documentation clearly list those steps?

@phonnakasturi-apple
Copy link
Author

@shubhamdp idk version is

python3 -m pip show idf-component-manager | grep Version
Version: 1.0.1

@phonnakasturi-apple
Copy link
Author

@shubhamdp @bzbarsky-apple

After upgrading the idf-component-manager version to 1.2.2,
I was able to build and compile all-clusters-app

@dhrishi
Copy link
Contributor

dhrishi commented Feb 1, 2023

Thanks for the update @phonnakasturi-apple. We will close this after we verify and update the documentation flow. cc @shubhamdp

@shubhamdp
Copy link
Contributor

shubhamdp commented Feb 2, 2023

Performed following steps on Intel chip macbook

cd /tmp
git clone -b v4.4.3 --recursive --depth 1 --shallow-submodules https://github.com/espressif/esp-idf.git
git clone --recursive --depth=1 --shallow-submodules https://github.com/project-chip/connectedhomeip.git

cd esp-idf && ./install.sh && cd -
cd connectedhomeip && source scripts/bootstrap.sh && cd -

source esp-idf/export.sh
source connectedhomeip/scripts/activate.sh

cd connectedhomeip/examples/all-clusters-app/esp32
idf.py build

I get the same error as mentioned by Boris in #24734 (comment).

This is because #22071 restricted requirements.esp32.txt to only linux platform. (One more ref comment from @andy31415 #23477 (comment)).

Using scripts/build/build_examples.py --target esp32-m5stack-all-clusters build also fails with the same errors.

Problem is with the building gevent macbook.

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.

4 participants