Skip to content

Dockerfile: use ldconfig for dynamic libraries - #5567

Merged
lifubang merged 1 commit into
opencontainers:mainfrom
kolyshkin:dockerfile-ldconfig
Oct 23, 2026
Merged

lifubang merged 1 commit into
opencontainers:mainfrom
kolyshkin:dockerfile-ldconfig

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The libseccomp and libpathrs libraries built by Dockerfile are installed into
$DYLIB_DIR/lib, which is only made known to the dynamic linker via
LD_LIBRARY_PATH. Yet runc init is executed with a clean environment, so it
can not find libpathrs.so.0 and dies, resulting in

unable to start container process: can't copy bootstrap data to pipe: write init-p: broken pipe

As a result, make integration (and some of make unittest) fail.

Use ldconfig instead of LD_LIBRARY_PATH.

This went unnoticed because CI only builds the image, and never runs tests in
it. Add a quick smoke test (run.bats, ~20s) to the release job, which is the
only one that builds the image.

Found while working on #5566.

The libseccomp and libpathrs libraries built by Dockerfile are installed
into $DYLIB_DIR/lib, which is only made known to the dynamic linker via
LD_LIBRARY_PATH. Yet runc init is executed with a clean environment, so
it can not find libpathrs.so.0 and dies, resulting in

	unable to start container process: can't copy bootstrap data
	to pipe: write init-p: broken pipe

As a result, "make integration" and some of "make unittest" fail.

Use ldconfig instead of LD_LIBRARY_PATH.

This went unnoticed because CI only builds the image, and never runs
tests in it. Add a quick smoke test (run.bats) to the release job, which
is the only one that builds the image.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@lifubang
lifubang force-pushed the dockerfile-ldconfig branch from 2299088 to 4cc0368 Compare October 23, 2026 05:47
@lifubang
lifubang added this pull request to the merge queue Oct 23, 2026
Merged via the queue into opencontainers:main with commit 9c85446 Oct 23, 2026
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants