bazel fails to build target on Windows 11 RAM disk mount with blaze_util::MakeCanonical(...) failed: (error: 1): Incorrect function.
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
Namaste,
While attempting to build using bazel by pointing buildkite toward a RAM mounted file system
I see the following error. I'm not sure under what conditions `blaze_util::MakeCanonical` fails on Windows.
```
[FATAL 12:14:05.257 src/main/cpp/blaze.cc:1302] blaze_util::MakeCanonical('r:\buildkite-agent\builds\windows-amd64-mustang-1\yesudeep\rules-clojure') failed: (error: 1): Incorrect function.
```
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
1. Create a RAM disk using [ImDisk](https://www.tenforums.com/tutorials/174094-how-create-ram-disk-imdisk-windows-10-a.html)
2. Point your CI agent to use the Ram disk.
3. Have it run bazel there.
### Which operating system are you running Bazel on?
Windows 11 Pro
### What is the output of `bazel info release`?
release 6.0.0
### If `bazel info release` returns `development 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?
- [ ] Source location: https://github.com/bazelbuild/bazel/blob/ccfeeff06cdc0266b92781213bbdf33c4288b1c5/src/main/cpp/blaze.cc#L1301
- [ ] Impl: https://github.com/bazelbuild/bazel/blob/da23fd5029bc2978b37be7b7da278692ab88045b/src/main/cpp/util/file_windows.cc#L482
### Any other information, logs, or outputs that you want to share?
- [ ] The problem is not reproducible if I switch to drive mounted at C: (SSD) instead of R: (RAM FS)
Contributor guide
Research direction
Start with src/main/cpp/blaze.cc around line 1301 and src/main/cpp/util/file_windows.cc around line 482, then reproduce the failure on a Windows 11 ImDisk RAM disk. Compare the same Bazel build on the R: RAM disk and a C: SSD drive. Done means the target builds successfully on the RAM disk without the MakeCanonical error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100