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

Dependency undocumented: patch #42

Open
JonKohler opened this issue May 24, 2022 · 1 comment
Open

Dependency undocumented: patch #42

JonKohler opened this issue May 24, 2022 · 1 comment

Comments

@JonKohler
Copy link

With Rocky 8.6, "patch" is not installed by default. Not sure if we could detect this sooner in the bazel process or what, but without patch installed, you'll get this error.

Filing an issue to have it documented somewhere

[root@localhost schedviz]# yarn bazel run server -- -- -storage_path="/root/git/traces"
yarn run v1.22.18
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /root/git/schedviz/node_modules/.bin/bazel run server -- -storage_path=/root/git/traces
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/command.profile.gz'
INFO: Call stack for the definition of repository 'go_googleapis' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
 - /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/io_bazel_rules_go/go/private/repositories.bzl:237:9
 - /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/io_bazel_rules_go/go/private/repositories.bzl:188:5
 - /root/git/schedviz/WORKSPACE:100:1
ERROR: An error occurred during the fetch of repository 'go_googleapis':
   Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl", line 178
                patch(ctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 116, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch @io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch:
bash: patch: command not found
ERROR: /root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/org_golang_google_grpc/status/BUILD.bazel:3:1: @org_golang_google_grpc//status:go_default_library depends on @go_googleapis//google/rpc:status_go_proto in repository @go_googleapis which failed to fetch. no such package '@go_googleapis//google/rpc': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl", line 178
                patch(ctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 116, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch @io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch:
bash: patch: command not found
ERROR: Analysis of target '//server:server' failed; build aborted: no such package '@go_googleapis//google/rpc': Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/git.bzl", line 178
                patch(ctx)
        File "/root/.cache/bazel/_bazel_root/116cb4b37cb5ae33998452196fe24c90/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 116, in patch
                fail(("Error applying patch %s:\n%s%s...)))
Error applying patch @io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch:
bash: patch: command not found
INFO: Elapsed time: 24.080s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[root@localhost schedviz]# 
@JonKohler
Copy link
Author

dnf install patch resolves this issue, just would be nice if it was documented (or detected the binaries needed before we got this part), since yarn install and this yarn bazel run server doesn't take care of it automatically.

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

1 participant