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 and patch files #8076

Closed
MarkaRagnos0815 opened this issue Apr 17, 2019 · 5 comments
Closed

Windows and patch files #8076

MarkaRagnos0815 opened this issue Apr 17, 2019 · 5 comments
Labels
area-Windows Windows-specific issues and feature requests team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged

Comments

@MarkaRagnos0815
Copy link

Description of the problem / feature request:

I am trying to build buildfarm-worker on a windows machine.
I did a bazel setup according to bazel website (bazel + java + maven + msys64 shell)

  1. this fails since msys64 shell does not have a program called "patch" (I can not find one via pacman) to apply patches to google protobuf (3.7.0)
  2. installed Linux subsystem for windows to provide a different bash (ubuntu 18.04) it fails since it cannot find the patch file

In both cases the error message looks nearly the same:

ERROR: error loading package '': Encountered error while reading extension file 'protobuf_deps.bzl': no such package '@com_google_protobuf//': Traceback (most recent call last):
        File "C:/users/awagner/_bazel_awagner/464pz4qt/external/bazel_tools/tools/build_defs/repo/http.bzl", line 55
                patch(ctx)
        File "<path_to_cache>/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 84, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch //third_party/com_google_protobuf:b6375e03aa.patch:

in case 1: bash: command not found
in case 2: /bin/bash: <path_to_buildfarm>/third_party/com_google_protobuf/b6375e03aa.patch: No such file or directory

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  • get bazel buildfarm master
  • do bazel setup according to bazel web site (windows)

What operating system are you running Bazel on?

windows 10

What's the output of bazel info release?

release 0.24.1

Have you found anything relevant by searching the web?

no

@aiuto aiuto added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged area-Windows Windows-specific issues and feature requests labels Apr 17, 2019
@aiuto
Copy link
Contributor

aiuto commented Apr 17, 2019

Added both ExternalDeps and Windows. It is ExternalDeps problem, but windows team might have the better chance of addressing it well.

@laszlocsomor
Copy link
Contributor

  1. Install diffutils with pacman, that has patch.
  2. Sorry, we don't support WSL.

@laszlocsomor
Copy link
Contributor

Regarding case 1's bash: command not found:

  • Where did you install msys64?
  • Is that on the PATH?
  • What's the output with --verbose_failures?

@MarkaRagnos0815
Copy link
Author

MarkaRagnos0815 commented Apr 24, 2019

  1. diffutils does not contain patch, after some research i found this command "pacman -S base-devel --needed" which installs all needed apps
  2. Installed msys64 to a custom directory on c drive
  3. I added everything to path variable according to bazel windows install guide

It works after installing "base-devel" package

you can close the ticket (maybe add the information about additional packages to install guide)

@laszlocsomor
Copy link
Contributor

@MarkaRagnos0815 : Thanks! Turns out patch has its own package, you can pacman -S patch. I'll update the docs.

@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
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 team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged
Projects
None yet
Development

No branches or pull requests

4 participants