windows: "failed to create installation symlink" when output_base is in a docker volume
#17.283 aberto em 20 de jan. de 2023
Métricas do repositório
- Stars
- (25.384 stars)
- Métricas de merge de PR
- (Mesclagem média 22d 20h) (77 fundiu PRs em 30d)
Description
Description of the bug:
My CI builds are executed on Windows within windows containers. I want to share a cache between all this containers to reduce build times.
When I run a container with a volume mounted on my drive, Bazel returns this error :
Extracting Bazel installation...
ERROR: SymlinkDirectories(C:/Users/ContainerAdministrator/_bazel_ContainerAdministrator/install/c9ea1a9caee100e72d651d25da00df4d, c:\bazel\install): CreateJunction:
FATAL: failed to create installation symlink 'c:\bazel\install': success
The install directory is created so I do not understand this error. Manually I can create both a junction or a symlink without error.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Run a windows container with a mounted directory
docker run -it -v C:\cache:C:\bazel mcr.microsoft.com/windows/server:ltsc2022 - Run bazel with it's output_base within cache directory :
cd my_bazel_repo
bazel --output_base=C:\bazel build //sometarget
Which operating system are you running Bazel on?
Windows 10 Pro / Windows Server 2022 Standard Edition
What is the output of bazel info release?
release 5.4.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?
No response
Any other information, logs, or outputs that you want to share?
I've noticed that this bug does not occur if the host OS is Windows Server 20XX Datacenter Edition.
I haven't found any info on that but to me Bazel should not return this error since the install directory is created.