project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.39k stars 1.98k forks source link

[Build] Bootstraph.sh fails with pip protobuf error #32533

Open samryanuofl opened 6 months ago

samryanuofl commented 6 months ago

Build issue(s)

  1. Trying to build v1.2.0.0 tag (52e4a643)
  2. Clone, git submodules and run source scripts/bootstrap.sh
  3. Get the error:
    python3 ../../third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../.. --default-toolchain=//build/toolchain/linux:linux_x64_gcc --current-toolchain=//third_party/pigweed/repo/pw_build/python_toolchain:python --capture-output --module piptools --python-virtualenv-config python/gen/matter_build_venv/venv_metadata.json --python-dep-list-files python/gen/matter_build_venv._compile_requirements_metadata_path_list.txt -- compile --resolver=backtracking --allow-unsafe --output-file python/gen/matter_build_venv/compiled_requirements.txt python/gen/matter_build_venv/generated_requirements.txt ../../scripts/setup/requirements.build.txt
    ERROR: Cannot install -r python/gen/matter_build_venv/generated_requirements.txt (line 86), protobuf and protobuf~=3.20.1 because these package versions have conflicting dependencies.
  4. See attached log for full error
  5. Running Ubuntu 22.04.1 LTS
  6. Previously I was able to run this build on the same VM without issues ... build.log

Platform

No response

Anything else?

No response

bzbarsky-apple commented 6 months ago

@andy31415

sanlingye commented 6 months ago

have u solved this question? i meet it too

samryanuofl commented 6 months ago

Git bisect tells me it was fixed by this commit: https://github.com/project-chip/connectedhomeip/commit/19d03a0c07f645ca906c7677a07b22dd49e9b9fa

So it should be fixed by updating to v1.2.0.1.

I don't understand the bootstrap script well enough to know why the 1.2.0.0 build started failing, I guess one of the online dependencies changed?

@sanlingye

tehampson commented 6 months ago

Hmm... Interesting that you found 19d03a0 to be the fix.

I am just wondering in your build environment when you hit the issue on v1.2.0.0 tag (https://github.com/project-chip/connectedhomeip/commit/52e4a6435f74b20fb1bf355cc67587c3a3853488), was that a clean build? As in did you remove .environment/ before running bootstrap?

tehampson commented 6 months ago

Also after updating the git submodule, what is the commit id third_party/pigweed/

tehampson commented 6 months ago

@samryanuofl do you mind answer the questions above when you are able to reproduce the issue?

samryanuofl commented 6 months ago

@tehampson

When the build failed on v1.2.0.0 it was a clean build, I had deleted the .environment file.

For the third_party/pigweed submodule:

When connectedhomeip is on https://github.com/project-chip/connectedhomeip/commit/19d03a0c07f645ca906c7677a07b22dd49e9b9fa pigweed is 90d97fa3b (bootstrap works)

When connectedhomeip is on the v1.2.0.0 tag pigweed is fbb318aff (bootstrap fails).

jmartinez-silabs commented 5 months ago

@samryanuofl @tehampson To be able to bootstrap v1.2.0.0, you will have to change the following :

in scripts/setup/requirements.all.txt change protobuf==3.20.1 to protobuf==3.20.2

in scripts/setup/constraints.txt change prompt-toolkit==3.0.38 to prompt-toolkit==3.0.43 and protobuf==3.20.1 to protobuf==3.20.2

@andy31415 @bzbarsky-apple v1.2.0.0 is a tag and there is no matching branch so we can't currently push this change. I believe v1.2.0.1 also fails to bootstrap due to the required prompt-toolkit version on that tag.

bzbarsky-apple commented 5 months ago

We could consider moving the tags to a different revision, but that does require creating a new changeset branching off the current tag, right? And that might need a branch if doing things via github....

andy31415 commented 5 months ago

I can create a branch out of the latest tag if we need some way to keep updating. I am unsure how long we are maintaining old versions - for my own needs, I generally maintain matter and potentially 1 version behind,

andy31415 commented 5 months ago

I created https://github.com/project-chip/connectedhomeip/tree/v1.2-branch from v1.2.0.1