I am using Chisel3 in my project. I tried to import hard float library as folow:
import chisel3._
import hardfloat._
but unfortunately, I am getting:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: edu.berkeley.cs#hardfloat_2.11;1.2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
I went through couple of repositories that used hardfloat and found out that I was missing this line in my build.sbt:
libraryDependencies ++= Seq("edu.berkeley.cs" %% "hardfloat" % "1.2")
but unfortunately I am still getting the error. I then tried to compile projects that use hardfloat without any modification (for example soundkit) but I still get the same error. I used both terminal and InteliJ to compile my project and got the same result. For some reason, the hardfloat library is not even shows up in the External Libraries in IntelliJ .
I would really appreciate it if someone let me know what might be the issue.
pedrofurla was right. After talking to folks at RISC-V, I got to know that, as you said, the hardfloat is not published to somewhere that sbt can download it. In order to use the library, one has to build and publish it locally:
git clone https://github.com/ucb-bar/berkeley-hardfloat.git hardfloat
cd hardfloat
sbt publish-local
Note: the library works with chisel2
Related
A rather recent new "feature" in sbt, perhaps 0.13.7 or 0.13.8, is a very annoying behaviour that transitive dependencies are not found any longer.
For example. I have a project A that depends on library B version 1.25.1 that depends on library C version 1.13.1. Only library dependency B is defined in A, naturally, because I don't want to define the whole tree of dozens of sub-libraries. Ok, this builds.
Now I update the dependency in A to become library B version 1.25.2 which in turn depends on library C version 1.13.2. Now sbt complains with the rather useless message "configuration not found in library-C;1.13.2: 'master'. It was required from library-B;1.25.2 compile", followed by an "unresolved dependency" exception. Sbt doesn't even bother to download library C version 1.13.2 from Maven Central or in fact find it already published locally. The only way to "solve" this is to add a depenency on library C version 1.13.2 to project A, which is precisely what I don't want to do.
Here is an example print out:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: de.sciss#scalacolliderugens-core_2.11;1.13.2: configuration not found in de.sciss#scalacolliderugens-core_2.11;1.13.2: 'master'. It was required from de.sciss#scalacolliderswing-core_2.11;1.25.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] de.sciss:scalacolliderugens-core_2.11:1.13.2
[warn] +- de.sciss:scalacolliderugens-plugins_2.11:1.13.2
[warn] +- de.sciss:scalacolliderswing-core_2.11:1.25.2 (/home/hhrutz/Documents/devel/SoundProcesses/build.sbt#L167)
[warn] +- de.sciss:soundprocesses-compiler_2.11:2.20.0-SNAPSHOT
I suppose this is an annoying bug in sbt, or is there some deeper reasoning behind the failure to resolve transitive dependencies that I fail to understand?
The problem even came back a while after I had added library C explicitly. As often, the final solution was this:
$ rm -r ~/.ivy2/cache/
$ rm -r ~/.ivy2/local/
And then download the Internet again.
Has anyone had any success with using SBT to download and manage the Datomic Pro peer library? Datomic's website gives clear instructions for Leiningen and Maven, but not SBT. Translating the Leiningen instructions, I came up with the following additions to my build.sbt file.
resolvers += "my.datomic.com" at "https://my.datomic.com/repo"
credentials += Credentials(realm = "restricted area",
host = "my.datomic.com",
userName = ...,
passwd = ...)
libraryDependencies ++= Seq(
"com.datomic" % "datomic-pro" % "0.9.4752",
...
)
Note that I came up with the weird "restricted area" realm by running curl -X GET https://my.datomic.com/repo/com/datomic/datomic-pro/0.9.4752/datomic-pro-0.9.4752.pom -v and saw WWW-Authenticate: Basic realm="restricted area". That was the one piece of information that was not documented on the Datomic website.
Running the aforementioned build results in the dreaded UNRESOLVED DEPENDENCIES error.
[warn] ==== my.datomic.com: tried
[warn] https://my.datomic.com/repo/com/datomic/datomic-pro/0.9.4752/datomic-pro-0.9.4752.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.datomic#datomic-pro;0.9.4752: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.datomic#datomic-pro;0.9.4752: not found
Note that the URL it's trying to download from is indeed correct. I can download the POM using wget and it works fine (supplying the user name and password, of course).
I should also mention that I'm using SBT 0.13.5-M2 Has anyone gotten this to work? Any help would be greatly appreciated!
Edit:
As per Eugene's suggestion below, I tried running I tried running with --debug to see if I can get any additional info, but couldn't find any smoking gun. Output below:
[0m[[0mdebug[0m] [0m CLIENT ERROR: Not Found url=https://my.datomic.com/repo/com/datomic/datomic-pro/0.9.4752/datomic-pro-0.9.4752.pom[0m
[0m[[0mdebug[0m] [0m my.datomic.com: no ivy file found for com.datomic#datomic-pro;0.9.4752[0m
[0m[[33mwarn[0m] [0m module not found: com.datomic#datomic-pro;0.9.4752[0m
The issue was that my.datomic.com did not support HEAD requests. The Datomic folks have since fixed this.
I am new and had built some simple Scala applications / tutorials using SBT. I move on to Play framework and generated an empty project using g8 typesafehub/play-scala. I did a few tests to make sure it was properly generated. That checked out good and I added sbt-idea plugin, https://github.com/mpeltonen/sbt-idea, to generate an IntelliJ project. This is where the hell broke loose.
I had to find the right Scala, SBT, Play framework and sbt-idea versions combinations to get it compiled perfectly. Otherwise, the compilation would broke with out right errors or warnings that got me guessing. So far, the best "combination" I had was
Scala 2.9.2
Play 2.0.1
SBT 0.11.2
sbt-idea 1.1.0
with the following warning
[warn] [NOT FOUND ] maven-plugins#maven-cobertura-plugin;1.3!maven-cobertura-plugin.plugin (282ms)
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/maven-plugins/maven-cobertura-plugin/1.3/maven-cobertura-plugin-1.3.plugin
[warn] [NOT FOUND ] maven-plugins#maven-findbugs-plugin;1.3.1!maven-findbugs-plugin.plugin (284ms)
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/maven-plugins/maven-findbugs-plugin/1.3.1/maven-findbugs-plugin-1.3.1.plugin
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: maven-plugins#maven-cobertura-plugin;1.3!maven-cobertura-plugin.plugin
[warn] :: maven-plugins#maven-findbugs-plugin;1.3.1!maven-findbugs-plugin.plugin
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
If I use the latest versions, SBT 0.12 and Play 2.0.3 I would get a complilating error. Any idea or explanation how I can get all these works together nicely? It is a version mess to me right now. Thanks
I think that you should start with Play from the original site: http://www.playframework.org/ you'll find there newest stable version for download (currently it's 2.0.3).
It contains proper dependencies and its installation is as easy as unpacking the ZIP and exporting the path as described in: Installing doc.
I can ensure you that this approach is the easiest and most sure way, it works as expected, creates proper IntelliJ projects etc. If I'm not wrong IntelliJ support was fixed after 2.0.1 also other indices had some improvements, so there is no sense to fight with 2.0.1 if it isn't really required.
Today I started with scala and lift and I am currently reading though the docs. I managed to get it started with the help of the cookbook.
However I want to read though some bigger examples, especially this example because it uses mongodb + authentication https://github.com/eltimn/lift-mongo.g8/tree/master/src/main/g8
I didn't use g8 nor cs because I had some errors with cs and I was to lazy to investigate them.
So I just cloned the repo to my hard drive. I think that is what g8 is doing.
So some files are missing, I added them
sbt
sbt.bat (I am using windows)
sbt-launch.jar
But I get the following errors:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-sbt#sbt-closure;0.1.3: not found
[warn] :: com.github.siasia#xsbt-web-plugin_2.9.1;0.11.2
ound
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
I tried to fix the sbt-closure but I could not find it in with the maven search
http://search.maven.org/#search%7Cga%7C1%7Csbt-closure
the plugins.sbt looks like this
resolvers += Resolver.url("sbt-plugin-releases",
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(
Resolver.ivyStylePatterns)
addSbtPlugin("org.scala-sbt" % "sbt-closure" % "0.1.3")
addSbtPlugin("me.lessis" % "less-sbt" % "0.1.10")
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v+"-0.2.11.1"))
Any idea what went wrong?
SBT plugins need to be re-published for each new version of SBT. My guess is that the template you downloaded was based on an older version of SBT (0.11 maybe?) and that the versions of the plugins you are referencing haven't been published for the latest SBT (0.12). You could try to find an older version of SBT to download, but you're probably better off either getting g8/conscript working, or using one of these templates: https://github.com/lift/lift_24_sbt.
somebody know scala-time? (https://github.com/jorgeortiz85/scala-time)
Have no idea how to use it. I can download it (on linux) and run sbt but theres always the same errormessage:
git clone git://github.com/jorgeortiz85/scala-time
cd scala-time
sbt
Getting org.scala-tools.sbt sbt_2.9.1 0.7.4 ...
:: problems summary ::
:::: WARNINGS
module not found: org.scala-tools.sbt#sbt_2.9.1;0.7.4
==== local: tried
/home/ll/.ivy2/local/org.scala-tools.sbt/sbt_2.9.1/0.7.4/ivys/ivy.xml
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.7.4!sbt_2.9.1.jar:
/home/ll/.ivy2/local/org.scala-tools.sbt/sbt_2.9.1/0.7.4/jars/sbt_2.9.1.jar
==== Maven2 Local: tried
file:///home/ll/.m2/repository/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.pom
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.7.4!sbt_2.9.1.jar:
file:///home/ll/.m2/repository/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.jar
==== typesafe-ivy-releases: tried
http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt_2.9.1/0.7.4/ivys/ivy.xml
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.7.4!sbt_2.9.1.jar:
http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt_2.9.1/0.7.4/jars/sbt_2.9.1.jar
==== Maven Central: tried
http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.pom
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.7.4!sbt_2.9.1.jar:
http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.jar
==== Scala-Tools Maven2 Repository: tried
http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.pom
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.7.4!sbt_2.9.1.jar:
http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.jar
==== Scala-Tools Maven2 Snapshots Repository: tried
http://scala-tools.org/repo-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.pom
-- artifact org.scala-tools.sbt#sbt_2.9.1;0.7.4!sbt_2.9.1.jar:
http://scala-tools.org/repo-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.7.4/sbt_2.9.1-0.7.4.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-tools.sbt#sbt_2.9.1;0.7.4: not found
::::::::::::::::::::::::::::::::::::::::::::::
huh? Any other options?
To actually use it (as compared to building scala-time yourself), just add
libraryDependencies += "org.scala-tools.time" % "time_2.9.1" % "0.5"
to the build.sbt of the project you want to use it in.
Addition:
Current versions may want to use
libraryDependencies += "org.scalaj" %% "scalaj-time" % "0.6"
This is an sbt version problem, and you might be able to work around it by using a different sbt-launch or by changing the build a bit. I get a similar error if I use sbt-launch-0.10.1.jar for this code, but it works fine if I use sbt-launch-0.7.7.jar.
I'd suspect you're using sbt-launch-0.11.0, and this is causing sbt to look for a compiled version of sbt that doesn't in fact exist.
Possible fixes are:
Just use sbt-launch-0.7.7 for this code.
Edit the build.properties file to use a different version of sbt.
Get source for sbt-0.7.4, compile with scala 2.9.1 and stash the result in your local ivy repository with the name and location that's being searched.
Options 1 and 2 worked for me.
I haven't done #3 for this, but have done similar things for other code. It can be a bit painful...
You can have multiple versions of sbt-launch and flip between them depending on the needs of a particular codebase.
Perhaps someone who knows sbt better than I will post a real solution, but I'm hoping this is at least a little helpful.
Update or remove the sbt version(0.7.4) line from build.properties
That means there's no public version of SBT 0.7.4 compiled against Scala 2.9.1 by the looks of it.