-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
libgcc and libstdc++ not linking statically with incompatible Bazel flag #6968
Comments
@dnoe do you think you could take a look as Envoy import on-call? |
Hi, Replacing cc_wrapper.py with this should work. Every test passed now with the -- incompatible_do_not_split_linking_cmdline flag. I'm going on vacation tomorrow and unfortunately don't have time for the PR and code review. The flip will be in 0.27, so you are safe. But as soon as I flip the flag, envoy will appear red in our downstream pipeline and we may not catch other errors.
|
@oquenchil thanks for doing the heavy lifting here. I think this looks roughly like what we should be doing, but I continue to be terrified by this script and its machinations (this is non-actionable). We can probably take it from here and try and get it merged in the coming week or two. |
Hi all, I'm updating all Bazel incompatible flags related issues - the Bazel team is in increased pressure because 0.27 will start a 3 month window of no incompatible changes). We will have to potentially temporarily disable envoy on our downstream pipeline if we cannot get it fixed this week. |
GH issue: #7687 The flag is now true by default in Bazel. Tested: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/996 Envoy is showing up as broken. Udp breakage is due to a different reason. The Remote Execution is also fine to break with this change according to buchgr@. That project is using an old version of the default crosstool which still patches features from Bazel. For Envoy I filed envoyproxy/envoy#6968, suggested a fix and they will fix it soonish. If they don't, please disable Envoy downstream or I might miss the 0.27 cut. RELNOTES: PiperOrigin-RevId: 250252235
I copied @oquenchil's changes from #6968 (comment) and fixed the python formatting errors. This let us link our exe w/ the new flag default (--incompatible_do_not_split_linking_cmdline) and with the old value. When Envoy upgrades to bazel 0.27 we should remove the old functions in this file. Risk Level: Low Testing: Ran bazel test --incompatible_do_not_split_linking_cmdline //test/exe/... and bazel test //test/exe/... Docs Changes: N/A Release Notes: N/A Fixes #6968 Signed-off-by: Frank Fort <ffort@google.com>
GH issue: bazelbuild#7687 The flag is now true by default in Bazel. Tested: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/996 Envoy is showing up as broken. Udp breakage is due to a different reason. The Remote Execution is also fine to break with this change according to buchgr@. That project is using an old version of the default crosstool which still patches features from Bazel. For Envoy I filed envoyproxy/envoy#6968, suggested a fix and they will fix it soonish. If they don't, please disable Envoy downstream or I might miss the 0.27 cut. RELNOTES: PiperOrigin-RevId: 250252235
GH issue: bazelbuild#7687 The flag is now true by default in Bazel. Tested: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/996 Envoy is showing up as broken. Udp breakage is due to a different reason. The Remote Execution is also fine to break with this change according to buchgr@. That project is using an old version of the default crosstool which still patches features from Bazel. For Envoy I filed envoyproxy/envoy#6968, suggested a fix and they will fix it soonish. If they don't, please disable Envoy downstream or I might miss the 0.27 cut. RELNOTES: PiperOrigin-RevId: 250252235
Hello,
I'm trying to flip the Bazel flag --incompatible_do_not_split_linking_cmdline:
bazelbuild/bazel#7687
bazel test --incompatible_do_not_split_linking_cmdline //test/exe:envoy_static_test
will start failing with:
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //test/exe:envoy_static_test
You have a script to ensure that libstdc++ and libgcc are linked statically.
The issue is that the link tool is not being invoked that way anymore. It used to be:
/bin/linktool -someflag -someflag2 -Wl,@parameter_file_with_more_flags
but now it's
/bin/linktool @all_flags
The script is very dependent on how the arguments to the tool were passed. I ask you to please make that script compatible with the new way so that I can flip this Bazel flag for 0.27. You can apply most of the same logic after reading every line from the all_flags parameter file. I don't think that you can still rely on ["-E", "-xc++", "-", "-v"] being the first arguments in the file but there must be an equivalent way of doing that.
The script will have to be compatible with current release too. So you could detect if one of the argv parameters starts with @ and take the new code path, if it starts with -Wl,@ the old one.
Please let me know if I can help.
Thank you.
The text was updated successfully, but these errors were encountered: