Skip to content

Commit 4a05b74

Browse files
kcudniksaiarcot895
andauthored
Add nlohmann-json3-dev package into the slave container (sonic-net#16308) (sonic-net#17282)
### Why I did it The json.hpp header file from that package is used in the sonic-swss-common build. An old version of that header file (from 2016) has been checked into the sonic-swss-common repo. However, since then, there have been changes to that header file, and starting with GCC 12 in Bookworm, generates some errors about variables being possibly uninitialized before use. ##### Work item tracking - Microsoft ADO **(number only)**: 25027439 #### How I did it To fix this, install the nlohmann-json3-dev package, and allow using the header file from the Debian package instead of a static checked-in version. The version in Debian Bullseye is much newer than this version. #### How to verify it With this change alone, sonic-swss-common will still be using the json.hpp file in its own codebase. The change to actually use the system header file instead of the local header file will happen in a separate PR in the necessary repoes. Co-authored-by: Saikrishna Arcot <sarcot@microsoft.com>
1 parent 2c7d53e commit 4a05b74

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sonic-slave-bullseye/Dockerfile.j2

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ RUN apt-get update && apt-get install -y \
116116
uuid-dev \
117117
jq \
118118
cron \
119+
# For sonic-swss-common
120+
nlohmann-json3-dev \
119121
# For quagga build
120122
libreadline-dev \
121123
texlive-latex-base \

sonic-slave-buster/Dockerfile.j2

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ RUN apt-get update && apt-get install -y \
117117
libzmq3-dev \
118118
uuid-dev \
119119
jq \
120+
# For sonic-swss-common
121+
nlohmann-json3-dev \
120122
# For quagga build
121123
libreadline-dev \
122124
texlive-latex-base \

0 commit comments

Comments
 (0)