SAI Redis - SONiC fails to Build

587 views
Skip to first unread message

Fabio Ardeola

unread,
Jul 13, 2024, 9:45:26 AM7/13/24
to sonicproject
Hello everyone!

I'm running into the following problem with sairedis when attempting to build SONiC image.

=======================================================================
configure: exit 1
dh_auto_configure: error: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --disable-static --disable-python2 returned exit code 1
make[2]: *** [debian/rules:58: override_dh_auto_configure] Error 25
make[2]: Leaving directory '/sonic/src/sonic-sairedis'
make[1]: *** [debian/rules:49: build] Error 2
make[1]: Leaving directory '/sonic/src/sonic-sairedis'
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
[  FAIL LOG END  ] [ target/debs/bullseye/syncd_1.0.0_amd64.deb ]
make: *** [slave.mk:775: target/debs/bullseye/syncd_1.0.0_amd64.deb] Error 1
make[1]: *** [Makefile.work:604: bullseye] Error 2
make[1]: Leaving directory '/media/fardeola/sonic/sonic-buildimage'
make: *** [Makefile:46: target/sonic-barefoot.bin] Error 2
========================================================================

Steps to reproduce the issue:
make init
make configure PLATFORM=barefoot NOJESSIE=1 NOSTRETCH=1
make target/sonic-barefoot.bin NOJESSIE=1 NOSTRETCH=1

I really appreciate any feedback on this.

Regards,
Fabio Ribas

tsado...@gmail.com

unread,
Jul 14, 2024, 3:55:50 AM7/14/24
to sonicproject

Hey Fabio,

The latest branch supporting the Barefoot platform is 202305, so you need to switch to it before executing the 'make init' command.

tomasz@srv-lab:~/sonic-buildimage$ git checkout 202305

I also recommend clicking the link below to see which hardware will be best for building SONiC and find some more advice about build the SONiC images.

https://www.linkedin.com/posts/tomasz-sadowski-it_linux-ubuntu-sonic-activity-7217481620126089217-K6Su

…. and one more thing…. before you start you have to also add one additional line of code to the build_debian.sh… like below.

tomasz@srv-lab:~/sonic-buildimage$ vim build_debian.sh

… the line to add is:

sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'requests<2.32.0'

pip3 install requests.png

Please let me know if this works on your end?

Have a good day! 😉

Kind regards, Tomasz

Fabio Ardeola

unread,
Jul 14, 2024, 10:34:47 AM7/14/24
to sonicproject
Hello Tomasz!

I've ended up with the following behavior after building with 202305 branch.

=> syncd, radv, bgp, and swss doe not come up
Not sure but it seems is due to the following error:
=> ModuleNotFoundError: No module named 'sonic_platform'
See the following issue:

============================================================================================
Jul 14 14:10:39.270504 sonic NOTICE healthd[1731]: Starting up...
Jul 14 14:10:39.270642 sonic WARNING healthd[1731]: sonic_platform package not installed. Cannot start system-health daemon
Jul 14 14:10:39.274164 sonic INFO healthd[1731]: Traceback (most recent call last):
Jul 14 14:10:39.274262 sonic INFO healthd[1731]:   File "/usr/local/bin/healthd", line 125, in <module>
Jul 14 14:10:39.274499 sonic INFO healthd[1731]:     main()
Jul 14 14:10:39.274561 sonic INFO healthd[1731]:   File "/usr/local/bin/healthd", line 121, in main
Jul 14 14:10:39.274606 sonic INFO healthd[1731]:     health_monitor.run()
Jul 14 14:10:39.274649 sonic INFO healthd[1731]:   File "/usr/local/bin/healthd", line 89, in run
Jul 14 14:10:39.274707 sonic INFO healthd[1731]:     sysmon.task_stop()
Jul 14 14:10:39.274770 sonic INFO healthd[1731]: UnboundLocalError: local variable 'sysmon' referenced before assignment
Jul 14 14:10:39.378153 sonic NOTICE systemd[1]: system-health.service: Main process exited, code=exited, status=1/FAILURE
Jul 14 14:10:39.378280 sonic WARNING systemd[1]: system-health.service: Failed with result 'exit-code'.

