-
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
Source forest creation fails for cc_test rules on Windows #2474
Comments
The reason it fails is because cc_test rules depend on Thanks for reporting, this is definitely a bug in Bazel we should fix. |
Thanks a lot for the quick fix! Creating the
with
|
We are using MSVC to build c++ on Windows, but it's not yet the default toolchain. Please add |
Wonderful! That was just the hint I needed. Perfectly works. Have a great day @meteorcloudy! |
@BittaBoesaBiba Nice! Thanks, you too! :) |
On Unix system, `ln -s foo bar` will create an dangling symlink bar -> foo even foo doesn't exist. The current implementation of createSymbolicLink for Windows fails in this situtation. And this lead to #2474. In this change, we create a dangling junction when the target doesn't exist which mimics the behavior on Unix. Fixed bazelbuild/bazel#2474 Change-Id: I442ca3e2fb20b76c9b5bbfee903299fe51481f43 PiperOrigin-RevId: 157694631
Description of the problem:
/_bazel_<user>/<hash>/execroot/<workspace_dir>/tools
directory is not created when trying to build cc_test rules.Error when testing hello-fail_test from bazel examples
Tested multiple cc_test rules which all have the same issue.
Success when running hello-world
Success when changing hello-fail_test to cc_binary in the BUILD file
Success when setting up the build environment on elementary OS
If possible, provide a minimal example to reproduce the problem:
C:\tools\bazel
and add it to PATHbazel-cpp-test/examples/cpp
) with an empty WORKSPACE at top level (bazel-cpp-test
)cd
to yourbazel-cpp-test
directory and executebazel test examples/cpp:hello-fail_test
Environment info
Operating System:
Windows 10, 64 Bit
Windows 7, 64 Bit
elementary OS, 64 Bit, VirtualBox
Bazel version (output of
bazel info release
):release 0.4.4
on Windows 10, 64 Bit
tested chocolatey package first (0.4.3),
tested pre-build binaries 0.4.4, 0.4.3, 0.4.0, 0.4.1 and 0.3.2
tested with and without --cpu=x64_windows_msvc
on Windows 7, 64 Bit
tested pre-build binary 0.4.4, 0.4.3
Have you found anything relevant by searching the web? (e.g. GitHub issues, email threads in the [email protected] archive)
#1583
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
printenv.txt
The text was updated successfully, but these errors were encountered: