Skip to content
Discussions/App Development/Is there a relationship between canton release and canton from githubForum ↗

Is there a relationship between canton release and canton from github

App Development3 posts271 views2 likesLast activity Aug 2022
KA
kayvankOP
Aug 2022

Hi,
I am completing the canton tutorial and would like to know the relation ship between

When I tried to build the main branch I got build failure:

$ java --version && sbt compile
openjdk 11.0.12 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+0-adhoc..source)
OpenJDK 64-Bit Server VM (build 11.0.12+0-adhoc..source, mixed mode)
[info] welcome to sbt 1.6.2 (N/A Java 17.0.1)
[info] loading settings for project canton-build-build from plugins.sbt ...
[info] loading project definition from /home/kayvan/dev/workspaces/workspace-proto/daml/canton/project/project
[info] loading settings for project canton-build from buildinfo.sbt,license.sbt,plugins.sbt ...
[info] loading project definition from /home/kayvan/dev/workspaces/workspace-proto/daml/canton/project
[info] loading settings for project root from community-build.sbt,version.sbt ...
[info] resolving key references (15555 settings) ...
[info] set current project to canton (in build file:/home/kayvan/dev/workspaces/workspace-proto/daml/canton/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] compiling 728 Scala sources to /home/kayvan/dev/workspaces/workspace-proto/daml/canton/community/common/target/scala-2.13/classes ...
[error] /home/kayvan/dev/workspaces/workspace-proto/daml/canton/community/common/src/main/scala/slick/util/AsyncExecutorWithMetrics.scala:328:21: method getSecurityManager in class System is deprecated
[error]       Option(System.getSecurityManager).fold(Thread.currentThread.getThreadGroup)(_.getThreadGroup)
[error]                     ^
[error] one error found
[error] (community-common / Compile / compileIncremental) Compilation failed
[error] Total time: 38 s, completed Aug 5, 2022, 12:57:35 PM

Maybe I am using the wrong JDK?
Here is the commit sha commit 9e5ec309ad5fe229e53ab668b6b180db67b555bc

I started using the the release link and had no outstanding issues. However, i would like to know if the release link is the build result from the github project and if so, investigate why my local build fails

CO
cocreature
Aug 2022

The open source repo is a dump of the main branch so it doesn’t match any release exactly.

That’s not the reason for your warning though. If you look at the line where you start SBT, you can see that it’s running Java 17 not 11. getSecurityManager was deprecated in Java 17. Take a look at how you can change the JVM version in SBT.

KA
kayvank
Aug 2022

Thank you @cocreature ,

sbt -java-home $JAVA_HOME 

where $JAVA_HOME points to jdk11, solved the issue per the link you provided.
I totally missed the nix sbt package includes and uses jdk17.

← Back to Discussions