Conflicting cross-version suffixes in: org.scalanlp:breeze-macros, org.scalanlp:breeze error

231 views
Skip to first unread message

davide...@googlemail.com

unread,
Jan 7, 2016, 10:04:31 AM1/7/16
to Scala Breeze
Hi David,
I have a problem when compiling a scala project using SBT.

I started to get the following error since I tried to include the nak library in the project:
[error] Modules were resolved with conflicting cross-version suffixes in {file:/C:/git/cvm/}root:
[error]    org.scalanlp:breeze-macros _2.11, _2.10
[error]    org.scalanlp:breeze _2.11, _2.10
java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scalanlp:breeze-macros, org.scalanlp:breeze
        at scala.sys.package$.error(package.scala:27)
        at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:47)
        at sbt.ConflictWarning$.apply(ConflictWarning.scala:30)
        at sbt.Classpaths$$anonfun$60.apply(Defaults.scala:1090)
        at sbt.Classpaths$$anonfun$60.apply(Defaults.scala:1090)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
[error] (*:update) Conflicting cross-version suffixes in: org.scalanlp:breeze-macros, org.scalanlp:breeze
[error] Total time: 154 s, completed 07-Jan-2016 14:33:31


From reading some posts I understand it should be a conflict between libraries versions.
The following is the excerpt of my build.sbt file:

    libraryDependencies ++= Seq(
     "org.scalanlp" %% "breeze" % "0.12-SNAPSHOT",
     "org.scalanlp" % "nak" % "1.2.1", -- since I added this line it stopped working
     "com.github.danielkorzekwa" %% "bayes-scala-gp" % "0.1-SNAPSHOT",
     "org.scalanlp" %% "breeze-viz" % "0.10",
     "com.typesafe.scala-logging" %% "scala-logging-slf4j" % "2.1.2",
     "tw.edu.ntu.csie" % "libsvm" % "3.17",
     "de.bwaldvogel" % "liblinear" % "1.95",
     //Test dependencies
     "org.slf4j" % "slf4j-log4j12" % "1.7.2" % Test,
     "com.novocode" % "junit-interface" % "0.11" % Test
    ),
   
Can you help me in understanding the issue?   
I am new with scala and object oriented/functional programming, so apologies for the trivial question.

Many thanks,
Davide


David Hall

unread,
Jan 7, 2016, 7:32:28 PM1/7/16
to scala-...@googlegroups.com

Nak is only published for Scala 2.10 and doesn't work with current breeze at any rate... (Its maintainer flaked and I don't have the desire to keep it going)

Scala doesn't maintain binary compatibility across 2.x versions, which is what the conflicts are about. The difference between 

  "org.scalanlp" %% "breeze" % "0.12-SNAPSHOT",

and

  "org.scalanlp" % "breeze" % "0.12-SNAPSHOT",

(one has a double %%) is that the former appends _${SCALA_VERSION} to the name of the artifact, while the latter doesn't. For reasons I don't understand, nak is published without the scala version tag.

What part of nak did you want?

-- David


--
You received this message because you are subscribed to the Google Groups "Scala Breeze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-breeze...@googlegroups.com.
To post to this group, send email to scala-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-breeze/520c8ae2-b688-4693-a13d-e64a06bda167%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

davide...@googlemail.com

unread,
Jan 8, 2016, 6:23:16 AM1/8/16
to Scala Breeze
Hi David,
thanks for your reply and for helping me in understanding better.

What I wanted to use from nak was the libraries to calculate k-means clustering.
Do you have anything to recommend to implement k-means calculations in scala or java?

Many thanks for your help,
Davide

David Hall

unread,
Jan 8, 2016, 3:00:22 PM1/8/16
to scala-...@googlegroups.com
ah, probably easiest to just copy the source (https://github.com/scalanlp/nak/blob/46462728f0fa85a884387e33f9beeec57f9cd109/src/main/scala/nak/cluster/Kmeans.scala) into your codebase. 


If that doesn't work, I'll whip something together for you.

-- David

davide...@googlemail.com

unread,
Jan 13, 2016, 1:05:49 PM1/13/16
to Scala Breeze
Hi David,
thanks so much for your help!!

It seems to be working, I still need to do some QA, but so far so good!

Thanks again!

Davide
Reply all
Reply to author
Forward
0 new messages