Error while compiling v3.9.1 branch of gerrit

141 views
Skip to first unread message

Sweta Asnodkar

unread,
Feb 12, 2024, 7:53:26 AM2/12/24
to Repo and Gerrit Discussion
Hello Team,

I am trying to compile gerrit code for v3.9.1 branch.
It is failing with below error:

ERROR: /home/wncuser/.cache/bazel/_bazel_wncuser/42b75b2958567ffb9252d4b719fbdc82/external/jgit/org.eclipse.jgit.archive/BUILD:5:13: Building external/jgit/org.eclipse.jgit.archive/libjgit-archive-class.jar (8 source files) failed: (Exit 1): java failed: error executing command (from target @jgit//org.eclipse.jgit.archive:jgit-archive) external/remotejdk17_linux/bin/java '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ... (remaining 18 arguments skipped)
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java:47: error: type ArchiveOutputStream does not take parameters
                        ArchiveOutputStream<? extends ArchiveEntry> s,
                                           ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java:46: error: type ArchiveOutputStream does not take parameters
        protected ArchiveOutputStream<? extends ArchiveEntry> applyFormatOptions(
                                     ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java:38: error: type ArchiveOutputStream does not take parameters
                ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> {
                                                         ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java:60: error: type ArchiveOutputStream does not take parameters
        public void putEntry(ArchiveOutputStream<TarArchiveEntry> out,
                                                ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java:31: error: type ArchiveOutputStream does not take parameters
                implements ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> {
                                                                    ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java:35: error: type ArchiveOutputStream does not take parameters
        private final ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> tarFormat = new TarFormat();
                                                               ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java:58: error: type ArchiveOutputStream does not take parameters
        public void putEntry(ArchiveOutputStream<TarArchiveEntry> out,
                                                ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java:32: error: type ArchiveOutputStream does not take parameters
                implements ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> {
                                                                    ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java:36: error: type ArchiveOutputStream does not take parameters
        private final ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> tarFormat = new TarFormat();
                                                               ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java:61: error: type ArchiveOutputStream does not take parameters
        public void putEntry(ArchiveOutputStream<TarArchiveEntry> out,
                                                ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java:31: error: type ArchiveOutputStream does not take parameters
                implements ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> {
                                                                    ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java:35: error: type ArchiveOutputStream does not take parameters
        private final ArchiveCommand.Format<ArchiveOutputStream<TarArchiveEntry>> tarFormat = new TarFormat();
                                                               ^
external/jgit/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java:58: error: type ArchiveOutputStream does not take parameters
        public void putEntry(ArchiveOutputStream<TarArchiveEntry> out,
                                                ^
Target //:gerrit failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 9.078s, Critical Path: 5.25s
INFO: 422 processes: 351 disk cache hit, 66 internal, 5 linux-sandbox.
FAILED: Build did NOT complete successfully


Can someone please help me with this?

Thanks,
Sweta

Sweta Asnodkar

unread,
Feb 13, 2024, 3:37:53 AM2/13/24
to Repo and Gerrit Discussion
If anyone has any idea please help me with the same..

Dariusz Luksza

unread,
Feb 13, 2024, 3:43:23 AM2/13/24
to Sweta Asnodkar, Repo and Gerrit Discussion
Do you have any local modifications? Are your submodules up to date?

You can check the local repository status with `git status` and update the submodules with `git submodule update`

HTH
Darek
 
Thanks,
Sweta

--
--
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/0ca64400-a141-4f5b-a0a9-14a2409aae3an%40googlegroups.com.


--
Blog: https://luksza.org http://HabitChallenge.co
LinkedIn: https://linkedin.com/in/dluksza

P.S. Have you checked the Habit Challenge app? You should ;)

Sweta Asnodkar

unread,
Feb 13, 2024, 4:48:52 AM2/13/24
to Repo and Gerrit Discussion
>> Hi Darek,
    >> There are not local changes made by me. I just followed following steps
     >> git clone --recursive https://gerrit.googlesource.com/gerrit && cd gerrit
     >> git checkout v3.9.1
     >>  bazel build release 
  
      Don't know what is wrong here.

Matthias Sohn

unread,
Feb 13, 2024, 5:04:47 AM2/13/24
to Sweta Asnodkar, Repo and Gerrit Discussion
you need to
  • update submodules after checking out v3.9.1
  • better use bazelisk to start bazel which ensures that you run the correct version of bazel
Try this:

git clone --recursive https://gerrit.googlesource.com/gerrit && cd gerrit
git checkout v3.9.1
git submodule update --init
bazelisk build release

this succeeds for me on Mac

-Matthias
 

Dariusz Luksza

unread,
Feb 13, 2024, 5:07:16 AM2/13/24
to Sweta Asnodkar, Repo and Gerrit Discussion
the issue is in "git checkout v3.9.1". If you do `git status` you should see that the `modules/jgit` is listed as "modified". Gerrit uses git submodules to bring in some of its dependencies, one of them is jgit. This means that whenever you switch between different versions, like going from `master` to `v3.9.1` you also must synchronize the submodules. One way of doing that is with `git checkout --recursive v3.9.1`, another `git checkout v3.9.1 && git submodule update`. Both ways will switch to the desired version and synchronize the submodules.
 

Sweta Asnodkar

unread,
Feb 13, 2024, 5:48:43 AM2/13/24
to Repo and Gerrit Discussion
Thank you so much!! This worked.. :)
Reply all
Reply to author
Forward
0 new messages