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

Cannot install K on ubuntu-latest GitHub Actions runner #4059

Closed
tothtamas28 opened this issue Feb 28, 2024 · 0 comments · Fixed by #4095
Closed

Cannot install K on ubuntu-latest GitHub Actions runner #4059

tothtamas28 opened this issue Feb 28, 2024 · 0 comments · Fixed by #4095
Labels

Comments

@tothtamas28
Copy link
Contributor

The following job installs K from the Jammy package on an ubuntu-latest GitHub Actions runner: https://github.com/runtimeverification/pyk/actions/runs/8079767562/workflow?pr=929#L124

When kompile --version is run, it fails with an error: https://github.com/runtimeverification/pyk/actions/runs/8079767562/job/22074896470?pr=929

$ java --version
openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1)
OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing)
$ kompile --version
Error: K requires Java 17 to run but the detected version is 11.
Please either add Java 17 bin directory to the PATH or set the JAVA_HOME
environment variable accordingly.

Analysis

The issue is potentially with how checkJava processes the version string.

First, it tries to look up the version by running org.kframework.main.JavaVersion:

version=$($KSERVER_INSTANCE org.kframework.main.JavaVersion 2>&1)

Then, as a fallback, it runs java -version:

version=$("$_java" -version 2>&1)

But the two strings have a very different format, so probably the following processing steps fail at some point:

version=$(echo $version | awk -F '"' '/version/ {print $2}')

@Baltoli Baltoli linked a pull request Mar 13, 2024 that will close this issue
tothtamas28 added a commit to runtimeverification/pyk that referenced this issue Mar 14, 2024
~Blocked on runtimeverification/k#4059~

---------

Co-authored-by: devops <devops@runtimeverification.com>
Baltoli pushed a commit that referenced this issue Apr 9, 2024
~Blocked on #4059~

---------

Co-authored-by: devops <devops@runtimeverification.com>
Baltoli pushed a commit that referenced this issue Apr 9, 2024
~Blocked on #4059~

---------

Co-authored-by: devops <devops@runtimeverification.com>
Baltoli pushed a commit that referenced this issue Apr 9, 2024
~Blocked on #4059~

---------

Co-authored-by: devops <devops@runtimeverification.com>
Baltoli pushed a commit that referenced this issue Apr 10, 2024
~Blocked on #4059~

---------

Co-authored-by: devops <devops@runtimeverification.com>
Baltoli pushed a commit that referenced this issue Apr 10, 2024
~Blocked on #4059~

---------

Co-authored-by: devops <devops@runtimeverification.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant