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

VS image build failed when P4RT container is enabled #9885

Open
zhangineer2 opened this issue Jan 28, 2022 · 9 comments
Open

VS image build failed when P4RT container is enabled #9885

zhangineer2 opened this issue Jan 28, 2022 · 9 comments
Labels
Triaged this issue has been triaged

Comments

@zhangineer2
Copy link

Description

Steps to reproduce the issue:

  1. Proceed with the normal building process to choose PLATFORM=vs
  2. Execute make SONIC_BUILD_JOBS=4 INSTALL_DEBUG_TOOLS=y target/sonic-vs.bin

Describe the results you received:

ERROR: invalid type '' for SAI_ACL_COUNTER_ATTR_TABLE_ID
ERROR: flags are not defined for SAI_ACL_COUNTER_ATTR_TABLE_ID
ERROR: FATAL ERROR === MUST FIX === : Can't use an undefined value as an ARRAY reference at parse.pl line 1676.

make[4]: *** [Makefile:107: saimetadata.c] Error 1
make[4]: Leaving directory '/sonic/src/sonic-sairedis/SAI/meta'
make[3]: *** [Makefile:1144: saimeta-gen] Error 2
make[3]: Leaving directory '/sonic/src/sonic-sairedis/meta'
make[2]: *** [Makefile:444: install-recursive] Error 1
make[2]: Leaving directory '/sonic/src/sonic-sairedis'
dh_auto_install: error: make -j1 install DESTDIR=/sonic/src/sonic-sairedis/debian/tmp AM_UPDATE_INFO_DIR=no returned exit code 2
make[1]: *** [debian/rules:59: binary-syncd-vs] Error 25
make[1]: Leaving directory '/sonic/src/sonic-sairedis'
dpkg-buildpackage: error: fakeroot debian/rules binary-syncd-vs subprocess returned exit status 2
[ FAIL LOG END ] [ target/debs/bullseye/libsairedis_1.0.0_amd64.deb ]
make: *** [slave.mk:511: target/debs/bullseye/libsairedis_1.0.0_amd64.deb] Error 1
make: *** Waiting for unfinished jobs....
[ 01 ] [ target/debs/bullseye/linux-headers-5.10.0-8-2-common_5.10.46-4_all.deb ]
make[1]: *** [Makefile.work:311: target/sonic-vs.bin] Error 2
make[1]: Leaving directory '/home/sonic/sonic-buildimage'
make: *** [Makefile:33: target/sonic-vs.bin] Error 2

Describe the results you expected:

Expected no errors with successful image build. When I disabled the P4RT container, the image build process went through successfully.

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Feb 2, 2022
@zhangyanzhao
Copy link
Collaborator

PINS is an opt-in feature, this should not happen if you disable it. Need PINS member to take a look.

@prsunny
Copy link
Contributor

prsunny commented Feb 2, 2022

@mint570, @donNewtonAlpha, @reshmaintel to take a look

@mint570
Copy link
Contributor

mint570 commented Feb 2, 2022

How did you enable/disable the P4RT container?
The build error is in src/sonic-sairedis. Doesn't seem to relate to P4RT.

@zhangineer2
Copy link
Author

How did you enable/disable the P4RT container? The build error is in src/sonic-sairedis. Doesn't seem to relate to P4RT.

I enabled it through config file, by changing P4RT from no to yes

@zhangineer2
Copy link
Author

Hey guys, I run into a different issue as I am testing to disable various containers but leave P4RT on, because that's what I really need.

I received the following error, but with no helpful details. I do have the debug set to y. My question is, where can I dig into the logs to really see what's happening?

Installing collected packages: jsonschema, sonic-platform-pddf-common
  WARNING: The script jsonschema is installed in '/var/sonic/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed jsonschema-2.6.0 sonic-platform-pddf-common-1.0
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
[ 01 ] [ target/debs/bullseye/linux-headers-5.10.0-8-2-common_5.10.46-4_all.deb ]
[ 02 ] [ target/debs/bullseye/libnl-3-200_3.5.0-1_amd64.deb ]
make[1]: *** [Makefile.work:311: all] Error 2
make[1]: Leaving directory '/home/sonic/sonic-buildimage'

@MaratGubaiev
Copy link
Contributor

MaratGubaiev commented Feb 8, 2022

I cannot say for sure, but you may try to use their fork https://github.com/pins/sonic-buildimage-public
I have been trying to use PINS myself on the Mellanox platform, and I have as well stuck in build problems: I have got a p4rt container but it doesn't work. Now I am trying to do what I proposed: to build the fork! UPD I have got build errors(((((

@MaratGubaiev
Copy link
Contributor

MaratGubaiev commented Feb 10, 2022

I tried to build sonic-vs too, and build succeeded.
Build server: Ubuntu 20.04.1 LTS
Branch: 202111 of main repo with INCLUDE_P4RT = y in rules/config
Build command: make init && make configure PLATFORM=vs SONIC_DPKG_CACHE_METHOD=cache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs && make SONIC_BUILD_JOBS=4 SONIC_DPKG_CACHE_METHOD=cache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz

NOTE: I have not checked how it works yet, because I have just got it.

UPD: p4rt container is præsent but it doesn't work because of С&С++ versions incompatibility. PINS member are going to fix this issue.

@zhangineer2
Copy link
Author

Thank you @MaratGubaiev !. I got farther than before using your setup. I ended up with a .img and a .bin file, though I still received some error.

Thank you for the update on the C incompatibility issue !

@mfyuce
Copy link

mfyuce commented Feb 28, 2022

UPD: p4rt container is præsent but it doesn't work because of С&С++ versions incompatibility. PINS member are going to fix this issue.

I have tried many times, no luck so far for a working p4rt container;

  • p4rt container is based on buster.
  • But the software inside is compiled on bullseye.
  • Disabling bullseye + stretch+jessie and enabling p4rt in turn requires jessie to be enabled. But, even after enabling jessie, no p4rt image is generated for buster build.
  • This is true in 202111 branch also.

mfyuce added a commit to mfyuce/sonic-buildimage that referenced this issue Mar 2, 2022
PINS only runs on buster and because of this bug, it does not run on buster and only on bullseye.

Related to issue number: sonic-net#9885
qiluo-msft pushed a commit that referenced this issue Mar 24, 2022
#### Why I did it
SONiC is migrating to bullseye. This will update the sonic-pins container to bullseye.

#### How I did it
The [sonic-pins code](https://github.com/Azure/sonic-buildimage/blob/master/rules/p4rt.mk) isn't dependent on any architecture so it will already build successfully for bullseye. This PR updates the docker to use bullseye.

#### How to verify it
Today we cannot build the docker-sonic-p4rt.gz target (e.g. Issue #9885). With this change the docker will build successfully. The P4RT executable will not run, because of a missing runtime library, libgmpxx, which I'll address in a followup PR.

#### Description for the changelog
Update docker-sonic-p4rt.gz target to build with Bullseye instead of Buster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

6 participants