SpinalHDL / SpinalTemplateSbt

A basic SpinalHDL project
77 stars 64 forks source link

sbt run fail "error: not found: value EclipseKeys" #4

Closed aurabindo closed 5 years ago

aurabindo commented 5 years ago

I am running on Fedora 29, and Java 1.8 is the default. Full message:

[aj@fedaura SpinalTemplateSbt]$ sbt "run-main mylib.MyTopLevelVerilog"
[info] Loading project definition from /home/aj/learning/spinal_hdl/SpinalTemplateSbt/project
/home/aj/learning/spinal_hdl/SpinalTemplateSbt/build.sbt:7: error: not found: value EclipseKeys
EclipseKeys.withSource := true
^
[error] Type error in expression
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-main
[error] run-main mylib.MyTopLevelVerilog
[error]         ^

What could be the reason for this failure ?

Dolu1990 commented 5 years ago

Hmm that's weird, i just try on my setup, it work fine. As a work around, you can comment out this line : https://github.com/SpinalHDL/SpinalTemplateSbt/blob/master/build.sbt#L7

Should be fine then. Let's me know if the issue is persistant :)

aurabindo commented 5 years ago

Thanks for the quick response. Quite weird indeed. Without that line, I get an error:

/home/aj/learning/spinal_hdl/SpinalTemplateSbt/build.sbt:13: error: eof expected but ';' found.
scalacOptions += "-P:continuations:enable"
^
[error] Error parsing expression.  Ensure that settings are separated by blank lines.

I added a newline after the offending line 13, and it gets past that error, and now I have a new error:

[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.3!scala-parser-combinators_2.11.jar(bundle) (3178ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.12.1/jline-2.12.1.jar ...
[info]  [SUCCESSFUL ] jline#jline;2.12.1!jline.jar (2670ms)
[info] Done updating.
[info] Compiling 2 Scala sources to /home/aj/learning/spinal_hdl/SpinalTemplateSbt/target/scala-2.11/classes...
sbt.InvalidComponent: Could not find required component 'compiler-interface-src'
    at sbt.ComponentManager.invalid(ComponentManager.scala:57)
    at sbt.ComponentManager.sbt$ComponentManager$$notFound$1(ComponentManager.scala:34)
----
SNIP
----

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
[error] (compile:compile) sbt.InvalidComponent: Could not find required component 'compiler-interface-src'
[error] Total time: 132 s, completed Dec 15, 2018 10:12:12 PM
Dolu1990 commented 5 years ago

hmmm, so you have java8, but what's about javac (JDK) ? Hoo also, i remember that some people had specific issue between SBT and fedora, maybe it is related.

Let's me know about your javac :)

Dolu1990 commented 5 years ago

hmm yes that's probably related to fedora <> sbt https://stackoverflow.com/questions/44330821/sbt-sbt-invalidcomponent-could-not-find-required-component-compiler-interfac

Which version of SBT is on your machine ? You will maybe need to manualy update it to this one : https://github.com/SpinalHDL/SpinalTemplateSbt/blob/master/project/build.properties#L1

aurabindo commented 5 years ago

Fedora's sbt was the cultprit! Installed the official version and all problems are gone! Thank you very much @Dolu1990