d40cht / sbt-cpp

Sbt plugin to allow native compilation of C and C++
Boost Software License 1.0
71 stars 15 forks source link

Can't even use the examples #27

Open NobbZ opened 11 years ago

NobbZ commented 11 years ago

When I try to run the examples, I get a message that sbt-cpp isn't available…

How to install it properly?

I was in sbt-cpp-dir and ran sbt dist-local which gave me the following:

$ sbt publish-local
Loading /usr/share/sbt/bin/sbt-launch-lib.bash
[info] Loading project definition from /home/nmelzer/projects/C++/sbt-cpp/project
[info] Set current project to sbt-cpp (in build file:/home/nmelzer/projects/C++/sbt-cpp/)
[info] :: delivering :: org.seacourt.build#sbt-cpp;0.0.34 :: 0.0.34 :: release :: Thu Sep 12 21:55:44 CEST 2013
[info]  delivering ivy file to /home/nmelzer/projects/C++/sbt-cpp/target/scala-2.9.2/sbt-0.12/ivy-0.0.34.xml
[info]  published sbt-cpp to /home/nmelzer/.ivy2/local/org.seacourt.build/sbt-cpp/scala_2.9.2/sbt_0.12/0.0.34/jars/sbt-cpp.jar
[info]  published sbt-cpp to /home/nmelzer/.ivy2/local/org.seacourt.build/sbt-cpp/scala_2.9.2/sbt_0.12/0.0.34/srcs/sbt-cpp-sources.jar
[info]  published sbt-cpp to /home/nmelzer/.ivy2/local/org.seacourt.build/sbt-cpp/scala_2.9.2/sbt_0.12/0.0.34/docs/sbt-cpp-javadoc.jar
[info]  published ivy to /home/nmelzer/.ivy2/local/org.seacourt.build/sbt-cpp/scala_2.9.2/sbt_0.12/0.0.34/ivys/ivy.xml
[success] Total time: 1 s, completed 12.09.2013 21:55:44

Even starting a simple sbt-shell in the samples/helloworld-folder gives the following:

$ sbt
Loading /usr/share/sbt/bin/sbt-launch-lib.bash
[info] Loading project definition from /home/nmelzer/projects/C++/sbt-cpp/samples/helloworld/project
[info] Updating {file:/home/nmelzer/projects/C++/sbt-cpp/samples/helloworld/project/}helloworld-build...
[info] Resolving org.seacourt.build#sbt-cpp;0.0.27 ...
[warn]  module not found: org.seacourt.build#sbt-cpp;0.0.27
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.seacourt.build/sbt-cpp/scala_2.10/sbt_0.13/0.0.27/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.seacourt.build/sbt-cpp/scala_2.10/sbt_0.13/0.0.27/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /home/nmelzer/.ivy2/local/org.seacourt.build/sbt-cpp/scala_2.10/sbt_0.13/0.0.27/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/seacourt/build/sbt-cpp_2.10_0.13/0.0.27/sbt-cpp-0.0.27.pom
[warn] ==== SBT cpp repo: tried
[warn]   /home/nmelzer/projects/C++/sbt-cpp/releases/org/seacourt/build/sbt-cpp_2.10_0.13/0.0.27/ivy-0.0.27.xml
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.seacourt.build#sbt-cpp;0.0.27: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      org.seacourt.build:sbt-cpp:0.0.27 (sbtVersion=0.13, scalaVersion=2.10)
[warn] 
sbt.ResolveException: unresolved dependency: org.seacourt.build#sbt-cpp;0.0.27: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
    at sbt.IvySbt.withIvy(Ivy.scala:101)
    at sbt.IvySbt.withIvy(Ivy.scala:97)
    at sbt.IvySbt$Module.withModule(Ivy.scala:116)
    at sbt.IvyActions$.update(IvyActions.scala:121)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1144)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1142)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1165)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1163)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1167)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1162)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1170)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1135)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1113)
    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$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    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:724)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.seacourt.build#sbt-cpp;0.0.27: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

So how do I properly install sbt-cpp?

d40cht commented 11 years ago

Hi NobbZ,

Sbt-cpp although currently deployed on several projects, including one quite large multi-repo one at my current employer, is not widely deployed. As a result it's not been tested on many platforms (mainly because I don't have access to that many myself) so it currently may need some massaging in order to get going. In addition, I didn't have the samples under autobuild and so they were not working. Thanks for spotting that. I'm fixing them up now.

Let me know if I can help you get sbt-cpp working for your project.