question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build failed for version 3.0.0

See original GitHub issue

When I build with bazel of version 3.7.1 on Windows10,it occurs such errors:

ERROR: D:/developer/project/java/source/gerrit-oauth-provider-3.0.0/BUILD:26:12: in _GenSuite rule //:gerrit_oauth_provider_testsTestSuite:
Traceback (most recent call last):
        File "C:/users/hundanli/_bazel_hundanli/hoe6un33/external/com_googlesource_gerrit_bazlets/tools/junit.bzl", line 51, column 22, in _impl
                [_AsClassName(x) for x in ctx.attr.srcs],
        File "C:/users/hundanli/_bazel_hundanli/hoe6un33/external/com_googlesource_gerrit_bazlets/tools/junit.bzl", line 38, column 11, in _AsClassName
                fname = [x.path for x in fname.files][0]
Error: type 'depset' is not iterable
INFO: Repository rules_cc instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:281:6: in <toplevel>
  C:/users/hundanli/_bazel_hundanli/hoe6un33/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
  C:/users/hundanli/_bazel_hundanli/hoe6un33/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
ERROR: Analysis of target '//:gerrit_oauth_provider_testsTestSuite' failed; build aborted: Analysis of target '//:gerrit_oauth_provider_testsTestSuite' failed
INFO: Elapsed time: 12.659s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (5 packages loaded, 16 targets configured)
    currently loading: @bazel_tools//tools/cpp

Any help, please?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hundanLicommented, Dec 9, 2020

It works well! Thank you very much for your help!

0reactions
davidocommented, Dec 8, 2020

You cloned gerrit not recusrively, and missed git modules. JGit submodule is missing.

Here are the commands how to build the plugin:

  $ mkdir /tmp/build
  $ cd /tmp/build
  $ git clone --recurse-submodules https://gerrit.googlesource.com/gerrit gerrit
  $ cd gerrit
  $ bazel build :gerrit
  $ cd plugins
  $ git clone https://gerrit.googlesource.com/plugins/oauth
  $ cd ..
  $ cp plugins/oauth/external_plugin_deps.bzl plugins
  $ bazel build plugins/oauth

INFO: Invocation ID: 2d0bc7e7-c18a-4b4a-aac1-0f56b0ef6250
DEBUG: /home/davido/.cache/bazel/_bazel_davido/496771e6fd159c87df977b2e99ede97d/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:59:14: 
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '3.1.0'
INFO: Analyzed target //plugins/oauth:oauth (111 packages loaded, 692 targets configured).
INFO: Found 1 target...
Target //plugins/oauth:oauth up-to-date:
  bazel-bin/plugins/oauth/oauth.jar
INFO: Elapsed time: 27.123s, Critical Path: 21.65s
INFO: 50 processes: 6 remote cache hit, 4 internal, 38 linux-sandbox, 2 worker.
INFO: Build completed successfully, 50 total actions

  $ ls -all bazel-bin/plugins/oauth/oauth.jar
-r-xr-xr-x 1 davido users 2581987 Dec  8 20:27 bazel-bin/plugins/oauth/oauth.jar

Can you try exactly the above commands?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter build failed after upgrading to Flutter v3 - Stack Overflow
Yes, I've tried that as well. I've edited the question and added the content of build. · For me the thing was to...
Read more >
Upgrading your build from Gradle 4.x to 5.0
If you are using Gradle for Android, you need to move to version 3.3 or higher of both the ... Build will now...
Read more >
[OneSignal Plugin] Android Build Error | OutSystems
I take it you are using version 3.0.0 of the OneSignal plugin, right? Bear in mind that version is made for MABS 5...
Read more >
Spring Boot 3.0.0-RC1 available now
Most notably, this release builds on the multi-year R&D effort that started with the ... id 'org.springframework.boot' version '3.0.0-M4'.
Read more >
Bigtop Project Release Notes
[BIGTOP-3589] - Fix build failure of Alluxio caused by buildnumber-maven-plugin; [BIGTOP-3595] ... Release Notes - Bigtop - Version 3.0.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found