mbeddr / mbeddr.core

The mbeddr core. An extensible C
Eclipse Public License 2.0
224 stars 77 forks source link

Replace -XX:MaxPermSize with -XX:MaxMetaspaceSize in build scripts (2022.3) #2439

Closed alexanderpann closed 1 month ago

alexanderpann commented 1 month ago

The option was removed in the OpenJDK 17 and means that people can't build mbeddr on Linux.

ARaack commented 1 month ago

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details Could not write standard input to Gradle build daemon. java.io.IOException: Stream closed at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:445) at java.base/java.io.OutputStream.write(OutputStream.java:162) at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81) at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142) at org.gradle.process.internal.streams.ExecOutputHandleRunner.forwardContent(ExecOutputHandleRunner.java:68) at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:53) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

FAILURE: Build failed with an exception.

alexanderpann commented 1 month ago

We actually start the build with a JDK 11 on TeamCity: /usr/lib/jvm/11_0_14_1-b1751.46/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/build/temp/buildTmp -Duser.country -Duser.language=en -Duser.variant -cp /root/.gradle/wrapper/dists/gradle-8.0.2-bin/

Then we run the build with the downloaded JBR which is JBR 17. This option is not added in mbeddr itself. Do you maybe have a gradle.properties file (maybe in ~./gradle) that sets this option? As you can see, on the CI is uses the MaxMetaspaceSize option.

ARaack commented 1 month ago

Yes your're right, in my local ~./gradle/gradle.properties was a setting with that option. Will test it again.

ARaack commented 1 month ago

Update, alright all works like expected. Sorry for the inconvenience. Issue can be closed.