lsc-project / lsc

LSC engine
http://lsc-project.org/wiki/documentation/latest/start
Other
108 stars 41 forks source link

adapt deb/rpm packagement for using correctly graalvm with java >=11 #287

Open davidcoutadeur opened 4 months ago

davidcoutadeur commented 4 months ago

Currently, when building on debian, there are a few things missing in the package linked to GraalVM, leading to these errors while launching LSC with java >=11:

[To redirect Truffle log output to a file use one of the following options:
* '--log.file=<path>' if the option is passed using a guest language launcher.
* '-Dpolyglot.log.file=<path>' if the option is passed using the host Java launcher.
* Configure logging using the polyglot embedding API.]
[engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
The guest application code will therefore be executed in interpreted mode only.
Execution only in interpreted mode will strongly impact the guest application performance.
For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.

The solution has already been found and deployed in the maven tests, it must now be adapted for the packages.

To sum up:

JAVA_OPTS="${JAVA_OPTS} -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --module-path=/usr/lib/lsc-compiler/ --upgrade-module-path=/usr/lib/lsc-compiler/compiler.jar:/usr/lib/lsc-compiler/compiler-management.jar"