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

conf-openjdk: add Ubuntu-family support #25980

Merged
merged 9 commits into from
Aug 22, 2024

Conversation

jmid
Copy link
Contributor

@jmid jmid commented May 30, 2024

No description provided.

@jmid
Copy link
Contributor Author

jmid commented May 30, 2024

CI is failing on

  • Alpine
  • OpenSuse
  • Oracle
  • x86_32
  • FreeBSD
  • macOS

Note: none of these were changed (so far) in the PR.

  • Oracle and FreeBSD are failing the system package install.
  • 32-bit is failing with
    # Error: missing `server' JVM at `/usr/lib/jvm/java-17-openjdk-i386/lib/server/libjvm.so'.
    # Please install or use the JRE or JDK that contains these missing components.
    
  • The rest are failing due to a missing PATH I suspect

@jmid
Copy link
Contributor Author

jmid commented Jul 3, 2024

Compared to the above status

  • FreeBSD is failing package install (as Oracle has been removed)
  • Alpine, OpenSuse, FreeBSD, and macOS are failing the javac -version check

The former fails with

- pkg: No packages available to install matching 'openjdk' have been found in the repositories
[ERROR] System package install failed with exit code 1 at command:
            sudo pkg install -y openjdk
[ERROR] These packages are still missing: openjdk

From https://www.freshports.org/search.php?query=openjdk it seems openjdk is no longer a valid package name.
Instead only specific version names, e.g., openjdk11/openjdk21 are listed.
I've thus gone for installing openjdk19 which seems neither bleeding edge nor ancient, so that it installs on a FreeBSD box from within the past couple of years.

For the latter, I'm unsure whether conf-packages should manipulate PATH to find javac.
For now, I've therefore gone with adding a post-install failure message to the user.

@mseri
Copy link
Member

mseri commented Jul 4, 2024

I think we should not manipulate the path, it is ok with the explicit failure message.

I would remove freebsd depext and add a failure message saying to install a version of openjdk if this fails to install.

@jmid
Copy link
Contributor Author

jmid commented Jul 4, 2024

OK, the latest 3 commit attempt to do so.

@shonfeder
Copy link
Contributor

Would it make sense to add the failure messages to the other failing platforms? Or do we think we will get those passing eventually in this PR too?

Failing now on

  • alpine: [conf-openjdk.1 (failed: The compilation of conf-openjdk.1 failed at "javac -version".)](https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/f723d510bcbf7c62b759d388b0fbd95b1689e4fe/variant/distributions,alpine-3.20-ocaml-5.2,conf-openjdk.1)

  • opensuse: [conf-openjdk.1 (failed: The compilation of conf-openjdk.1 failed at "javac -version".)](https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/f723d510bcbf7c62b759d388b0fbd95b1689e4fe/variant/distributions,opensuse-15.6-ocaml-4.14,conf-openjdk.1)

  • x86_32-ocaml-4.14: [conf-openjdk.1 (failed: missing server' JVM at /usr/lib/jvm/java-17-openjdk-i386/lib/server/libjvm.so'.)](https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/f723d510bcbf7c62b759d388b0fbd95b1689e4fe/variant/extras,x86_32-ocaml-4.14,conf-openjdk.1)

  • macos: [conf-openjdk.1 (failed: The compilation of conf-openjdk.1 failed at "javac -version".)](https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/f723d510bcbf7c62b759d388b0fbd95b1689e4fe/variant/macos,macos-homebrew-ocaml-4.14-amd64,conf-openjdk.1)

@jmid
Copy link
Contributor Author

jmid commented Aug 13, 2024

The error message is actually being printed for all failing platforms, it is just a bit lost in the output.
For example, here's a quote from an Alpine log:

<><> conf-openjdk.1 troubleshooting <><><><><><><><><><><><><><><><><><><><><><>
=> Please ensure that the javac binary is installed and is available in PATH
....

I'm open to input as to how to highlight the message a bit more.

The x86_32 failure stands a bit out because the system package install is failing there with

Error: missing `server' JVM at `/usr/lib/jvm/java-17-openjdk-i386/lib/server/libjvm.so'.

which seems to be a known issue caused by either

Overall, there's not much more to do opam-ci-wise, so 3e9c57b marks them as expected failures.

@jmid
Copy link
Contributor Author

jmid commented Aug 14, 2024

There's something strange going on with x86_32

I guess this could be explained by variations in "large file system" (as linked above) between CI machines? 🤔

Also fixed the x-ci-accept-failures platform name for it.

@jmid
Copy link
Contributor Author

jmid commented Aug 14, 2024

Modulo a lint failure this is now green and should thus be good to go.

@shonfeder
Copy link
Contributor

Looks great. The linting failure is not relevant to these changes.

@dinosaure
Copy link
Contributor

Thanks!

@dinosaure dinosaure merged commit 5100ab4 into ocaml:master Aug 22, 2024
1 of 2 checks passed
@jmid jmid deleted the conf-openjdk-expand branch August 22, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants