Skip to content
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

windows: "failed to create installation symlink" when output_base is in a docker volume #17283

Open
lripoche opened this issue Jan 20, 2023 · 1 comment
Labels
area-Windows Windows-specific issues and feature requests help wanted Someone outside the Bazel team could own this P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@lripoche
Copy link
Contributor

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.

  1. Run a windows container with a mounted directory
    docker run -it -v C:\cache:C:\bazel mcr.microsoft.com/windows/server:ltsc2022
  2. 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.

@sgowroji sgowroji added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website area-Windows Windows-specific issues and feature requests untriaged type: bug labels Jan 21, 2023
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 30 days. It will be closed in the next 7 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler".

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Feb 21, 2023
@github-actions github-actions bot removed the stale Issues or PRs that are stale (no activity for 30 days) label Feb 28, 2023
@meteorcloudy meteorcloudy added P2 We'll consider working on this in future. (Assignee optional) help wanted Someone outside the Bazel team could own this and removed untriaged labels Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests help wanted Someone outside the Bazel team could own this P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
Development

No branches or pull requests

3 participants