sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
746 stars 1.44k forks source link

The `make all` command fails for the target `target/sonic-vs.bin__vs__rfs.squashfs` for the VS platform #20679

Open mramezani95 opened 1 month ago

mramezani95 commented 1 month ago

Description

I was following the directions on the README page to build a SONiC image for the VS platform from the master branch, but the last command fails:

make SONIC_BUILD_JOBS=4 all

The error log shows that the target target/sonic-vs.bin__vs__rfs.squashfs fails to build. However, I was able to build this target separately using the following command:

make BLDENV=bookworm -f Makefile.work target/sonic-vs.bin__vs__rfs.squashfs

But the make all command still fails (for a different target) even after executing the above command.

Steps to reproduce the issue:

  1. make clean
  2. make init
  3. make configure PLATFORM=vs
  4. make SONIC_BUILD_JOBS=4 all

Describe the results you received:

The make all command fails for the target target/sonic-vs.bin__vs__rfs.squashfs. The error log is provided below:

[ FAIL LOG START ] [ target/sonic-vs.bin__vs__rfs.squashfs ]
Build start time: Sat Nov 2 00:06:24 UTC 2024
++ '[' -f .arch ']'
++ cat .arch
+ CONFIGURED_ARCH=amd64
+ DOCKER_VERSION=5:24.0.2-1~debian.12~bookworm
+ CONTAINERD_IO_VERSION=1.6.21-1
+ LINUX_KERNEL_VERSION=6.1.0-22-2
+ FILESYSTEM_ROOT=./fsroot
+ PLATFORM_DIR=platform
+ HOSTNAME=sonic
+ DEFAULT_USERINFO='Default admin user,,,'
+ BUILD_TOOL_PATH=src/sonic-build-hooks/buildinfo
+ TRUSTED_GPG_DIR=src/sonic-build-hooks/buildinfo/trusted.gpg.d
+ . ./onie-image.conf
++ : 32768
++ : x86_64
++ : vs
++ ONIEIMAGE_VERSION=r0
++ FILESYSTEM_ROOT=./fsroot-vs
++ FILESYSTEM_SQUASHFS=fs.squashfs
++ INSTALLER_PAYLOAD=fs.zip
++ FILESYSTEM_DOCKERFS=dockerfs.tar.gz
++ DOCKERFS_DIR=docker
++ DOCKER_RAMFS_SIZE=2500M
++ OUTPUT_ONIE_IMAGE=target/sonic-vs.bin
++ OUTPUT_RAW_IMAGE=target/sonic-vs.raw
++ RAW_IMAGE_DISK_SIZE=1700
++ OUTPUT_KVM_IMAGE=target/sonic-vs.img
++ KVM_IMAGE_DISK_SIZE=16
++ OUTPUT_ABOOT_IMAGE=target/sonic-aboot-vs.swi
++ ABOOT_BOOT_IMAGE=.sonic-boot.swi
++ OUTPUT_KVM_4ASIC_IMAGE=target/sonic-4asic-vs.img
++ OUTPUT_KVM_6ASIC_IMAGE=target/sonic-6asic-vs.img
++ OUTPUT_DSC_IMAGE=target/sonic-vs.tar
+ '[' -n 32768 ']'
+ '[' -n fs.zip ']'
+ '[' -n fs.squashfs ']'
+ '[' onie = aboot ']'
+ [[ n != y ]]
+ [[ -d ./fsroot-vs ]]
+ mkdir -p ./fsroot-vs
+ mkdir -p ./fsroot-vs/platform
+ touch ./fsroot-vs/platform/firsttime
+ bootloader_packages=
+ '[' grub '!=' aboot ']'
+ mkdir -p ./fsroot-vs/platform/grub
+ bootloader_packages=grub2-common
+ sudo mount proc /proc -t proc
+ echo '[INFO] Build host debian base system...'
[INFO] Build host debian base system...
+ TARGET_PATH=target
+ scripts/build_debian_base_system.sh amd64 bookworm ./fsroot-vs
I: Target architecture can be executed
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 4D64FEC119C2029067D6E791F8D2585B8783D481)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
E: Couldn't find these debs:  adduser apt base-files base-passwd bash bsdutils coreutils dash debconf debian-archive-keyring debianutils diffutils dpkg e2fsprogs findutils gcc-12-base gpgv grep gzip hostname init-system-helpers libacl1 libapt-pkg6.0 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap-ng0 libcap2 libcom-err2 libcrypt1 libdb5.3 libdebconfclient0 libext2fs2 libffi8 libgcc-s1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libhogweed6 libidn2-0 liblz4-1 liblzma5 libmd0 libmount1 libnettle8 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre2-8-0 libseccomp2 libselinux1 libsemanage-common libsemanage2 libsepol2 libsmartcols1 libss2 libstdc++6 libsystemd0 libtasn1-6 libtinfo6 libudev1 libunistring2 libuuid1 libxxhash0 libzstd1 login logsave mawk mount ncurses-base ncurses-bin passwd perl-base sed sysvinit-utils tar tzdata usr-is-merged util-linux util-linux-extra zlib1g
[  FAIL LOG END  ] [ target/sonic-vs.bin__vs__rfs.squashfs ]
make: *** [slave.mk:1308: target/sonic-vs.bin__vs__rfs.squashfs] Error 1
make[1]: *** [Makefile.work:605: all] Error 2

Describe the results you expected:

The make all command should succeed.

Output of show version:

N/A

Output of show techsupport:

N/A

Additional information you deem important (e.g. issue happens only occasionally):

Always reproducible.

arlakshm commented 4 weeks ago

can please check this error "dn't find these debs: adduser apt base-files base-passwd bash bsdutils coreutils dash debconf debian-archive-keyring debianutils diffutils dpkg e2fsprogs findutils gcc-12-base gpgv grep gzip hostname init-system-helpers libacl1 libapt-pkg6.0 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap-ng0 libcap2 libcom-err2 libcrypt1 libdb5.3 libdebconfclient0 libext2fs2 libffi8 libgcc-s1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libhogweed6 libidn2-0 liblz4-1 liblzma5 libmd0 libmount1 libnettle8 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre2-8-0 libseccomp2 libselinux1 libsemanage-common libsemanage2 libsepol2 libsmartcols1 libss2 libstdc++6 libsystemd0 libtasn1-6 libtinfo6 libudev1 libunistring2 libuuid1 libxxhash0 libzstd1 login logsave mawk mount ncurses-base ncurses-bin passwd perl-base sed sysvinit-utils tar tzdata usr-is-merged util-linux util-linux-extra zlib1g". This could be issue in your local environment

mramezani95 commented 3 weeks ago

Hi @arlakshm, As far as I know, the build process is delegated to a number of slave docker containers. I think the slave containers are not setup properly in this case. By the way, I checked some of these dependencies on my machine and they are already installed.