Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-push always fail with "child zlib.h is a dangling symbolic link" error #37857

Closed
railwaycat opened this issue Jan 2, 2025 · 3 comments · Fixed by #37864
Closed

pre-push always fail with "child zlib.h is a dangling symbolic link" error #37857

railwaycat opened this issue Jan 2, 2025 · 3 comments · Fixed by #37864

Comments

@railwaycat
Copy link
Contributor

Title: pre-push always fail with "child zlib.h is a dangling symbolic link" error

Description:
After Envoy migrated to Bazel 7.*, the envoy pre-push check consistently fail with error child zlib.h is a dangling symbolic link

The full error message as:

INFO: Analyzed target //tools/proto_format:proto_sync (553 packages loaded, 15098 targets configured).
ERROR: /home/xxxx/factory/envoy_xxx/bazel/foreign_cc/BUILD:414:12: error while validating output tree artifact bazel/foreign_cc/zlib/include: child zlib.h is a dangling symbolic link
ERROR: /home/xxxx/factory/envoy_xxx/bazel/foreign_cc/BUILD:414:12: Foreign Cc - CMake: Building zlib [for tool] failed: not all outputs were created or valid
Target //tools/proto_format:proto_sync failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 7.050s, Critical Path: 2.49s
INFO: 287 processes: 181 internal, 106 linux-sandbox.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

I saw a related discussion under Bazel: bazelbuild/bazel#20886, which suggests adding build option --noincompatible_sandbox_hermetic_tmp for Bazel. But I'm not sure where to add for pre-push verifications.

I can reproduce this issue on ubuntu 22.04.5 and debian stable 12.8.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

@railwaycat railwaycat added the triage Issue requires triage label Jan 2, 2025
@phlax
Copy link
Member

phlax commented Jan 3, 2025

@railwaycat can you try using the build container - i think this may be related to llvm version or setup

@phlax
Copy link
Member

phlax commented Jan 3, 2025

hmm - actually this is the same error that istio hit (cc @zirain)

in that case they worked around the problem by increasing the bazel version - not sure on what the actual cause is

@phlax phlax added bug area/build bazel and removed triage Issue requires triage labels Jan 3, 2025
phlax added a commit that referenced this issue Jan 3, 2025
the current bazel version is flakey and is triggering at least one build
issue for downstreams

the only reason we are using it is due to broken env vars in later
versions that fails our mobile/coverage ci

this PR bumps the version to 7.x latest and worksaround the
mobile/coverage issue by injecting the known working bazel version for
that ci alone

Fix #37857 
Fix #37852

Signed-off-by: Ryan Northey <[email protected]>
@railwaycat
Copy link
Contributor Author

Thank you @phlax!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants