bazelbuild / bazelbuild/reclient

Build fails in patching on Windows

Open
#24 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
114
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Building with bazelisk on Windows 11 in git bash. This is after installing GNU `patch` and hardcoding the Python3 path:
```
kschzt@laptop MINGW64 /c/src/reclient (main)
$ bazelisk build --config=clangscandeps //cmd/...
Starting local Bazel server and connecting to it...
INFO: Repository io_opencensus_go_contrib_exporter_stackdriver instantiated at:
C:/src/reclient/WORKSPACE:336:14: in
Repository rule go_repository defined at:
C:/users/kschz/_bazel_kschzt/sd2lufjt/external/bazel_gazelle/internal/go_repository.bzl:313:32: in
ERROR: An error occurred during the fetch of repository 'io_opencensus_go_contrib_exporter_stackdriver':
Traceback (most recent call last):
File "C:/users/kschz/_bazel_kschzt/sd2lufjt/external/bazel_gazelle/internal/go_repository.bzl", line 311, column 10, in _go_repository_impl
patch(ctx)
File "C:/users/kschz/_bazel_kschzt/sd2lufjt/external/bazel_gazelle/internal/go_repository.bzl", line 563, column 17, in patch
fail("Error applying patch %s:\n%s%s" %
Error in fail: Error applying patch //third_party/patches/opencensus-go-exporter-stackdriver:opencensus-stackdriver-interval.patch:
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
patching file metrics.go
ERROR: C:/src/reclient/WORKSPACE:336:14: fetching go_repository rule //external:io_opencensus_go_contrib_exporter_stackdriver: Traceback (most recent call last):
File "C:/users/kschz/_bazel_kschzt/sd2lufjt/external/bazel_gazelle/internal/go_repository.bzl", line 311, column 10, in _go_repository_impl
patch(ctx)
File "C:/users/kschz/_bazel_kschzt/sd2lufjt/external/bazel_gazelle/internal/go_repository.bzl", line 563, column 17, in patch
fail("Error applying patch %s:\n%s%s" %
Error in fail: Error applying patch //third_party/patches/opencensus-go-exporter-stackdriver:opencensus-stackdriver-interval.patch:
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
patching file metrics.go
ERROR: C:/src/reclient/internal/pkg/monitoring/BUILD.bazel:3:11: //internal/pkg/monitoring:monitoring depends on @io_opencensus_go_contrib_exporter_stackdriver//:stackdriver in repository @io_opencensus_go_contrib_exporter_stackdriver which failed to fetch. no such package '@io_opencensus_go_contrib_exporter_stackdriver//': Error applying patch //third_party/patches/opencensus-go-exporter-stackdriver:opencensus-stackdriver-interval.patch:
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
patching file metrics.go
ERROR: Analysis of target '//cmd/bootstrap:bootstrap' failed; build aborted:
INFO: Elapsed time: 11.807s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (335 packages loaded, 12042 targets configured)
Fetching @go_googleapis; fetching 4s
Fetching @com_github_vardius_progress_go; fetching
Fetching @io_opencensus_go; fetching
Fetching @com_github_google_pprof; fetching
Fetching @org_golang_google_api; fetching
Fetching C:/users/kschz/_bazel_kschzt/sd2lufjt/external/go_googleapis; Extracting C:/users/kschz/_bazel_kschzt/sd2lufjt/external/go_googleapis/temp8849367375833790046/53377c165584e84c410a0905d9effb3fe5df2806.zip
Fetching @com_github_karrick_godirwalk; fetching
Fetching @llvm-project; fetching
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `bazelisk build --config=clangscandeps //cmd/...` on Windows 11 from Git Bash. Start at WORKSPACE:336 and inspect third_party/patches/opencensus-go-exporter-stackdriver/opencensus-stackdriver-interval.patch alongside the reported patch application error. Done means the dependency fetch and requested build complete successfully on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.