Skip to content

Building on Windows #276

Closed
Closed

Description

@abergmeier

The building docs mention to run MSYS2 shell, excluding mingw32 and mingw64. Sadly there is no reason or bug for using anything other than MSYS2. Could anyone please elaborate, why the others do not work?

Activity

  1. damienmg commented on Jul 3, 2015

    @damienmg
    Contributor

    No reason, wasn't tested. As we stated in our FAQ we are not working on Windows support because we don't have manpower for that at the moment. The support of windows is highly experimental.

  2. added
    P4
    on Jul 3, 2015
  3. abergmeier commented on Jul 3, 2015

    @abergmeier
    ContributorAuthor

    Created pull request #277 to clarify situation for others, too.

  4. davidzchen commented on Jul 6, 2015

    @davidzchen
    Member

    FYI one of the major blockers for proper Windows support (that is, without the need to run with elevated permissions) is that Bazel uses symlinks extensively, and while NTFS supports symlinks, creating symlinks requires that the user has SeCreateSymbolicLinkPrivilege. By default, only administrators have this privilege.

    This is even further complicated by SeCreateSymbolicLinkPrivilege being subject to UAC.

    According to Microsoft, the reason why this restriction exists is that:

    Symbolic links (symlinks) can expose security vulnerabilities in applications that aren't designed to handle symbolic links.

    I was not able to find any more details or examples of said possible vulnerabilities aside from symlink races when creating symlinks under world-writable directories such as /tmp, though, this is mitigated on POSIX systems using mkstemp(3) and mktemp(1).

    Unfortunately, from what I can observe, while symlink support on Windows exists, using the current implementation for most common use cases is pretty much impractical due to this restriction: https://www.google.com/search?q=SeCreateSymbolicLinkPrivilege

  5. damienmg commented on Jul 6, 2015

    @damienmg
    Contributor

    We could do with copying instead of symlinking and that would probably already be a good improvement over standard file system. There's a also the possibility of creating a kernel module to support our own kind of symlink or use the ntfs symlinking with a special service.

    Anyway doing a FS abstraction that use copy instead of symlink should work well for a first step.

  6. davidzchen commented on Jul 6, 2015

    @davidzchen
    Member

    SGTM. While copying instead of symlinking will incur a significant performance hit due to the I/O overhead, it would be a good first step. There is also the issue of Skylark rules that directly invoke ln to create symlinks. Would it be a good idea to have wrapper functions to abstract some of the common file system operations?

  7. damienmg commented on Jul 6, 2015

    @damienmg
    Contributor

    I think file operation abstraction should be provied at the skylark level
    so spawn less and less shell scripts.

    On Mon, Jul 6, 2015 at 1:02 PM David Z. Chen [email protected]
    wrote:

    SGTM. While copying instead of symlinking will incur a significant
    performance hit due to the I/O overhead, it would be a good first step.
    There is also the issue of Skylark rules that directly invoke ln to
    create symlinks. Would it be a good idea to have wrapper functions to
    abstract some of the common file system operations?

    —
    Reply to this email directly or view it on GitHub
    #276 (comment).

  8. hanwen commented on Jul 7, 2015

    @hanwen
    Contributor

    FWIW, I think we could replace symlinks with hardlinks (files) and junctions (directories).

  9. bjacob commented on Sep 6, 2015

    @bjacob

    Just +1 to this issue: I believe that supporting many build platforms is critical to the wide adoption of a build tool like Bazel.

  10. added
    P2
    and removed
    P4
    on Sep 7, 2015
  11. damienmg commented on Sep 7, 2015

    @damienmg
    Contributor

    By the way, we have set-up a goal to have basic windows support by the end of the year so stay tuned!

  12. 23 remaining items

  13. lberki commented on Feb 18, 2016

    @lberki
    Contributor

    Now that we can almost bootstrap on Windows, I filed a bunch of bugs to track the work that remains to be done in order to call our Windows support usable:

    https://github.com/bazelbuild/bazel/labels/Windows

  14. damienmg commented on Feb 18, 2016

    @damienmg
    Contributor

    Thanks Lukacs ! Let's close this one when we can bootstrap on Windows and CI is up and running!

  15. modified the milestones: 1.0, 0.3 on May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1platform: othertype: feature request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions