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

sonic-net/sonic-buildimage: Build fails with only BULLSEYE enabled #11769

Closed
ashwin-h opened this issue Aug 18, 2022 · 12 comments
Closed

sonic-net/sonic-buildimage: Build fails with only BULLSEYE enabled #11769

ashwin-h opened this issue Aug 18, 2022 · 12 comments

Comments

@ashwin-h
Copy link
Contributor

Description

Steps to reproduce the issue:

git clone https://github.com/sonic-net/sonic-buildimage
make init
make configure PLATFORM=broadcom
NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 NOBULLSEYE=0 make target/sonic-broadcom.bin

Describe the results you received:

Build error log below
Make: *** No rule to make target 'target/docker-fpm-frr.gz', needed by 'target/sonic-broadcom.bin'. Stop.

Describe the results you expected:

Build should work fine

@bgmastermind
Copy link

bgmastermind commented Aug 18, 2022

same here
but since yesterday it fails at a new step sooner than docker-fpm-frr.gz
with endless loop

[ FAIL LOG START ] [ target/debs/bullseye/libsnmp-dev_5.9+dfsg-3+b1_amd64.deb-install ]
dpkg: warning: downgrading libsnmp-dev from 5.9+dfsg-4+deb11u1 to 5.9+dfsg-3+b1
(Reading database ... 214260 files and directories currently installed.)
Preparing to unpack .../libsnmp-dev_5.9+dfsg-3+b1_amd64.deb ...
Unpacking libsnmp-dev (5.9+dfsg-3+b1) over (5.9+dfsg-4+deb11u1) ...
dpkg: dependency problems prevent configuration of libsnmp-dev:
 libsnmp-dev depends on libnetsnmptrapd40 (= 5.9+dfsg-3+b1); however:
  Version of libnetsnmptrapd40:amd64 on system is 5.9+dfsg-4+deb11u1.