=============================================================================================
fardeola@sonic:~$ docker ps -a
CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS                       PORTS     NAMES
401024e0d65f   docker-fpm-frr:latest                "/usr/bin/docker_ini…"   4 minutes ago   Exited (137) 4 minutes ago             bgp
2252458e87c4   docker-router-advertiser:latest      "/usr/bin/docker-ini…"   4 minutes ago   Exited (0) 4 minutes ago               radv
461c7868d490   docker-syncd-bfn:latest              "/usr/local/bin/supe…"   4 minutes ago   Exited (0) 4 minutes ago               syncd
02545be1d6b9   docker-teamd:latest                  "/usr/local/bin/supe…"   4 minutes ago   Exited (0) 4 minutes ago               teamd
0286bde30d43   docker-orchagent:latest              "/usr/bin/docker-ini…"   4 minutes ago   Exited (0) 4 minutes ago               swss
db038597aa85   docker-eventd:latest                 "/usr/local/bin/supe…"   4 minutes ago   Up 4 minutes                           eventd
7add1a9e9af9   docker-database:latest               "/usr/local/bin/dock…"   2 days ago      Up 4 minutes                           database

fardeola@sonic:~$ show version
SONiC Software Version: SONiC.202305.0-dirty-20240710.184626
SONiC OS Version: 11
Distribution: Debian 11.10
Kernel: 5.10.0-23-2-amd64
Build commit: 238cbda17
Build date: Thu Jul 11 00:34:22 UTC 2024
Built by: fardeola@fardeola
Platform: x86_64-asterfusion_cx308p_48y_t-r0
HwSKU: None
ASIC: barefoot
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 14:12:59 up 2 min,  2 users,  load average: 0.29, 0.25, 0.10
Date: Sun 14 Jul 2024 14:12:59
Docker images:
REPOSITORY                    TAG                              IMAGE ID       SIZE
docker-macsec                 latest                           1610046be291   319MB
docker-dhcp-relay             latest                           9409bef6f425   307MB
docker-syncd-bfn              202305.0-dirty-20240710.184626   42713c273277   2.25GB
docker-syncd-bfn              latest                           42713c273277   2.25GB
docker-sonic-telemetry        202305.0-dirty-20240710.184626   780e2af519e6   386MB
docker-sonic-telemetry        latest                           780e2af519e6   386MB
docker-teamd                  202305.0-dirty-20240710.184626   609e302669ed   317MB
docker-teamd                  latest                           609e302669ed   317MB
docker-snmp                   202305.0-dirty-20240710.184626   ac324e9e9376   338MB
docker-snmp                   latest                           ac324e9e9376   338MB
docker-sflow                  202305.0-dirty-20240710.184626   39692ebbc7f5   318MB
docker-sflow                  latest                           39692ebbc7f5   318MB
docker-router-advertiser      202305.0-dirty-20240710.184626   cecb455ab1b0   299MB
docker-router-advertiser      latest                           cecb455ab1b0   299MB
docker-platform-monitor       202305.0-dirty-20240710.184626   b44d535b6711   420MB
docker-platform-monitor       latest                           b44d535b6711   420MB
docker-sonic-p4rt             202305.0-dirty-20240710.184626   62dedbfd1dc3   870MB
docker-sonic-p4rt             latest                           62dedbfd1dc3   870MB
docker-orchagent              202305.0-dirty-20240710.184626   4bdc89277786   328MB
docker-orchagent              latest                           4bdc89277786   328MB
docker-nat                    202305.0-dirty-20240710.184626   e653d1e83e92   320MB
docker-nat                    latest                           e653d1e83e92   320MB
docker-mux                    202305.0-dirty-20240710.184626   434e6dbc356b   348MB
docker-mux                    latest                           434e6dbc356b   348MB
docker-lldp                   202305.0-dirty-20240710.184626   09ceb9f0f7c5   341MB
docker-lldp                   latest                           09ceb9f0f7c5   341MB
docker-fpm-frr                202305.0-dirty-20240710.184626   f0d42b1cee1a   348MB
docker-fpm-frr                latest                           f0d42b1cee1a   348MB
docker-eventd                 202305.0-dirty-20240710.184626   95cc10a17157   299MB
docker-eventd                 latest                           95cc10a17157   299MB
docker-database               202305.0-dirty-20240710.184626   9f7959ab4a0f   299MB
docker-database               latest                           9f7959ab4a0f   299MB
docker-sonic-mgmt-framework   202305.0-dirty-20240710.184626   80a9c9b35ece   430MB
docker-sonic-mgmt-framework   latest                           80a9c9b35ece   430MB
=============================================================================================

Thank you for taking the time to look at this.

Regards,
Fabio

Christian Svensson

unread,
Jul 14, 2024, 10:43:57 AM7/14/24
to Fabio Ardeola, sonicproject
The sonic_platform package comes from the specific device package your platform is running on. So in this case x86_64-asterfusion_cx308p_48y_t-r0. You'd have to investigate if this platform is supported in the version you're running (202305).


--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/9457feea-d6ee-40bf-9f15-4ec942625cfen%40googlegroups.com.

tsado...@gmail.com

unread,
Jul 14, 2024, 11:27:15 AM7/14/24
to sonicproject
Hey, I think you should reach out to the Asterfusion Team. I can't find any Asterfusion platform on the list.https://github.com/sonic-net/SONiC/blob/sonic_image_md_update/supported_devices_platforms.md

Cheers, Tomasz

Fabio Ardeola

unread,
Jul 14, 2024, 6:02:09 PM7/14/24
to sonicproject
Tomasz and Christian,

I really appreciate your support.

I will contact Asterfusion.

Regards,
Fabio

tsado...@gmail.com

unread,
Jul 15, 2024, 1:40:30 AM7/15/24
to sonicproject

You're welcome! Please leave a comment once you receive any feedback from the Asterfusion team. Your insights might help someone else facing the same issue, and you'll be a hero then! 😉

 

Kind regards, Tomasz

Please let me know if this works on your end?

Sujay Gupta

unread,
Jul 17, 2024, 4:00:26 AM7/17/24
to sonicproject
Hi Tomas, ( & group)

The write-up is good & step by step, I followed it again since my builds were failing (' vs ' build), but I hit the same build error at make configure PLATFORM=vs

Screenshot from 2024-07-17 13-23-18.png

There is no " debian.sources"  at the location.

proj@jay:~/sonic-buildimage$ ls -l /etc/apt/sources.list.d
total 4
-rw-r--r-- 1 root root 110 Jul 17 13:14 docker.list
 
Seeing the script which calls this is at -
src/sonic-build-hooks/scripts/buildinfo_base.sh

>>
proj@jay:~/sonic-buildimage$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"

Appreciate any help in this regard.

Regards,
-sg

tsado...@gmail.com

unread,
Jul 17, 2024, 8:17:27 AM7/17/24
to sonicproject
Hey!

That's the expected output :) ... you can jump to the next command from the instruction.
P.S. ... would appreciate sharing and comment my LinkedIn post, thank you!

BR, Tomasz

Sujay Gupta

unread,
Jul 18, 2024, 8:57:25 PM7/18/24
to sonicproject
Thanks @Tomas, it did work finally.

Had to point the repo address to a IPv4 in /etc/hosts, as by default it was resolving to a v6 address due to some DNS response/entry I did not dig into much.


Regds,
-sg

tsado...@gmail.com

unread,
Jul 18, 2024, 11:54:50 PM7/18/24
to sonicproject
You're welcome! Have fun with SONiC! 😉

Sujay Gupta

unread,
Jul 20, 2024, 8:50:00 AM7/20/24
to sonicproject
@Tomas, All - running into a strange issue my local build does not allow admin/YourPaSsWoRd login, but the official vs image works fine with the same credentials.
Will attempt a rebuild and see if it works after the 3 hr build.
Regards,

Sujay Gupta

unread,
Jul 20, 2024, 7:54:47 PM7/20/24
to sonicproject
Update - So my SONiC username defaulted to linux login username, (which was not admin), could figure it out by doing a make list.
This was the mistake being done.

tsado...@gmail.com

unread,
Jul 21, 2024, 1:15:24 AM7/21/24
to sonicproject
Thanks Sujay for sharing! ... and have fun with SONiC😉

Cheers, Tomasz

Reply all
Reply to author
Forward
0 new messages