Getting bazel build command working on Windows from a mapped network drive

75 views
Skip to first unread message

Shubham Srivastava

unread,
Jan 16, 2026, 10:05:02 AMJan 16
to bazel-discuss
Can someone provide me guidance on how to invoke bazel from a mapped network drive that holds my bazel workspace?

I have a very simple setup based on the Bazel tutorial examples mentioned here Bazel Tutorial: Build a C++ Project. This setup along with the examples of bazel build works from my local drive but when I move this setup to the network drive and run bazel build command from the workspace directory the bazel command just stalls. I have observed that when I do this the bazel server doesn't even start.

To investigate more when I examined the command text file created in output base directory, I saw that the workspace-directory option to the bazel server command was empty. Has anyone seen this before and has recommendations on how to proceed?

Best,
Shubham

David Turner

unread,
Jan 19, 2026, 1:53:44 PMJan 19
to Shubham Srivastava, bazel-discuss
Can you clarify what you mean by "moving the setup to the network drive"? For example, if the Bazel output user root and output base are on a networked drive, you're going to have a really bad time.

For example, on the first startup in a new output user root, Bazel extracts more than 1.2 GiB of data files, which takes a few seconds even on a powerful workstation.
That's the "Extracting Bazel installation...." message that is printed when this happens. I can't imagine the time it would take to do that on a network drive.



--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bazel-discuss/e9f2440d-144a-499a-beae-54228e93c069n%40googlegroups.com.

Shubham Srivastava

unread,
Jan 22, 2026, 9:14:39 AMJan 22
to bazel-discuss
When I say that I am moving my setup to network drive I meant only my project setup. Just to clarify the output base directory is still on my local disk C:\. So, the steps to Extract bazel installation are all happening on my C:\ itself.

Does that information help?

David Turner

unread,
Jan 26, 2026, 9:51:15 AM (10 days ago) Jan 26
to Shubham Srivastava, bazel-discuss
On Thu, Jan 22, 2026 at 3:14 PM Shubham Srivastava <srivshu...@gmail.com> wrote:
When I say that I am moving my setup to network drive I meant only my project setup. Just to clarify the output base directory is still on my local disk C:\. So, the steps to Extract bazel installation are all happening on my C:\ itself.

Does that information help?

Yes it does help delimiting the cause of what you are seeing. If the Bazel install base is on a local disk, it seems very unlikely that the Bazel server wouldn't start though. Do you have any environment variables pointing to your network drive(s) that could alter program startup?

If the server started properly, it is likely stuck doing stat() calls over the network, which have very high latency (especially on case-insensitive filesystems). Moreover, on Windows, Bazel will want to hash the content of all input files before starting to build which will take significant time over a network connection. It could also be your antivirus blocking file accesses for some reason. However, you should be able to have some output before all this.

Are you sure that the Bazel server is not started at all?


On Tuesday, January 20, 2026 at 12:23:44 AM UTC+5:30 di...@google.com wrote:
Can you clarify what you mean by "moving the setup to the network drive"? For example, if the Bazel output user root and output base are on a networked drive, you're going to have a really bad time.

For example, on the first startup in a new output user root, Bazel extracts more than 1.2 GiB of data files, which takes a few seconds even on a powerful workstation.
That's the "Extracting Bazel installation...." message that is printed when this happens. I can't imagine the time it would take to do that on a network drive.



On Fri, Jan 16, 2026 at 4:05 PM Shubham Srivastava <srivshu...@gmail.com> wrote:
Can someone provide me guidance on how to invoke bazel from a mapped network drive that holds my bazel workspace?

I have a very simple setup based on the Bazel tutorial examples mentioned here Bazel Tutorial: Build a C++ Project. This setup along with the examples of bazel build works from my local drive but when I move this setup to the network drive and run bazel build command from the workspace directory the bazel command just stalls. I have observed that when I do this the bazel server doesn't even start.

To investigate more when I examined the command text file created in output base directory, I saw that the workspace-directory option to the bazel server command was empty. Has anyone seen this before and has recommendations on how to proceed?

Best,
Shubham

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bazel-discuss/e9f2440d-144a-499a-beae-54228e93c069n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages