SONIC vs build failure - dpkg-shlibdeps: error: cannot find library libpython3.11.so.1.0

207 views
Skip to first unread message

Muthu Venkatraman

unread,
Aug 21, 2024, 8:22:41 PM8/21/24
to sonicp...@googlegroups.com, Kausik Majumdar, mven...@argusnetworks.io
Hi Experts,

We are trying to build a sonic-vs image in my VM server and getting the below error.
dpkg-shlibdeps: error: cannot find library libpython3.11.so.1.0 needed by debian/libdashapi/usr/lib/python3/dist-packages/dash_api/dash_api/_utils.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')


Here are my build details.

~/sonic-buildimage$ git branch
* 202311
  202405
  master
~/sonic-buildimage$ cat /etc/*rel*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
~/sonic-buildimage$ free -m
              total        used        free      shared  buff/cache   available
Mem:          32098         384       10943           1       20770       31249
Swap:          4095           2        4093
~/sonic-buildimage$ free -h
              total        used        free      shared  buff/cache   available
Mem:           31Gi       384Mi        10Gi       1.0Mi        20Gi        30Gi
Swap:         4.0Gi       2.0Mi       4.0Gi
~/sonic-buildimage$ df -h .
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  293G  103G  178G  37% /

~/sonic-buildimage$ echo $LD_LIBRARY_PATH
:/usr/lib/x86_64-linux-gnu

~/sonic-buildimage$ ls -l /usr/lib/x86_64-linux-gnu/libpython3.11.*
lrwxrwxrwx 1 root root      58 Apr  6 17:59 /usr/lib/x86_64-linux-gnu/libpython3.11.a -> ../python3.11/config-3.11-x86_64-linux-gnu/libpython3.11.a
lrwxrwxrwx 1 root root      18 Apr  6 17:59 /usr/lib/x86_64-linux-gnu/libpython3.11.so -> libpython3.11.so.1
lrwxrwxrwx 1 root root      20 Apr  6 17:59 /usr/lib/x86_64-linux-gnu/libpython3.11.so.1 -> libpython3.11.so.1.0
-rw-r--r-- 1 root root 7900848 Apr  6 17:59 /usr/lib/x86_64-linux-gnu/libpython3.11.so.1.0

I used the below command to build this image:
make SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz

Full ERROR:

 dh_strip
   dh_makeshlibs
   dh_shlibdeps
dpkg-shlibdeps: error: cannot find library libpython3.11.so.1.0 needed by debian/libdashapi/usr/lib/python3/dist-packages/dash_api/dash_api/_utils.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')

dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to use -l.
dh_shlibdeps: error: dpkg-shlibdeps -Tdebian/libdashapi.substvars debian/libdashapi/usr/lib/libdashapi.so debian/libdashapi/usr/lib/python3/dist-packages/dash_api/dash_api/_utils.so returned exit code 2
dh_shlibdeps: error: Aborting due to earlier error
make[1]: *** [debian/rules:5: binary] Error 25
make[1]: Leaving directory '/sonic/src/sonic-dash-api'
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
[  FAIL LOG END  ] [ target/debs/bullseye/libdashapi_1.0.0_amd64.deb ]
make: *** [slave.mk:766: target/debs/bullseye/libdashapi_1.0.0_amd64.deb] Error 1
make: *** Waiting for unfinished jobs....
make[1]: *** [Makefile.work:622: target/sonic-vs.img.gz] Error 2
make[1]: Leaving directory '/home/mvenkata/sonic-buildimage'
make: *** [Makefile:41: target/sonic-vs.img.gz] Error 2

Any suggestions/help to fix this issue?

Thanks
Muthu

tsado...@gmail.com

unread,
Aug 22, 2024, 12:46:40 AM8/22/24
to sonicproject
Hey Muthu,

Please follow the article of below and fit your server paramters for requirments, it should help 😉
https://www.linkedin.com/posts/tomasz-sadowski-it_linux-ubuntu-sonic-activity-7217481620126089217-K6Su

BR, Tomasz

Muthu Venkatraman

unread,
Aug 22, 2024, 1:24:25 AM8/22/24
to sonicproject

Hi Tomasz,

Thanks for your quick reply and appreciate it.
Yes today morning i got this link and followed it.
Let me do one more time from scratch and see how it goes.
Is KVM hypervisor mandatory for this build to succeed?

Thanks
Muthu

Muthu Venkatraman

unread,
Aug 23, 2024, 12:09:14 AM8/23/24
to sonicproject
Hi Tomasz,
Good Evening.

I created new vm and started fresh, followed the instruction, and got stuck with the below error.

ctrmgr/ctrmgr_tools.py           99      1    99%
ctrmgr/ctrmgrd.py               375     35    91%
ctrmgr/kube_commands.py         370     44    88%
-------------------------------------------------
TOTAL                          1310    123    91%
Coverage HTML written to dir htmlcov
Coverage XML written to file coverage.xml

=========================== short test summary info ============================
FAILED tests/ctrmgr_iptables_test.py::TestIPTableUpdate::test_table - Asserti...
======================== 1 failed, 17 passed in 21.18s =========================
[  FAIL LOG END  ] [ target/python-wheels/bullseye/sonic_ctrmgrd-1.0.0-py3-none-any.whl ]
make: *** [slave.mk:921: target/python-wheels/bullseye/sonic_ctrmgrd-1.0.0-py3-none-any.whl] Error 1

make: *** Waiting for unfinished jobs....
[ 01 ] [ target/debs/bullseye/linux-headers-5.10.0-23-2-common_5.10.179-3_all.deb ]


make[1]: *** [Makefile.work:622: target/sonic-vs.img.gz] Error 2
make[1]: Leaving directory '/home/argus/sonic-buildimage'

make: *** [Makefile:41: target/sonic-vs.img.gz] Error 2

ls  target/*.gz
target/docker-base-bookworm.gz  target/docker-base-bullseye.gz  target/docker-base-buster.gz  target/docker-config-engine-buster.gz  target/docker-sonic-mgmt-framework.gz

Any suggestions?

Thanks
Muthu

Reply all
Reply to author
Forward
0 new messages