Add nlohmann-json3-dev package into the slave container (#16308)

### 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.
This commit is contained in:
Saikrishna Arcot 2023-09-06 19:23:07 -07:00 committed by GitHub
parent 24ae0a9606
commit 065c35cc34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,8 @@ RUN apt-get update && apt-get install -y \
uuid-dev \ uuid-dev \
jq \ jq \
cron \ cron \
# For sonic-swss-common
nlohmann-json3-dev \
# For quagga build # For quagga build
libreadline-dev \ libreadline-dev \
texlive-latex-base \ texlive-latex-base \

View File

@ -117,6 +117,8 @@ RUN apt-get update && apt-get install -y \
libzmq3-dev \ libzmq3-dev \
uuid-dev \ uuid-dev \
jq \ jq \
# For sonic-swss-common
nlohmann-json3-dev \
# For quagga build # For quagga build
libreadline-dev \ libreadline-dev \
texlive-latex-base \ texlive-latex-base \