-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel 6.0.0 upgrade not possible due to "command is longer than CreateProcessW's limit (32767 characters)" #17068
Comments
There is no built-in |
yeah, sorry, that's a typo. Fixed it |
Could you please provide a minimal repro that reproduces it? That will make it easier to track down. |
@oquenchil This is reproducible with the toy example in #5163 |
See here: #5163 (comment) You probably don't have the feature in your toolchain. I cannot reproduce it. |
we have the feature enabled. What seems to be the problem is that the value of On Windows, when I set
and I see the expand_if_not_available. On 5.4.0, the first flag group is used, as should be. It seems like the supports_param_files arg is not correctly interpreted on Windows after the upgrade, or at least it does not lead to linker_param_file being available anymore |
I found that enabling the new That new option was intentionally disabled on macOS because of a performance hit (generates an archive per library), but I think it may have also been accidentally disabled on Windows as part of the relevant change (bff9730). If that is the issue, it would probably be good to have that feature enabled by default for most (or all?) Windows toolchains, since link command line length is a common problem on Windows. |
Thanks @gregoryT5! After passing in Will not close the issue yet though, since I agree that this should be default behaviour on Windows |
That indeed seems to be the culprit. @googlewalt archive_param_file should set Thank you @gregoryT5 ! |
Sorry about the bug. Should be fixed now. |
@bazel-io flag |
@bazel-io fork 6.1.0 |
Closes #17068. PiperOrigin-RevId: 504229788 Change-Id: I7b6f7f4f2c8ccb802f5a76bd54eaf0a8358793b1 Co-authored-by: Googler <[email protected]>
Closes #17068. PiperOrigin-RevId: 504229788 Change-Id: I7b6f7f4f2c8ccb802f5a76bd54eaf0a8358793b1
can you please have look at the same issue here |
Description of the bug:
While attempting to upgrade from Bazel 5.4.0 to Bazel 6.0.0, we found that we hit an error during linking of our "main" library. This library takes a long parameter list, more than 41k characters long. Until now, that was fine, because we used
linker_param_file
feature.When building with
-s
and Bazel 5.4.0, the name of the file is shownWith Bazel 6.0.0 and
-s
, our parameters are shown, and the error from the titleso it seems Bazel 6 is ignoring the
link_input_params
feature, given the linker call we see. This is reproducible also with the toy example in #5163What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Use the repro from #5163 on Windows. With
link_input_params
enabled, it should work with Bazel 5.4.0. Bazel 6 should fail with the error I posted aboveWhich operating system are you running Bazel on?
Windows
What is the output of
bazel info release
?release 6.0.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
There's an ongoing Slack thread: https://bazelbuild.slack.com/archives/CA31HN1T3/p1671645326680889
The text was updated successfully, but these errors were encountered: