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

Can't compile on Fedora 22 #1

Open
matachi opened this issue Dec 1, 2015 · 2 comments
Open

Can't compile on Fedora 22 #1

matachi opened this issue Dec 1, 2015 · 2 comments

Comments

@matachi
Copy link

matachi commented Dec 1, 2015

Hi,

I'm trying to compile the project on Fedora 22, but I'm getting an error:

$ sbt mkrun
[info] Loading project definition from /home/matachi/dev/kconfigreader/project
[info] Set current project to kconfigreader (in build file:/home/matachi/dev/kconfigreader/)
[info] Compiling 8 Scala sources to /home/matachi/dev/kconfigreader/target/scala-2.11/classes...
[error] 
[error]      while compiling: /home/matachi/dev/kconfigreader/src/main/scala/KConfigModel.scala
[error]         during phase: typer
[error]      library version: version 2.10.4
[error]     compiler version: version 2.10.4
[error]   reconstructed args: -Ydead-code -classpath /home/matachi/dev/kconfigreader/target/scala-2.11/classes:/home/matachi/.ivy2/cache/de.fosd.typechef/featureexprlib_2.11/jars/featureexprlib_2.11-0.3.7.jar:/home/matachi/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar:/home/matachi/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.5.jar:/home/matachi/.ivy2/cache/org.ow2.sat4j/org.ow2.sat4j.core/jars/org.ow2.sat4j.core-2.3.5.jar:/home/matachi/.ivy2/cache/de.fosd.typechef/javabdd_repackaged/jars/javabdd_repackaged-1.0b2.jar -optimise -deprecation -feature -Yinline -Yclosure-elim -Yinline-handlers -unchecked -bootclasspath /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.fc22.x86_64/jre/classes:/home/matachi/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.7.jar
[error] 
[error]   last tree to typer: TypeTree(class KConfigModel)
[error]               symbol: class KConfigModel in package kconfig (flags: )
[error]    symbol definition: class KConfigModel extends AnyRef
[error]                  tpe: de.fosd.typechef.kconfig.KConfigModel
[error]        symbol owners: class KConfigModel -> package kconfig
[error]       context owners: constructor KConfigModel -> class KConfigModel -> package kconfig
[error] 
[error] == Enclosing template or block ==
[error] 
[error] DefDef( // def <init>(): de.fosd.typechef.kconfig.KConfigModel in class KConfigModel
[error]   <method>
[error]   "<init>"
[error]   []
[error]   List(Nil)
[error]   <tpt> // tree.tpe=de.fosd.typechef.kconfig.KConfigModel
[error]   Block(
[error]     Apply(
[error]       super."<init>"
[error]       Nil
[error]     )
[error]     ()
[error]   )
[error] )
[error] 
[error] == Expanded type of tree ==
[error] 
[error] TypeRef(TypeSymbol(class KConfigModel extends AnyRef))
[error] 
[error] uncaught exception during compilation: scala.reflect.internal.MissingRequirementError
scala.reflect.internal.MissingRequirementError: class scala.annotation.serializable in compiler mirror not found.
  at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
  at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
  at scala.reflect.internal.Mirrors$RootsBase$$anonfun$getModuleOrClass$3.apply(Mirrors.scala:49)
  at scala.reflect.internal.Mirrors$RootsBase$$anonfun$getModuleOrClass$3.apply(Mirrors.scala:49)
  at scala.reflect.internal.Symbols$Symbol.orElse(Symbols.scala:2229)
  at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:48)
  at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:61)
  at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:99)
  at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:102)
  at scala.reflect.internal.Mirrors$RootsBase.requiredClass(Mirrors.scala:105)
  at scala.reflect.internal.Definitions$DefinitionsClass.SerializableAttr$lzycompute(Definitions.scala:962)
  at scala.reflect.internal.Definitions$DefinitionsClass.SerializableAttr(Definitions.scala:962)
  at scala.reflect.internal.Symbols$Symbol.isSerializable(Symbols.scala:720)
  at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1797)
  at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5584)
  at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)
  at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2928)
  at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)
  at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$61.apply(Typers.scala:3032)
  at scala.collection.immutable.List.loop$1(List.scala:170)
  at scala.collection.immutable.List.mapConserve(List.scala:186)
  at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3032)
  at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5301)
  at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5587)
  at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5642)
  at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5704)
  at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:99)
  at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464)
  at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
  at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
  at scala.collection.Iterator$class.foreach(Iterator.scala:727)
  at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
  at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:91)
  at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
  at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
  at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
  at scala.tools.nsc.Global$Run.compile(Global.scala:1662)
  at xsbt.CachedCompiler0.run(CompilerInterface.scala:123)
  at xsbt.CachedCompiler0.run(CompilerInterface.scala:99)
  at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
  at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
  at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
  at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:98)
  at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:98)
  at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:98)
  at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:159)
  at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:97)
  at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:142)
  at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:86)
  at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:38)
  at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:36)
  at sbt.inc.Incremental$.cycle(Incremental.scala:73)
  at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:33)
  at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:32)
  at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:41)
  at sbt.inc.Incremental$.compile(Incremental.scala:32)
  at sbt.inc.IncrementalCompile$.apply(Compile.scala:26)
  at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:150)
  at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:70)
  at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:45)
  at sbt.Compiler$.apply(Compiler.scala:70)
  at sbt.Defaults$.sbt$Defaults$$compileTaskImpl(Defaults.scala:736)
  at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:730)
  at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:730)
  at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
  at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
  at sbt.std.Transform$$anon$4.work(System.scala:64)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
  at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
  at sbt.Execute.work(Execute.scala:244)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
  at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
  at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
[error] (compile:compile) scala.reflect.internal.MissingRequirementError: class scala.annotation.serializable in compiler mirror not found.
[error] Total time: 14 s, completed Dec 1, 2015 5:31:51 PM

My versions of sbt and Java:

$ sbt sbtVersion
[info] Loading project definition from /home/matachi/dev/kconfigreader/project
[info] Set current project to kconfigreader (in build file:/home/matachi/dev/kconfigreader/)
[info] 0.13.6
$ java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)

And the versions of the Scala and sbt packages:

$ dnf list installed | grep -E "^(scala|sbt)"
sbt.noarch                               0.13.1-7.fc22                  @updates
scala.noarch                             2.10.4-6.fc22                  @updates

I'm not familiar with Scala, so I'm not sure if there's something obvious that I might be missing.

Thanks,
Daniel

@matachi
Copy link
Author

matachi commented Dec 5, 2015

So the version of Scala is a little behind on Fedora https://bugzilla.redhat.com/show_bug.cgi?id=1080923#c13

I undid the installation of Scala and sbt (sudo dnf history undo last) and instead installed the Scala 2.11.7 rpm from http://www.scala-lang.org/download/2.11.7.html#Other_resources and the sbt rpm repository from http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html#Red+Hat+Enterprise+Linux+and+other+RPM-based+distributions.

That apparently solved it, and I'm now able to successfully build the run.sh file. As fair as I understand, Scala >=2.10.4 supposedly supports JDK 8 though, so I don't know why it failed previously.

@justgage
Copy link

Thanks for your instructions this helped me with my Fedora 22 installation as well (although not with compiling this project).

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