Remove maximum path length limitation on Windows
See original GitHub issueDescription of the problem / feature request:
It will be nice to have a command line option to remove the maximum path length limitation on Windows. Windows has allowed to remove the path length limitation on Windows 10 Anniversary update. However, bazel still works with path length restriction. I am thinking of having a command line option --remove-path-length-limit
which makes bazel to work without the limitation
Feature requests: what underlying problem are you trying to solve with this feature?
I am trying to build Tensorflow with --dynamic_mode=fully
and get this error.
ERROR: file 'tensorflow/utils.dll' is generated by these conflicting actions:
Label: //tensorflow:libtensorflow_framework.so.2.2.0
RuleClass: cc_binary rule
Configuration: a2bfe99001a9a169e32dedfd9726eb6b74459ec5cb6bf69de2a3f0c887ba9f19
Mnemonic: Symlink
Action key: 61e799b1ac91eabec3c28dfd56b3272b5cb7609a10ef471329252741a303302f
Progress message: Copying Execution Dynamic Library
PrimaryInput: File:[[<execution_root>]bazel-out/x64_windows-opt/bin]tensorflow/core/grappler/clusters/utils.dll, File:[[<execution_root>]bazel-out/x64_windows-opt/bin]tensorflow/core/grappler/costs/utils.dll
PrimaryOutput: File:[[<execution_root>]bazel-out/x64_windows-opt/bin]tensorflow/utils.dll
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: for tensorflow/utils.dll, previous action: action
'Copying Execution Dynamic Library', attempted action: action 'Copying Execution Dynamic Library'
I think it is not an error with Tensorflow because --dynamic_mode=fully
is running fine on Linux. I think this line causes the problem
https://github.com/bazelbuild/bazel/blob/5f083b8f5a073a3427d575aa54eac5b779226708/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java#L1055
Since SymlinkAction can not create a symlink whose name is too long, it has to copy the file and causes the problem.
What operating system are you running Bazel on?
Windows 10
Have you found anything relevant by searching the web?
I found an issue which this feature could solve the problems.
https://github.com/bazelbuild/bazel/issues/8400 In fact, I think this is the main reason why building dll with bazel is not so easy
Any other information, logs, or outputs that you want to share?
I think adding this feature could allow bazel to build dll on Windows easier.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
That sounds good!
I think the hash should be at calculated based on RepositoryName + the package path the DLL belongs to. That should make the name unique and deterministic across the build.
That’s exactly what I mean! So glad you figured that out yourself!
BTW, you can file another issue to track the progress if you want. 😉