dpkg: error processing package libsnmp-dev (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 libsnmp-dev
[  FAIL LOG END  ] [ target/debs/bullseye/libsnmp-dev_5.9+dfsg-3+b1_amd64.deb-install ]
[ FAIL LOG START ] [ target/debs/bullseye/libsnmp-dev_5.9+dfsg-3+b1_amd64.deb-install ]
dpkg: warning: downgrading libsnmp-dev from 5.9+dfsg-4+deb11u1 to 5.9+dfsg-3+b1
(Reading database ... 214260 files and directories currently installed.)
Preparing to unpack .../libsnmp-dev_5.9+dfsg-3+b1_amd64.deb ...
Unpacking libsnmp-dev (5.9+dfsg-3+b1) over (5.9+dfsg-4+deb11u1) ...
dpkg: dependency problems prevent configuration of libsnmp-dev:
 libsnmp-dev depends on libnetsnmptrapd40 (= 5.9+dfsg-3+b1); however:
  Version of libnetsnmptrapd40:amd64 on system is 5.9+dfsg-4+deb11u1.

@anamehra
Copy link
Contributor

same here but since yesterday it fails at a new step sooner than docker-fpm-frr.gz with endless loop

[ FAIL LOG START ] [ target/debs/bullseye/libsnmp-dev_5.9+dfsg-3+b1_amd64.deb-install ]
dpkg: warning: downgrading libsnmp-dev from 5.9+dfsg-4+deb11u1 to 5.9+dfsg-3+b1
(Reading database ... 214260 files and directories currently installed.)
Preparing to unpack .../libsnmp-dev_5.9+dfsg-3+b1_amd64.deb ...
Unpacking libsnmp-dev (5.9+dfsg-3+b1) over (5.9+dfsg-4+deb11u1) ...
dpkg: dependency problems prevent configuration of libsnmp-dev:
 libsnmp-dev depends on libnetsnmptrapd40 (= 5.9+dfsg-3+b1); however:
  Version of libnetsnmptrapd40:amd64 on system is 5.9+dfsg-4+deb11u1.

dpkg: error processing package libsnmp-dev (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 libsnmp-dev
[  FAIL LOG END  ] [ target/debs/bullseye/libsnmp-dev_5.9+dfsg-3+b1_amd64.deb-install ]
[ FAIL LOG START ] [ target/debs/bullseye/libsnmp-dev_5.9+dfsg-3+b1_amd64.deb-install ]
dpkg: warning: downgrading libsnmp-dev from 5.9+dfsg-4+deb11u1 to 5.9+dfsg-3+b1
(Reading database ... 214260 files and directories currently installed.)
Preparing to unpack .../libsnmp-dev_5.9+dfsg-3+b1_amd64.deb ...
Unpacking libsnmp-dev (5.9+dfsg-3+b1) over (5.9+dfsg-4+deb11u1) ...
dpkg: dependency problems prevent configuration of libsnmp-dev:
 libsnmp-dev depends on libnetsnmptrapd40 (= 5.9+dfsg-3+b1); however:
  Version of libnetsnmptrapd40:amd64 on system is 5.9+dfsg-4+deb11u1.

This looks different from the original issue reported.
This is because rules/snmpd.mk uses hardcoded version 5.9+dfsg-3+b1 but a new version is available to download 5.9+dfsg-4+deb11u1, looks like released two days ago

@anamehra
Copy link
Contributor

@abdosi FYI-

@adyeung
Copy link
Collaborator

adyeung commented Aug 19, 2022

FRR bullseye migration change is posted

#11777

@saiarcot895
Copy link
Contributor

NOJESSIE=1 NOSTRETCH=1 NOBUSTER=1 NOBULLSEYE=0 make target/sonic-broadcom.bin

This is not a supported build command. As of today, both Buster and Bullseye are needed to build a SONiC image.

Is there a reason you are explicitly setting the NO* variables?

@ashwin-h
Copy link
Contributor Author

@saiarcot895 To reduce the buildtime/space i thought we can build only one version of the debian distribution and build the image. Do we reuse the pkgs across debian distributions during build ? We should be able to build one version of the debian and create the image.

@bgmastermind
Copy link

Well the first time I tried it was the default makefile strech, buster, bulsseye. Which failed.
Then I thought exactly the same as ashwin, to save time I tried only bullseye which again failed.
Then decided that I can try the others, but always isolated. Just buster, just stretch. Build again failed.
Please update the build readme with that very important information.

@saiarcot895
Copy link
Contributor

@saiarcot895 To reduce the buildtime/space i thought we can build only one version of the debian distribution and build the image. Do we reuse the pkgs across debian distributions during build ? We should be able to build one version of the debian and create the image.

Some containers are currently defined to be on Buster, whereas others are defined to be on Bullseye. For certain platforms, those platforms may have containers that are based on Stretch, and so Stretch will be required as well.

Additionally, it is not that a version of Debian is being built; SONiC builds SONiC-specific/modified packages for a particular Debian distribution, which then get used in one of the Docker containers. Packages built for one version of Debian are not reused across Debian distributions, since those packages may need to be recompiled for newer libraries/dependencies.

Well the first time I tried it was the default makefile strech, buster, bulsseye. Which failed. Then I thought exactly the same as ashwin, to save time I tried only bullseye which again failed. Then decided that I can try the others, but always isolated. Just buster, just stretch. Build again failed. Please update the build readme with that very important information.

The expectation is that just running make target/sonic-broadcom.bin (or the appropriate target for the platform that you're building) should work. If that doesn't work, then that's an error that needs to be fixed.

@bgmastermind
Copy link

Thank you I get it now. Also with latest fixes it builds successfully.

@ashwin-h
Copy link
Contributor Author

The expectation is that just running make target/sonic-broadcom.bin (or the appropriate target for the platform that you're building) should work. If that doesn't work, then that's an error that needs to be fixed.

Thanks @saiarcot895 for the clarification. I observed that for make target/sonic-broadcom.bin works fine with buster and bullseye. In that case we don't need strech/jessie. But what i see is make calls for stretch(by default) as well. Is this configurable per platform so that we can avoid building unnecessary version required for the target ?

@saiarcot895
Copy link
Contributor

saiarcot895 commented Aug 24, 2022

No, it's not configurable per platform. However, in terms of additional space/time used, it should only be the Stretch slave container that gets built.

@ashwin-h
Copy link
Contributor Author

Thanks @saiarcot895 .. target/sonic-broadcom.bin works with buster and bullseye enabled..

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

5 participants