fix copy_dynamic_libraries_to_binary for subdirectories#623
Open
novas0x2a wants to merge 1 commit intobazelbuild:mainfrom
Open
fix copy_dynamic_libraries_to_binary for subdirectories#623novas0x2a wants to merge 1 commit intobazelbuild:mainfrom
novas0x2a wants to merge 1 commit intobazelbuild:mainfrom
Conversation
b739d8a to
dbe9bbe
Compare
This is a new instance of a similar problem described in bazelbuild/bazel#12448. In order for windows binaries to run, the (non-system) dlls need to be copied to the same directory. However, the code that determined that was only looking at the package label and the workspace, but not the actual subdirectory. Previously, this was fixed by adding the lib.is_source check, but this only solves it for source files.
dbe9bbe to
166637a
Compare
Author
|
Force-pushed over it to retry the CI, which failed with a GOAWAY. |
novas0x2a
added a commit
to bazel-contrib/rules_foreign_cc
that referenced
this pull request
Mar 7, 2026
This fails due to a bug in bazel / in rules_cc (depending on bazel version). See bazelbuild/rules_cc#623
novas0x2a
added a commit
to bazel-contrib/rules_foreign_cc
that referenced
this pull request
Mar 7, 2026
This fails due to a bug in bazel / in rules_cc (depending on bazel version). See bazelbuild/rules_cc#623
novas0x2a
added a commit
to bazel-contrib/rules_foreign_cc
that referenced
this pull request
Mar 9, 2026
…1475) This fails due to a bug in bazel / in rules_cc (depending on bazel version). See bazelbuild/rules_cc#623. With upstream's approval I plan to roll this fix out everywhere.
Collaborator
armandomontanez
left a comment
There was a problem hiding this comment.
This does look more correct, but this issue is subtle enough that I think it deserves a test so it doesn't regress.
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.
This is a new instance of a similar problem described in bazelbuild/bazel#12448. In order for windows binaries to run, the (non-system) dlls need to be copied to the same directory. However, the code that determined that was only looking at the package label and the workspace, but not the actual subdirectory. Previously, this was fixed by adding the
lib.is_sourcecheck, but this only solves it for source files.An example of code that can trigger this is https://github.com/bazel-contrib/rules_foreign_cc/blob/d8e34f6f9b66a13cd845011200d444b060dc1af1/examples/cmake_hello_world_lib/shared/BUILD.bazel