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

Build fails with Java 12 #325

Open
pnrao opened this issue Oct 4, 2019 · 2 comments
Open

Build fails with Java 12 #325

pnrao opened this issue Oct 4, 2019 · 2 comments

Comments

@pnrao
Copy link

pnrao commented Oct 4, 2019

The version of SBT used (build.properties refers to sbt.version=0.13.6) seems to be incompatible with a current JDK (v12 on Archlinux, at the time of writing). I get the following error in my build log:

[info] Loading project definition from /mnt/bluewest/src/mozart2/bootcompiler/project [info] Updating {file:/mnt/bluewest/src/mozart2/bootcompiler/project/}bootcompiler-build... WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by sbt.ivyint.ErrorMessageAuthenticator$ (file:/home/prash/.sbt/boot/scala-2.10.4/org.scala-sbt/sbt/0.13.6/ivy-0.13.6.jar) to field java.net.Authenticator.theAuthenticator WARNING: Please consider reporting this to the maintainers of sbt.ivyint.ErrorMessageAuthenticator$ WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. java.lang.NullPointerException at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770) at java.base/java.util.regex.Matcher.reset(Matcher.java:416) at java.base/java.util.regex.Matcher.<init>(Matcher.java:253) at java.base/java.util.regex.Pattern.matcher(Pattern.java:1133) at java.base/java.util.regex.Pattern.split(Pattern.java:1261) at java.base/java.util.regex.Pattern.split(Pattern.java:1334) at sbt.IO$.pathSplit(IO.scala:744) at sbt.IO$.parseClasspath(IO.scala:859) at sbt.compiler.CompilerArguments.extClasspath(CompilerArguments.scala:62) at sbt.compiler.AggressiveCompile.withBootclasspath(AggressiveCompile.scala:50) at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:83) at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:70) at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:45) at sbt.Compiler$.apply(Compiler.scala:74) at sbt.Compiler$.apply(Compiler.scala:65) at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:777) at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:769) at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:769) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) at sbt.std.Transform$$anon$4.work(System.scala:63) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) at sbt.Execute.work(Execute.scala:235) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) at sbt.CompletionService$$anon$2.call(CompletionService.scala:28) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:835) [error] (compile:compile) java.lang.NullPointerException Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? make[2]: *** [bootcompiler/CMakeFiles/bootcompiler.dir/build.make:105: bootcompiler/bootcompiler.jar] Error 1 make[1]: *** [CMakeFiles/Makefile2:529: bootcompiler/CMakeFiles/bootcompiler.dir/all] Error 2

I tried to fudge the sbt.version in build.properties to 1.3.2, but that required scalaVersion=2.12. I then changed scalaVersion to the latest, 2.13.1. Going down that rabbit hole, I discovered that a dependency, sbt-onejar, hasn't been updated in the last 5 years. I lack the requisite expertise in SBT and Scala to go any further than this.

Could an expert please look into this issue?

@sjrd
Copy link
Member

sjrd commented Oct 4, 2019

Have you tried sbt 0.13.18, which is the latest version in the 0.13.x series?

@pnrao
Copy link
Author

pnrao commented Oct 4, 2019

I followed your suggestion, but I triggered this bug https://github.com/sbt/launcher/issues/38 which seems to have been fixed in the sbt-1.x series.

sjrd added a commit to sjrd/mozart2 that referenced this issue Oct 4, 2019
Since sbt-onejar does not have support for sbt 1.x, we switch to
using sbt-assembly instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants