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

[BUG] Chip-Cert-Bins build failing to build in the bloaty section #35364

Closed
raju-apple opened this issue Sep 3, 2024 · 7 comments
Closed

[BUG] Chip-Cert-Bins build failing to build in the bloaty section #35364

raju-apple opened this issue Sep 3, 2024 · 7 comments
Assignees
Labels
bug Something isn't working linux needs triage

Comments

@raju-apple
Copy link
Contributor

raju-apple commented Sep 3, 2024

Reproduction steps

Tried to create a chip-cert-bins image using the following command and its failing in the bloat comparison tools section

docker buildx build --build-arg COMMITHASH=1d7477934bbfaaaba3556d60a617c071830acf42 --platform linux/arm64 --tag connectedhomeip/chip-cert-bins:1d7477934bbfaaaba3556d60a617c071830acf42 --push .

Failure
ERROR: failed to solve: process "/bin/sh -c set -x && git clone https://github.com/google/bloaty.git && mkdir -p bloaty/build && cd bloaty/build && cmake -G Ninja ../ && ninja && ninja install && cd ../.. && rm -rf bloaty && : # last line" did not complete successfully: exit code: 1

Bug prevalence

Every time

GitHub hash of the SDK that was being used

1d74779

Platform

other

Platform Version(s)

arm64

Anything else?

Attached full failure logs

bloaty_full_fail_logs.rtf.zip

@raju-apple raju-apple added bug Something isn't working needs triage labels Sep 3, 2024
@github-actions github-actions bot added the linux label Sep 3, 2024
@raju-apple
Copy link
Contributor Author

raju-apple commented Sep 3, 2024

@andy31415 do you know if anything changed recently in the bloaty section ? . I know @tehampson added some apps recently and so did @rquidute but don't think that should cause this failure .

------
Dockerfile:145
--------------------
 144 |     # Install bloat comparison tools
 145 | >>> RUN set -x \
 146 | >>>     && git clone https://github.com/google/bloaty.git \
 147 | >>>     && mkdir -p bloaty/build \
 148 | >>>     && cd bloaty/build \
 149 | >>>     && cmake -G Ninja ../ \
 150 | >>>     && ninja \
 151 | >>>     && ninja install \
 152 | >>>     && cd ../.. \
 153 | >>>     && rm -rf bloaty \
 154 | >>>     && : # last line
 155 |     
--------------------

@joyoungjun
Copy link
Contributor

joyoungjun commented Sep 3, 2024

I had the same problem and I solved it with below.

  1. Copy the codes below (referenced here)

RUN git clone https://github.com/abseil/abseil-cpp.git /tmp/abseil-cpp
&& cd /tmp/abseil-cpp
&& cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
&& cmake --build build --target install
&& rm -rf /tmp/abseil-cpp

  1. Past to the Dockerfile at 'connectedhomeip/integerations/docker/images/chip-cert-bins/Dockerfile' (referenced here )

This commit should also be reflected in chip-cert-bins

@tehampson
Copy link
Contributor

Please look at this thread for more information, but pretty much what Amine. I am just summarizing discovered was:

This is my understanding of the issue:

  • Issue with bloaty started in this PR
  • Bloaty has it's own copy of some version of abseil
  • Prior to the PR from Bloaty that caused the issue they selected the abseil files that they wanted to compile
  • Whoever made that change maybe they weren't affected because they had a version of abseil in their system path
  • With that CMake change they have a option for someone to use the abseil version they want, but will use the default on in their repo that will fail on that fail if compiled (which it seems to be for us but not for them)

The work around suggested by @joyoungjun is what we need right now, but I think bloaty is working on a fix, maybe google/bloaty#384 is an alternative

@raju-apple
Copy link
Contributor Author

Let me try the workaround , maybe we should put the PR up also on the docker file in cert-bins if it works.

@Alami-Amine
Copy link
Contributor

FYI an issue has been opened at Bloaty: google/bloaty#386
and as @tehampson said, their PR: google/bloaty#384 should fix the issue for us, and then we can remove the workaround

@raju-apple
Copy link
Contributor Author

raju-apple commented Sep 4, 2024

Confirmed the workaround is good , put up a PR , Please review when you get a chance @andy31415 @Alami-Amine @tehampson . Thanks ! FYI @naveenkommareddi , we need to make sure this makes it before the SDK cutoff tomorrow.

@Alami-Amine
Copy link
Contributor

Alami-Amine commented Sep 4, 2024

by the way @raju-apple, this fix is not needed anymore. issue fixed
Bloaty integrated their PR google/bloaty#384 that bumps absiel to latest version.
I have tested it in a PR and its working.
The PR

@github-staff github-staff deleted a comment from maher-nakesh Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants