Disabling musl as it isn't capable to load dynamic library (#3917)

Disabling `musl` as it isn't capable to load dynamic library.

# Important Notes
With this change it is possible to:
```
$ sbt  bootstrap
$ sbt  engine-runner/buildNativeImage
$ ./runner --run ./engine/runner/src/test/resources/Factorial.enso 3
6
$ ./runner --run ./engine/runner/src/test/resources/Factorial.enso 4
24
$ ./runner --run ./engine/runner/src/test/resources/Factorial.enso 100
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
```

Is it OK, @radeusgd  to disable `musl`? If not, we would have to find a way to link the parser in statically, not dynamically.
This commit is contained in:
Jaroslav Tulach 2022-12-01 07:43:13 +01:00 committed by GitHub
parent 6e1666e8b1
commit 030dbe4973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1636,7 +1636,7 @@ lazy val `engine-runner` = project
rebuildNativeImage := NativeImage
.buildNativeImage(
"runner",
staticOnLinux = true,
staticOnLinux = false,
additionalOptions = Seq(
"-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog",
"-H:IncludeResources=.*Main.enso$",
@ -1652,7 +1652,8 @@ lazy val `engine-runner` = project
initializeAtRuntime = Seq(
// Note [WSLoggerManager Shutdown Hook]
"org.enso.loggingservice.WSLoggerManager$",
"io.methvin.watchservice.jna.CarbonAPI"
"io.methvin.watchservice.jna.CarbonAPI",
"org.enso.syntax2.Parser"
)
)
.dependsOn(installNativeImage)

View File

@ -13,6 +13,7 @@ public final class EnsoCompiler implements AutoCloseable {
try {
p = Parser.create();
} catch (LinkageError err) {
err.printStackTrace();
p = null;
}
this.parser = p;