Skip to content

Conversation

@martin4861
Copy link
Contributor

@martin4861 martin4861 commented Oct 23, 2025

I ran a comparison of the chromium's sysroots with ours and found out, that symlinks look differently, e.g.

  • chromium: libutil.so -> ../../..//lib/x86_64-linux-gnu/libutil.so.1
  • ours (before this change): libutil.so -> /lib/x86_64-linux-gnu/libutil.so.1

This might have worked in the past with Bazel 7, but with Bazel 8 in some situations (maybe due to Bazel 8's stricter sandboxing) it just fails. I was not able to reproduce it locally, it only happens in CI with enabled Bazel Cache.

This change enables the relative symlink handling instead of using absolute paths and syncs with the upstream script of the chromium project.

(lapack and blas seem to be in the correct shape: liblapack.a -> ./lapack/liblapack.a)

Tested in swift-nav/rules_swiftnav#200 (see testplan in PR description)

@martin4861 martin4861 force-pushed the martin4861/chromium-sysroot-script branch from d8354eb to 5dce50d Compare October 23, 2025 07:50
@martin4861 martin4861 marked this pull request as ready for review October 23, 2025 13:07
@martin4861 martin4861 requested review from pcrumley and peddie October 23, 2025 13:07
Copy link
Contributor

@peddie peddie left a comment

Choose a reason for hiding this comment

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

I'm afraid I completely lack the background knowledge about this repo and what it does to approve this PR; I can only make a couple basic procedural comments.

Copy link

@sbmueller sbmueller left a comment

Choose a reason for hiding this comment

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

I'm also unfamiliar with what is going on here, but I'll approve since the change is tested, and we have known issues without this change. It also is a straightforward backport from an open-source file.

@martin4861 martin4861 merged commit 35f9c4c into master Oct 27, 2025
2 checks passed
@martin4861 martin4861 deleted the martin4861/chromium-sysroot-script branch October 27, 2025 12:09
martin4861 added a commit to swift-nav/rules_swiftnav that referenced this pull request Oct 27, 2025
Use the updated sysroots of
swift-nav/swift-toolchains#27 for fixed
symlinks.

Tested ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants