Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Javadoc issue on master #4627

Closed
kodebach opened this issue Nov 2, 2022 · 6 comments
Closed

Javadoc issue on master #4627

kodebach opened this issue Nov 2, 2022 · 6 comments
Assignees
Labels
Milestone

Comments

@kodebach
Copy link
Member

kodebach commented Nov 2, 2022

The failing builds are only those using Debian Sid. I assumed the issue is that Sid now includes a new package that causes issues, so I ran the build in docker locally and running Gradle with --stacktrace showed that the issue was:

Could not start '/usr/lib/jvm/java-17-openjdk-amd64/bin/javadoc'

I checked and:

$ ls '/usr/lib/jvm/java-17-openjdk-amd64/bin/javadoc'
ls: cannot access '/usr/lib/jvm/java-17-openjdk-amd64/bin/javadoc': No such file or directory

So a quick fix for the issue would be: Install openjdk-17-jdk-headless in the docker container.

A more permanent solution would be finding out, why our CMake setup tries to use JDK 17 at all, when only JRE 17 is installed. There is no javac for Java 17:

$ ls '/usr/lib/jvm/java-17-openjdk-amd64/bin/'
java  jpackage  keytool  rmiregistry

Possibly the issue is that Debian is set up like this:

$ realpath /usr/bin/java
/usr/lib/jvm/java-17-openjdk-amd64/bin/java
$ realpath /usr/bin/javac
/usr/lib/jvm/java-11-openjdk-amd64/bin/javac

and we only check java --version to get the version number and then assume that is correct. If that's the case, we should probably use javac --version instead. But AFAICT we use

find_package (Java QUIET)

which is built into CMake, so a fix might be a bit more complicated and may even needs an upstream bug report.

@markus2330
Copy link
Contributor

Thank you so much for finding out!

--stacktrace

Any reason why we don't add this by default?

@flo91 Can you please create a PR with adding the package to unstable (and maybe also updating the check if javac is available and disabling jna if not).

Maybe something like

diff --git a/scripts/docker/debian/sid/Dockerfile b/scripts/docker/debian/sid/Dockerfile
index d1a6fc6cb..8fa6c778a 100644
--- a/scripts/docker/debian/sid/Dockerfile
+++ b/scripts/docker/debian/sid/Dockerfile
@@ -49,7 +49,7 @@ RUN apt-get update && apt-get -y install \
         moreutils \
         ninja-build \
         npm \
-        openjdk-11-jdk \
+        openjdk-17-jdk \
         pkg-config \
         python3-dev \
         python3-pip \

is enough?

@kodebach
Copy link
Member Author

kodebach commented Nov 3, 2022

Any reason why we don't add this by default?

We could, but I'm not 100% certain where we'd have to add it. I built without CMake, directly calling the failed task ./gradlew --stacktrace :hello:javadoc to find the error.

@markus2330
Copy link
Contributor

@flo91 will you have time today? This is urgent, as without a fix all new PRs (H2 deadline is soon) will fail on the build server.

@atmaxinger
Copy link
Contributor

@markus2330 I can do it

@markus2330 markus2330 assigned atmaxinger and unassigned flo91 Nov 4, 2022
@markus2330
Copy link
Contributor

Thank you so much! ❤️

@flo91
Copy link
Collaborator

flo91 commented Nov 6, 2022

Thank you for helping out! 🥇
Unfortunately, I was quite busy the last two days...

Janldeboer pushed a commit to Janldeboer/libelektra that referenced this issue Dec 12, 2022
@mpranj mpranj added this to the 0.9.12 milestone Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants