I'm not quite sure where I was with the rocket-chip repo before the rebase, but it was prior to the changeover to using Scala 2.12.4 (previously I was at 2.11.12).
I've rebased, sorted out conflicts in a couple of Chisel files and ran a git submodule update
in rocket-chip before attempting to rebuild.
I now face a dependency issue which I think is related to hardfloat?
My work is rebased on 25b5a25 (upstream/master) 2018-08-25 (2 days ago) Wesley W. Terpstra Merge pull request #1603 from freechipsproject/fix-regressions
My compile bails out with this:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: edu.berkeley.cs#chisel3_2.12;3.2-SNAPSHOT: not found
[warn] :: edu.berkeley.cs#hardfloat_2.12;1.2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] edu.berkeley.cs:chisel3_2.12:3.2-SNAPSHOT
[warn] +- edu.berkeley.cs:rocketchip_2.12:1.2
[warn] edu.berkeley.cs:hardfloat_2.12:1.2
[warn] +- edu.berkeley.cs:rocketchip_2.12:1.2
[error] sbt.librarymanagement.ResolveException: unresolved dependency: edu.berkeley.cs#chisel3_2.12;3.2-SNAPSHOT: not found
[error] unresolved dependency: edu.berkeley.cs#hardfloat_2.12;1.2: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:331)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:243)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:242)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:46)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:99)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:112)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:112)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:95)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:126)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2383)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:271)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (ProjectRef(uri("file:/work/dig/rocket-chip/"), "rocketchip") / update) sbt.librarymanagement.ResolveException: unresolved dependency: edu.berkeley.cs#chisel3_2.12;3.2-SNAPSHOT: not found
[error] unresolved dependency: edu.berkeley.cs#hardfloat_2.12;1.2: not found
I've tried moving hardfloat's head to Jack Koenig's commit 7903547 which added some crossScalaVersions setting to support 2.12.14 and that didn't help things.
This is a known unfortunate side effect of the bump to 2.12. As far as I can tell, it is due to somewhat spotty support for multi-project builds in SBT, but in any case, it is possible to work around.
If you take a look at the PR where I bumped rocket-chip to 2.12 (https://github.com/freechipsproject/rocket-chip/pull/1431), you can see that I had to add ++2.12.4
to each SBT invocation on the command line. What this is doing is telling SBT to force the Scala version for all projects (including sub projects). I have so far been unable to figure out how to do this just in the build.sbt
file (if anyone reading this knows a better solution, please let us know!).
If you use the SBT interactive shell, you need to type ++2.12.4
as the first command, eg.
jack@myhost:/home/jack/rocket-chip$ java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar sbt-launch.jar
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /home/jack/rocket-chip/project
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
[info] Loading settings from build.sbt ...
Using addons:
[info] Set current project to rocketchip (in build file:/home/jack/rocket-chip)
[info] sbt server started at local:///home/jack/.sbt/1.0/server/7022d9528c895b61c51d/sock
sbt:rocketchip> ++2.12.4
[info] Setting Scala version to 2.12.4 on 6 projects.
[info] Reapplying settings...
Using addons:
[info] Set current project to rocketchip (in build file:/home/jack/rocket-chip)
sbt:rocketchip> compile
[success] Total time: 3 s, completed Aug 27, 2018 9:04:07 PM
sbt:rocketchip>