compile Gerrit with bazel get error : no such package '@jgit//org.eclipse.jgit.junit': No WORKSPACE file found in

792 views
Skip to first unread message

Guy Levkowitz

unread,
Feb 24, 2022, 3:39:02 AM2/24/22
to Repo and Gerrit Discussion
HI,

I'm trying to compile Gerrit version  3.4.1  (same was with 3.5.0)  and strange error on Bazel  : 
/u/guylevk/gerrit_install/gerrit% bazel fetch //...
2022/02/24 10:30:05 Downloading https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-x86_64...
WARNING: Output base '/u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe' is on NFS. This may lead to surprising failures and undetermined behavior.
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: Error fetching repository: java.io.IOException: No WORKSPACE file found in /u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe/external/jgit
ERROR: /u/guylevk/gerrit_install/gerrit/javatests/com/google/gerrit/server/submit/BUILD:3:12: no such package '@jgit//org.eclipse.jgit.junit': No WORKSPACE file found in /u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe/external/jgit and referenced by '//javatests/com/google/gerrit/server/submit:submit_tests'



Are you familiar with this kind of error ? 

BR

Guy


Luca Milanesio

unread,
Feb 24, 2022, 7:47:08 AM2/24/22
to Repo and Gerrit Discussion, Luca Milanesio, Guy Levkowitz

On 24 Feb 2022, at 08:39, Guy Levkowitz <sil...@gmail.com> wrote:

HI,

I'm trying to compile Gerrit version  3.4.1  (same was with 3.5.0)  and strange error on Bazel  : 
/u/guylevk/gerrit_install/gerrit% bazel fetch //...

Have you tried with ‘bazelisk build gerrit’ ?

Luca.

2022/02/24 10:30:05 Downloading https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-x86_64...
WARNING: Output base '/u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe' is on NFS. This may lead to surprising failures and undetermined behavior.
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: Error fetching repository: java.io.IOException: No WORKSPACE file found in /u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe/external/jgit
ERROR: /u/guylevk/gerrit_install/gerrit/javatests/com/google/gerrit/server/submit/BUILD:3:12: no such package '@jgit//org.eclipse.jgit.junit': No WORKSPACE file found in /u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe/external/jgit and referenced by '//javatests/com/google/gerrit/server/submit:submit_tests'



Are you familiar with this kind of error ? 

BR

Guy



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/e1725024-a98d-48be-b19b-c56e5745062fn%40googlegroups.com.

Guy Levkowitz

unread,
Feb 25, 2022, 3:45:35 AM2/25/22
to Repo and Gerrit Discussion
yes - I have try also to download the bazelisk-linux-amd64  from :
and replace with /bin/bazel 

And still get the same error

Strange


ב-יום חמישי, 24 בפברואר 2022 בשעה 14:47:08 UTC+2, lucamilanesio כתב/ה:

Luca Milanesio

unread,
Feb 25, 2022, 3:59:14 AM2/25/22
to Repo and Gerrit Discussion, Luca Milanesio, Guy Levkowitz

On 25 Feb 2022, at 08:45, Guy Levkowitz <sil...@gmail.com> wrote:

yes - I have try also to download the bazelisk-linux-amd64  from :
and replace with /bin/bazel 

And still get the same error

I am wondering why is trying to access the JGit’s WORKSPACE, which should be fully ignored:

ERROR: Error fetching repository: java.io.IOException: No WORKSPACE file found in /u/guylevk/.cache/bazel/_bazel_guylevk/d86fd1138578f33daafd4e6dbefbf3fe/external/jgit

Are you able to reproduce it from scratch, starting from a clean clone of the Gerrit repo?
If yes, can you paste here the full output of all commands from the initial clone?

Luca.

David Ostrovsky

unread,
Feb 25, 2022, 8:34:13 AM2/25/22
to Repo and Gerrit Discussion
lucamilanesio schrieb am Freitag, 25. Februar 2022 um 09:59:14 UTC+1:

On 25 Feb 2022, at 08:45, Guy Levkowitz <sil...@gmail.com> wrote:

yes - I have try also to download the bazelisk-linux-amd64  from :
and replace with /bin/bazel 

And still get the same error

I am wondering why is trying to access the JGit’s WORKSPACE, which should be fully ignored:


Because JGit module wasn't fetched? Try this:

  $ git clone --recursive https://gerrit.googlesource.com/gerrit && cd gerrit
  $ bazel build release

Guy Levkowitz

unread,
Feb 27, 2022, 3:27:57 AM2/27/22
to Repo and Gerrit Discussion

I have done :
  $ git clone --recursive https://gerrit.googlesource.com/gerrit && cd gerrit
  $ bazel build release
get error regard bazel version  that needs to be bazel-5.0.0-linux-x86_6 , which i have download and  move to :
 /usr/bin/bazel-5.0.0-linux-x86_6

and after I have run the :bazel build release    - and it finish successfully

thanks - i will check also with other branches/tags as i don't want to take the master branch

thanks

Guy
 


ב-יום שישי, 25 בפברואר 2022 בשעה 15:34:13 UTC+2, David Ostrovsky כתב/ה:
Reply all
Reply to author
Forward
0 new messages