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

The sl shell script doesn't work when installed using gu #103

Open
mthmulders opened this issue Jun 14, 2020 · 1 comment
Open

The sl shell script doesn't work when installed using gu #103

mthmulders opened this issue Jun 14, 2020 · 1 comment

Comments

@mthmulders
Copy link

Steps to reproduce
Inside a fresh checkout of the project:

  1. Build the GraalVM component with mvn package --am --pl ./component.
  2. Install the component in a GraalVM installation with gu install -L component/sl-component.jar.
  3. Run sl language/tests/HelloWorld.sl

Expected situation
Output is something like "Hello World!"

Actual behaviour
Output is

Could not find language on /usr/bin/language/target/simplelanguage.jar. Did you run mvn package?

Analysis
I believe this is due to the fact that the sl script in the project root fails to detect it is invoked from an installed GraalVM component and so it follows the path for "local" invocations, i.e. from the project checkout.

The sl binary from the component is symlinked into /usr/bin, so extracting the GraalVM version by inspecting "$SCRIPT_HOME/../release" fails.

@mthmulders
Copy link
Author

I think it can be fixed by following the symlink (/usr/bin/sl) using readlink -f, and updating the relative paths to the language jar and the launcher jar accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant