Skip to content

docker: install missing Boost runtime library#5612

Merged
jafingerhut merged 1 commit into
p4lang:mainfrom
yyasuda:fix/docker-missing-boost-runtime
May 7, 2026
Merged

docker: install missing Boost runtime library#5612
jafingerhut merged 1 commit into
p4lang:mainfrom
yyasuda:fix/docker-missing-boost-runtime

Conversation

@yyasuda

@yyasuda yyasuda commented May 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #5593

The Docker image currently removes the Boost iostreams runtime
library during image cleanup:

apt-get purge -y ${P4C_DEPS}
apt-get autoremove --purge -y

However, several installed backend executables still depend on:

libboost_iostreams.so.1.71.0

Examples include:

  • p4c-bm2-ss
  • p4c-ebpf
  • p4test
  • p4testgen

Reproduction:

docker run --rm -it p4lang/p4c:latest p4c-bm2-ss --help

Result:

error while loading shared libraries:
libboost_iostreams.so.1.71.0: cannot open shared object file

This change explicitly installs the runtime package before cleanup,
so the installed binaries remain executable.

Signed-off-by: Yutaka Yasuda <yasuda@bakkers.gr.jp>
@yyasuda yyasuda force-pushed the fix/docker-missing-boost-runtime branch from 2e93caf to f72f7c8 Compare May 6, 2026 17:21
@jafingerhut

Copy link
Copy Markdown
Contributor

Thanks for doing this. I have seen evidence of this missing library in at least the failing CI test of this PR, which mentions the error message copied below: p4lang/pna#131

p4test: error while loading shared libraries: libboost_iostreams.so.1.71.0: cannot open shared object file: No such file or directory

@jafingerhut jafingerhut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jafingerhut jafingerhut added this pull request to the merge queue May 7, 2026
Merged via the queue into p4lang:main with commit 46c9229 May 7, 2026
18 checks passed
@yyasuda yyasuda deleted the fix/docker-missing-boost-runtime branch May 7, 2026 10:21
Comment thread tools/ci-build.sh
fi

if [[ "${IMAGE_TYPE}" == "build" ]] ; then
# Keep runtime library required by installed backend executables.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should test our docker image to avoid errors such as this one in the future. Also add a note that we remove these installations once the root issue is fixed.

@fruffy fruffy added the infrastructure Topics related to code style and build and test infrastructure. label May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Topics related to code style and build and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker image (latest) is missing runtime dependency libboost_iostreams.so.1.71.0 for p4c-bm2-ss

3 participants