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

"Could not create symlink to repository" when build on Win10 #2

Open
y5mei opened this issue Sep 13, 2023 · 2 comments
Open

"Could not create symlink to repository" when build on Win10 #2

y5mei opened this issue Sep 13, 2023 · 2 comments

Comments

@y5mei
Copy link

y5mei commented Sep 13, 2023

I am trying to build on my win10 PC at home.

Running with Powershell, python 3.11.5, Bazel 5.3.0
Got a symlink error like below when I run bazel build,

PS C:\Workspace\reclient> python --version
Python 3.11.5
PS C:\Workspace\reclient> bazel --version
bazel 5.3.0
PS C:\Workspace\reclient> bazel build --config=clangscandeps //cmd/...
ERROR: /DEFAULT.WORKSPACE:1:17: fetching local_repository rule //external:bazel_tools: java.io.IOException: Could not create symlink to repository "C:/users/zhuzhu/_bazel_zhuzhu/install/40e9c076fd7053192c88f0d437fc6512/embedded_tools" (absolute path: "C:/users
/zhuzhu/_bazel_zhuzhu/install/40e9c076fd7053192c88f0d437fc6512/embedded_tools"): Cannot create junction (name=C:\users\zhuzhu\_bazel_zhuzhu\j4ylubfh\external\bazel_tools, target=C:\users\zhuzhu\_bazel_zhuzhu\install\40e9c076fd7053192c88f0d437fc6512\embedded_to
ols): ERROR: src/main/native/windows/file-jni.cc(99): nativeCreateJunction(\\?\C:\users\zhuzhu\_bazel_zhuzhu\j4ylubfh\external\bazel_tools, \\?\C:\users\zhuzhu\_bazel_zhuzhu\install\40e9c076fd7053192c88f0d437fc6512\embedded_tools): ERROR: src/main/native/windo
ws/file.cc(401): DeviceIoControl(\\?\C:\users\zhuzhu\_bazel_zhuzhu\j4ylubfh\external\bazel_tools): Access is denied.
INFO: Found applicable config definition build:clangscandeps in file c:\workspace\reclient\.bazelrc: --//:include_scanner=clangscandeps --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
ERROR: //:include_scanner :: Error loading option //:include_scanner: no such package '@bazel_tools//tools/build_defs/repo': Could not create symlink to repository "C:/users/zhuzhu/_bazel_zhuzhu/install/40e9c076fd7053192c88f0d437fc6512/embedded_tools" (absolut
e path: "C:/users/zhuzhu/_bazel_zhuzhu/install/40e9c076fd7053192c88f0d437fc6512/embedded_tools"): Cannot create junction (name=C:\users\zhuzhu\_bazel_zhuzhu\j4ylubfh\external\bazel_tools, target=C:\users\zhuzhu\_bazel_zhuzhu\install\40e9c076fd7053192c88f0d437f
c6512\embedded_tools): ERROR: src/main/native/windows/file-jni.cc(99): nativeCreateJunction(\\?\C:\users\zhuzhu\_bazel_zhuzhu\j4ylubfh\external\bazel_tools, \\?\C:\users\zhuzhu\_bazel_zhuzhu\install\40e9c076fd7053192c88f0d437fc6512\embedded_tools): ERROR: src/
main/native/windows/file.cc(401): DeviceIoControl(\\?\C:\users\zhuzhu\_bazel_zhuzhu\j4ylubfh\external\bazel_tools): Access is denied.
@albertocavalcante
Copy link

@y5mei did you find a solution for this issue?

@mostynb
Copy link

mostynb commented Jul 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants