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

error of make rocket #9

Open
nicolast0604 opened this issue Feb 11, 2022 · 8 comments
Open

error of make rocket #9

nicolast0604 opened this issue Feb 11, 2022 · 8 comments

Comments

@nicolast0604
Copy link

at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:96)
at sbt.MainLoop$.run(MainLoop.scala:89)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:68)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:63)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:63)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:46)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:30)
at sbt.MainLoop$.runLogged(MainLoop.scala:22)
at sbt.StandardMain$.runManaged(Main.scala:109)
at sbt.xMain.run(Main.scala:38)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)

Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Expected ID character
[error] Not a valid command: run (similar: plugin, new)
[error] run /home/nicolast0604/rc-fpga-zcu/common/build zynq Top zynq MyFPGAConfig
[error] ^
../common/Makefrag.zcu:91: recipe for target '/home/nicolast0604/rc-fpga-zcu/common/build/Top.MyFPGAConfig.fir' failed
make: *** [/home/nicolast0604/rc-fpga-zcu/common/build/Top.MyFPGAConfig.fir] Error 1

@li3tuo4
Copy link
Owner

li3tuo4 commented Mar 21, 2022

Hi, it's hard to see what is wrong? Do you have other error traces?

@rajatsrao
Copy link

I have exactly the same problem -

rajatrao@rajatrao:~/RISCV/rc-fpga-zcu/zcu102$ make project
mkdir -p /home/rajatrao/RISCV/rc-fpga-zcu/common/build
cd /home/rajatrao/RISCV/rc-fpga-zcu/common && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /home/rajatrao/RISCV/rc-fpga-zcu/rocket-chip/sbt-launch.jar "run /home/rajatrao/RISCV/rc-fpga-zcu/common/build zynq Top zynq ZynqConfig"
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[warn] Executing in batch mode.
[warn]   For better performance, hit [ENTER] to switch to interactive mode, or
[warn]   consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading project definition from /home/rajatrao/RISCV/rc-fpga-zcu/common/project
[info] Compiling 1 Scala source to /home/rajatrao/RISCV/rc-fpga-zcu/common/project/target/scala-2.10/sbt-0.13/classes...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by sbt.ivyint.ErrorMessageAuthenticator$ (file:/home/rajatrao/.sbt/boot/scala-2.10.6/org.scala-sbt/sbt/0.13.15/ivy-0.13.15.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] 'compiler-interface' not yet compiled for Scala 2.10.6. Compiling...
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /home/rajatrao/.sbt/boot/scala-2.10.6/lib/scala-library.jar(scala/package.class)
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /home/rajatrao/.sbt/boot/scala-2.10.6/lib/scala-library.jar(scala/runtime/package.class)
error: scala.reflect.internal.MissingRequirementError: object java.lang.Object 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.getModuleOrClass(Mirrors.scala:48)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
	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.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:264)
	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:264)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnyRefClass$lzycompute(Definitions.scala:263)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnyRefClass(Definitions.scala:263)
	at scala.reflect.internal.Definitions$DefinitionsClass.specialPolyClass(Definitions.scala:1120)
	at scala.reflect.internal.Definitions$DefinitionsClass.RepeatedParamClass$lzycompute(Definitions.scala:407)
	at scala.reflect.internal.Definitions$DefinitionsClass.RepeatedParamClass(Definitions.scala:407)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1154)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1152)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1261)
	at scala.tools.nsc.Global$Run.<init>(Global.scala:1290)
	at scala.tools.nsc.Driver.doCompile(Driver.scala:32)
	at scala.tools.nsc.Main$.doCompile(Main.scala:79)
	at scala.tools.nsc.Driver.process(Driver.scala:54)
	at scala.tools.nsc.Main.process(Main.scala)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at sbt.compiler.RawCompiler.apply(RawCompiler.scala:33)
	at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:159)
	at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:155)
	at sbt.IO$.withTemporaryDirectory(IO.scala:358)
	at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:155)
	at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:152)
	at sbt.IO$.withTemporaryDirectory(IO.scala:358)
	at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:152)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$1.apply(ComponentCompiler.scala:121)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1$$anonfun$apply$2$$anonfun$apply$mcV$sp$1.apply(ComponentCompiler.scala:118)
	at sbt.IO$.withTemporaryDirectory(IO.scala:358)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1$$anonfun$apply$2.apply$mcV$sp(ComponentCompiler.scala:118)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1$$anonfun$apply$2.apply(ComponentCompiler.scala:118)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1$$anonfun$apply$2.apply(ComponentCompiler.scala:118)
	at sbt.BufferedLogger.bufferQuietly(BufferedLogger.scala:31)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1.apply(ComponentCompiler.scala:116)
	at sbt.compiler.IvyComponentCompiler$$anonfun$sbt$compiler$IvyComponentCompiler$$compileAndInstall$1.apply(ComponentCompiler.scala:111)
	at sbt.IO$.withTemporaryDirectory(IO.scala:358)
	at sbt.compiler.IvyComponentCompiler.sbt$compiler$IvyComponentCompiler$$compileAndInstall(ComponentCompiler.scala:111)
	at sbt.compiler.IvyComponentCompiler$$anonfun$apply$1.apply$mcV$sp(ComponentCompiler.scala:102)
	at sbt.IfMissing$Define.apply(ComponentManager.scala:75)
	at sbt.ComponentManager.sbt$ComponentManager$$createAndCache$1(ComponentManager.scala:39)
	at sbt.ComponentManager$$anonfun$sbt$ComponentManager$$fromGlobal$1$1.apply(ComponentManager.scala:27)
	at sbt.ComponentManager$$anonfun$sbt$ComponentManager$$fromGlobal$1$1.apply(ComponentManager.scala:26)
	at sbt.ComponentManager$$anon$1.call(ComponentManager.scala:50)
	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
	at xsbt.boot.Using$.withResource(Using.scala:10)
	at xsbt.boot.Using$.apply(Using.scala:9)
	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
	at xsbt.boot.Locks$.apply0(Locks.scala:31)
	at xsbt.boot.Locks$.apply(Locks.scala:28)
	at sbt.ComponentManager.lock(ComponentManager.scala:50)
	at sbt.ComponentManager.lockGlobalCache(ComponentManager.scala:49)
	at sbt.ComponentManager.sbt$ComponentManager$$fromGlobal$1(ComponentManager.scala:25)
	at sbt.ComponentManager$$anonfun$files$1$$anonfun$apply$2.apply(ComponentManager.scala:44)
	at sbt.ComponentManager$$anonfun$files$1$$anonfun$apply$2.apply(ComponentManager.scala:44)
	at sbt.ComponentManager.sbt$ComponentManager$$getOrElse$1(ComponentManager.scala:32)
	at sbt.ComponentManager$$anonfun$files$1.apply(ComponentManager.scala:44)
	at sbt.ComponentManager$$anonfun$files$1.apply(ComponentManager.scala:44)
	at sbt.ComponentManager$$anon$1.call(ComponentManager.scala:50)
	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
	at xsbt.boot.Using$.withResource(Using.scala:10)
	at xsbt.boot.Using$.apply(Using.scala:9)
	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
	at xsbt.boot.Locks$.apply0(Locks.scala:31)
	at xsbt.boot.Locks$.apply(Locks.scala:28)
	at sbt.ComponentManager.lock(ComponentManager.scala:50)
	at sbt.ComponentManager.lockLocalCache(ComponentManager.scala:47)
	at sbt.ComponentManager.files(ComponentManager.scala:44)
	at sbt.ComponentManager.file(ComponentManager.scala:53)
	at sbt.compiler.IvyComponentCompiler.apply(ComponentCompiler.scala:102)
	at sbt.compiler.ComponentCompiler$$anon$2.apply(ComponentCompiler.scala:35)
	at sbt.compiler.AnalyzingCompiler.loader(AnalyzingCompiler.scala:118)
	at sbt.compiler.AnalyzingCompiler.getInterfaceClass(AnalyzingCompiler.scala:128)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:104)
	at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:62)
	at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:57)
	at sbt.compiler.CompilerCache$$anon$2.apply(CompilerCache.scala:47)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:45)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
	at sbt.inc.Incremental$.compile(Incremental.scala:71)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:886)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:877)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:875)
	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:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	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:829)

[info] Resolving org.scala-sbt#interface;0.13.15 ...
[error] (compile:compileIncremental) Error compiling sbt component 'compiler-interface'
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
make: *** [../common/Makefrag.zcu:92: /home/rajatrao/RISCV/rc-fpga-zcu/common/build/Top.ZynqConfig.fir] Error 1

@rajatsrao
Copy link

rajatsrao commented Sep 3, 2022

It looks like there's a problem with 'compiler-interface'
Also, I'm not sure why it's building Scala 2.10.6 instead of 2.11.12

@li3tuo4
Copy link
Owner

li3tuo4 commented Sep 3, 2022

Yeah, it's strange to see 2.10.6 here. Can you make correctly in rocket-chip/emulator?

@rajatsrao
Copy link

rajatsrao commented Sep 3, 2022

Yeah, that works fine in both the emulator and vsim.
Running java -jar sbt-launch.jar from rocket-chip/ works correctly, but running java -jar ../rocket-chip/sbt-launch.jar from common/ fails. It looks build.sbt is playing a role here, but I'm greatly inexperienced with scala and sbt to understand what. From reading online, sbt picks the scala version it was built for so probably 0.13.15 was built for 2.10.6 and we need to override that with 2.11.12. But somehow that doesn't happen from the common directory. @li3tuo4 , do you have any ideas?

@rajatsrao
Copy link

rajatsrao commented Sep 3, 2022

I copied rocket-chip/build.sbt under common/ and rocket-chip/project/plugins.sbt under common/project and changed the sbtversion in common/project/build.properties to 1.1.1 to match the file rocket-chip/project/build.properties.
With all these changes, I was able to get sbt to compile the scala source files under common/src/main/scala. But then it failed in the next step -

[info] Running rocketchip.Generator /home/rajatrao/RISCV/rc-fpga-zcu/common/build zynq Top zynq ZynqConfig
[error] (run-main-0) java.lang.ClassNotFoundException: rocketchip.Generator
[error] java.lang.ClassNotFoundException: rocketchip.Generator

@rajatsrao
Copy link

Adding the common/src dir in common/built.sbt and changing the run command for .fir target in Makefrag.zcu to runMain freechips.rocketchip.system.Generator got things working! I've been able to start bitstream generation in Vivado. Let's see how this goes.

@li3tuo4
Copy link
Owner

li3tuo4 commented Sep 4, 2022

It looks like a Scala/chisel3 version compatibility issue in common which is the top of FPGA project. From my experience, if the generation process runs without error, the resultant file should be good. Hope your fix works for you.

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

3 participants