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

use kotlin-1.9, force java-11 target. #5113

Conversation

soloturn
Copy link
Contributor

@soloturn soloturn commented Jul 10, 2023

kotlin-1.9 knows java-20. setting java-11 as target a little more harsh than currently, source version 11 does weak checks. target 11 is important for the current codebase to work.

kotlin-1.9 knows java-20. setting java-11 as target a little more harsh
than currently.
@soloturn
Copy link
Contributor Author

it looks like current develop branch is broken:

> Task :modules:CoreAdvancedAssets:compileJava NO-SOURCE

> Task :modules:CoreRendering:compileJava FAILED
/src/Terasology/modules/CoreRendering/src/main/java/org/terasology/corerendering/rendering/dag/nodes/OutputToHMDNode.java:16: error: package org.terasology.engine.rendering.openvrprovider does not exist
import org.terasology.engine.rendering.openvrprovider.OpenVRProvider;
                                                     ^
/src/Terasology/modules/CoreRendering/src/main/java/org/terasology/corerendering/rendering/dag/nodes/OutputToHMDNode.java:36: error: cannot find symbol
    private OpenVRProvider vrProvider;
            ^
  symbol:   class OpenVRProvider
  location: class OutputToHMDNode
/src/Terasology/modules/CoreRendering/src/main/java/org/terasology/corerendering/rendering/dag/nodes/OutputToHMDNode.java:50: error: cannot find symbol
        vrProvider = context.get(OpenVRProvider.class);
                                 ^
  symbol:   class OpenVRProvider
  location: class OutputToHMDNode
/src/Terasology/modules/CoreRendering/src/main/java/org/terasology/corerendering/rendering/dag/nodes/OutputToHMDNode.java:51: error: cannot find symbol
        requiresCondition(() -> (context.get(Config.class).getRendering().isVrSupport() && vrProvider.isInitialized()));
                                                                         ^
  symbol:   method isVrSupport()
  location: class RenderingConfig
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors

@skaldarnar
Copy link
Member

@soloturn slight distinction to make. develop on https://github.com/MovingBlocks/Terasology is working fine, but the (your) local workspace (with Iota or Omega modules) does not compile. The error comes from https://github.com/Terasology/CoreRendering, for which we merged a PR yesterday (Terasology/CoreRendering#74) to adjust for #5112.

I believe that pulling latest develop on CoreRendering should resolve this compilation error.

You might need to do the same for ModuleTestingEnvironment (not sure it's in one of the default line-ups, though).

@soloturn
Copy link
Contributor Author

soloturn commented Jul 11, 2023

@skaldarnar this worked, thank you. with newest versions on arch linux, jvm crash is still there, i.e. linux 6.4.2.arch1-1, openjdk 20.0.1.u9-3 with mesa-23.1.3-1, does this work for you on a different platform?

13:09:21.862 [main] ERROR o.t.engine.core.TerasologyEngine - Failed to initialise Terasology
java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
        at java.base/java.lang.System.setSecurityManager(System.java:429)
        at org.terasology.engine.core.module.ModuleManager.setupSandbox(ModuleManager.java:276)
        at org.terasology.engine.core.module.ModuleManager.<init>(ModuleManager.java:92)
        at org.terasology.engine.core.module.ModuleManager.<init>(ModuleManager.java:102)
        at org.terasology.engine.core.TerasologyEngine.initManagers(TerasologyEngine.java:332)
        at org.terasology.engine.core.TerasologyEngine.initialize(TerasologyEngine.java:226)
        at org.terasology.engine.Terasology.call(Terasology.java:182)
        at org.terasology.engine.Terasology.call(Terasology.java:69)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
        at picocli.CommandLine.access$1200(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
        at picocli.CommandLine.execute(CommandLine.java:2058)
        at org.terasology.engine.Terasology.main(Terasology.java:138)
13:09:21.863 [main] INFO  o.t.engine.core.TerasologyEngine - Shutting down Terasology...
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb1454b560c, pid=36247, tid=36269
#
# JRE version: OpenJDK Runtime Environment (20.0.1+9) (build 20.0.1+9)
# Java VM: OpenJDK 64-Bit Server VM (20.0.1+9, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [iris_dri.so+0xb560c]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /run/media/rt/4tb-home/1tb-no-space/src/Terasology/core.36247)
#
# An error report file with more information is saved as:

@skaldarnar
Copy link
Member

Could you try this with the changes from #5107? That PR is supposed to enable the SecurityManager only if supported, and gracefully ignore it otherwise (for instance, when run with newer Java).

@soloturn
Copy link
Contributor Author

soloturn commented Jul 17, 2023

with #5107 merged, with java-11 it is still working, with java-20 it starts up as well, but does not fully work yet, but that does not really matter at the moment. so i'd favor to merge the pull requests #5107, #5109, #5113.

will update the errors coming with java-20 below.

@DarkWeird DarkWeird merged commit f8571e5 into MovingBlocks:build/bumpup-gradle-to-8.2 Jul 20, 2023
@jdrueckert jdrueckert added this to the 2023 Revive - Milestone 1 milestone Jul 20, 2023
@soloturn soloturn deleted the build/bumpup-gradle-to-8.2 branch July 24, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants