Dockerfile: build runc 1.5 with libpathrs#6908
Draft
AkihiroSuda wants to merge 1 commit into
Draft
Conversation
runc 1.5 depends on libpathrs, so build and install it before compiling runc statically. This requires several adjustments for cross-compilation: - Install cargo/rust for the build (native) arch via apk; only the target libraries go through xx-apk, otherwise the toolchain cannot run. - Pass --rust-target to install.sh, since xx-cargo builds into target/<triple>/release rather than target/release. - Install into the xx sysroot (DESTDIR) so xx's cross pkg-config finds pathrs.pc, and --disable-dynamic since the static build only needs the .a (Alpine's BusyBox install also lacks the -T flag used for the .so). - Work around a go-pathrs build failure under clang's cgo by rewriting the PATHRS_PROC_* int64 temporaries to uint64. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AkihiroSuda
commented
Jun 29, 2026
| # enum's unsigned type, so it happens to work there). Rewrite the temporaries | ||
| # to uint64; the values fit and the comparison that follows is unchanged. | ||
| # TODO: drop this once fixed upstream: https://github.com/cyphar/go-pathrs | ||
| sed -i 's/int64 = C.PATHRS_PROC/uint64 = C.PATHRS_PROC/' vendor/cyphar.com/go-pathrs/internal/libpathrs/libpathrs_linux.go |
Member
Author
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
runc 1.5 depends on libpathrs, so build and install it before compiling runc statically. This requires several adjustments for cross-compilation: