Machine Environment
SBT: sbt-1.1.1
Scala: scala-2.12.4
IntelliJ: IntelliJ IDEA 2018.2.5 (Community Edition)
Build #IC-182.4892.20, built on October 16, 2018
JRE: 1.8.0_181-8u181-b13-1
OS: ubuntu0.16.04.1-b13 amd64
Linux 4.15.0-38-generic
IntelliJ Project: rocket-chip 1
Error Info
unresolved dependency: edu.berkeley.cs#firrtl_2.12;1.2-SNAPSHOT: not found
[warn] ==== local: tried
[warn] /home/jeremy/.ivy2/local/edu.berkeley.cs/firrtl_2.12/1.2-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.12/1.2-SNAPSHOT/firrtl_2.12-1.2-SNAPSHOT.pom
...
[error] ..... unresolved dependency: edu.berkeley.cs#firrtl_2.12;1.2-SNAPSHOT: not found
Solution
-
Check that whether the firrtl is installed. The publish command
sbt publishLocal
must be executed finally to install firrtl_2.11.jar into the directory ~/.ivy2/local//edu.berkeley.cs/firrtl_2.11/1.1.3/jars/. (The versions may be changed depending on time and system.)
–. Follow the instructions from Chisel3 and firrtl websites.Notes from https://github.com/freechipsproject/chisel3/README.md
If you’re building from a release branch of Chisel3, separate installation of Firrtl is no longer required: the required jar will be automatically downloaded by sbt. If you’re building chisel3 from the master branch, you’ll need to follow the directions on the Firrtl repository to publish a local copy of the required jar. -
Tried some workarounds from websites, but failed. (They may be useful in other situations, just remark here.)
–. How to add Jar libraries to an IntelliJ Idea SBT Scala project?
–. chisel第一个实验
–. Unresolved dependency when making verisim -
What I finally do is as follows.
##
## Close the IntelliJ Project firstly.
jeremy@j-XPS-8700:$ cd ~/intelliJ-workspace/rocket-chip/chisel3
jeremy@j-XPS-8700:~/intelliJ-workspace/rocket-chip/chisel3$ git status
HEAD detached at 3d8064a
nothing to commit, working directory clean
jeremy@j-XPS-8700:~/intelliJ-workspace/rocket-chip/chisel3$ git checkout tags/v3.1.3 -b v3.1.3 #tag v3.1.3 is the lateset version of Chisel3
Previous HEAD position was 3d8064a... Direct to FIRRTL (#829)
Switched to a new branch 'v3.1.3'
jeremy@j-XPS-8700:~/intelliJ-workspace/rocket-chip/chisel3$ git pull
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 25 (delta 9), reused 16 (delta 8), pack-reused 2
Unpacking objects: 100% (25/25), done.
From https://github.com/ucb-bar/chisel3
4dddde5..a3ad8a4 master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> v3.1.3
Now, launch the IntelliJ to re-open the project. (sbt-project will re-sync automatically.)
Done.
One more question is that I don’t know why the configuration by adding dependencies (/libraries) in (IntelliJ) File -> Project Structure -> Modules (or Libraries) does not take effect.
What is the difference between Project and sbt Menu?