No backend

100 views
Skip to first unread message

Anton Kuznetsov

unread,
Jan 19, 2015, 4:24:23 AM1/19/15
to sca...@googlegroups.com
LmsBackend is missing from Scalan Community edition.
Scala compiler says: "error: not found: type LmsBackend".

This leads to compilation errors in "HelloScalanStaged" code snippet from https://github.com/scalan/scalan-ce/blob/master/README.md

Alexander Slesarenko

unread,
Jan 19, 2015, 2:14:52 PM1/19/15
to sca...@googlegroups.com
Hi, Anton.
You need to clone http://github.com/scalan/virtualization-lms-core on your local computer. 
checkout scalan-develop branch.
Run sbt.
From sbt command prompt run publishLocal
After that go back to scalan-ce folder, run sbt, and compile command in sbt.

If it doesn't work, show your sbt output here.

Anton Kuznetsov

unread,
Jan 20, 2015, 12:20:20 AM1/20/15
to sca...@googlegroups.com
Alexander, thank you for the advice.

I did what you suggested. Compilation was successful, but still LmsBackend was missing.

C:\projects\virtualization-lms-core>sbt
[info] Loading project definition from C:\projects\virtualization-lms-core\project
[info] Set current project to LMS_local (in build file:/C:/projects/virtualization-lms-core/)
> publishLocal
[info] :: delivering :: EPFL#lms_local_2.10;0.3-SNAPSHOT :: 0.3-SNAPSHOT :: integration :: Tue Jan 20 08:37:46 MSK 2015
[info]  delivering ivy file to C:\projects\virtualization-lms-core\target\scala-2.10\ivy-0.3-SNAPSHOT.xml
[info] Wrote C:\projects\virtualization-lms-core\target\scala-2.10\lms_local_2.10-0.3-SNAPSHOT.pom
[info]  published lms_local_2.10 to C:\Users\user\.ivy2\local\EPFL\lms_local_2.10\0.3-SNAPSHOT\poms\lms_local_2.10.pom
[info]  published lms_local_2.10 to C:\Users\user\.ivy2\local\EPFL\lms_local_2.10\0.3-SNAPSHOT\jars\lms_local_2.10-tests.jar
[info]  published lms_local_2.10 to C:\Users\user\.ivy2\local\EPFL\lms_local_2.10\0.3-SNAPSHOT\jars\lms_local_2.10.jar
[info]  published lms_local_2.10 to C:\Users\user\.ivy2\local\EPFL\lms_local_2.10\0.3-SNAPSHOT\srcs\lms_local_2.10-sources.jar
[info]  published lms_local_2.10 to C:\Users\user\.ivy2\local\EPFL\lms_local_2.10\0.3-SNAPSHOT\srcs\lms_local_2.10-tests-source
s.jar
[info]  published ivy to C:\Users\user\.ivy2\local\EPFL\lms_local_2.10\0.3-SNAPSHOT\ivys\ivy.xml
[success] Total time: 1 s, completed 20.01.2015 8:37:47

-----------------------------------------------------

C:\projects\scalan-ce>sbt
[info] Loading project definition from C:\projects\scalan-ce\project
[info] Set current project to scalan (in build file:/C:/projects/scalan-ce/)
> compile
[success] Total time: 1 s, completed 20.01.2015 8:38:58


понедельник, 19 января 2015 г., 22:14:52 UTC+3 пользователь Alexander Slesarenko написал:

Alexander

unread,
Jan 20, 2015, 1:20:58 AM1/20/15
to Anton Kuznetsov, sca...@googlegroups.com
Looks like everything is ok.

Best regards,
Alexander Slesarenko



Anton Kuznetsov

unread,
Jan 22, 2015, 7:59:39 AM1/22/15
to sca...@googlegroups.com, aakuzn...@gmail.com
OK, this is what I did:

1) Downloaded and compiled "virtualization-lms-core". No problem here.

2) Downloaded, compiled and published "scalan-ce". After that lms-backend.jar archive DID NOT appear in the SBT cache (C:\Users\user\.ivy2\local\com.huawei.scalan)
The list of packages in the cache at this moment: common_2.10, community-edition_2.10, core_2.10, meta_2.10, scalan_2.10.

3) An interesting part. Go to scalan-ce folder, run "sbt" command, run "project lms-backend" in the sbt prompt. Then as usual: "compile", then "publishLocal".
And THIS is the point where lms-backend.jar archive DID appear in the SBT cache.

Please, correct SBT project file so that lms-backend is compiled together with the other Scalan libraries.

Now I can (try to) compile HelloScalanStaged example from your README.md doc

This is what I get:

> call scalac HelloScalanStaged.scala
HelloScalanStaged.scala:28: error: class LmsBackend needs to be a trait to be mixed in
object HelloScalanStaged extends HelloScalan with ScalanCommunityDslExp with LmsBackend {
                                                                              ^
HelloScalanStaged.scala:32: error: not found: value generateExecutable
    generateExecutable(
    ^
two errors found


вторник, 20 января 2015 г., 9:20:58 UTC+3 пользователь Alexander Slesarenko написал:

Alexey Romanov

unread,
Jan 29, 2015, 1:52:36 AM1/29/15
to sca...@googlegroups.com, aakuzn...@gmail.com
The issue is that we want to cross-compile for 2.10 and 2.11, and it doesn't work with lms-backend. We'll probably work around by having a separate aggregate project for cross-compilation.

Anton Kuznetsov

unread,
Feb 4, 2015, 2:22:10 AM2/4/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Hi!
After the recent patches to Scalan library the "LmsBackend" problem now solved. Thank you.

But there is another issue with "HelloScalanStaged" code snippet.
The problem is that "generateExecutable()" call is undefined. Seems like it was not declared in traits mixed in.

HelloScalan2.scala:31: error: not found: value generateExecutable
    generateExecutable(
    ^
one error found


четверг, 29 января 2015 г., 9:52:36 UTC+3 пользователь Alexey Romanov написал:

Alexey Romanov

unread,
Feb 4, 2015, 11:05:36 AM2/4/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Nothing should have changed for LmsBackend yet, actually. You should still need to do `lms-backend/publishLocal` in SBT. We plan to release 0.2.6 tomorrow and update the README.

Alexey Romanov

unread,
Feb 4, 2015, 11:08:26 AM2/4/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Oh, you meant the problem with it being a class instead of a trait. Sorry.

Alexey Romanov

unread,
Feb 5, 2015, 7:24:33 AM2/5/15
to sca...@googlegroups.com, aakuzn...@gmail.com
You need to replace LmsBackend with LmsCompiler. This will be updated on Github after the next push. Thanks!


On Wednesday, February 4, 2015 at 10:22:10 AM UTC+3, Anton Kuznetsov wrote:

Alexey Romanov

unread,
Feb 5, 2015, 8:50:37 AM2/5/15
to sca...@googlegroups.com, aakuzn...@gmail.com
My planned workaround didn't work, but at least the documentation now explains the issue. Could you check it and say if it's clear enough?

Anton Kuznetsov

unread,
Feb 5, 2015, 10:00:30 AM2/5/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Alexey, the description of the issue in documentation is clear enough.

четверг, 5 февраля 2015 г., 16:50:37 UTC+3 пользователь Alexey Romanov написал:

Anton Kuznetsov

unread,
Feb 6, 2015, 12:58:55 AM2/6/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Just tested again and it turned out that the problem with "HelloScalanStaged" code snippet was not solved.
I have updated and recompiled Scalan libraries, and replaced LmsBackend with LmsCompiler in the source code as you suggested. But compilation errors still remain.
I have attached the HelloScalan2.scala source code for your convenience.

HelloScalan2.scala:26: error: illegal inheritance;
 self-type HelloScalanStaged.type does not conform to scalan.compilation.lms.LmsCompiler's selftype scalan.compilation.lms.LmsCompiler with scalan.ScalanCtxExp
object HelloScalanStaged extends HelloScalan2 with ScalanCommunityDslExp with LmsCompiler {
                                                                              ^
HelloScalan2.scala:31: error: not found: value generateExecutable
    generateExecutable(
    ^
two errors found


четверг, 5 февраля 2015 г., 15:24:33 UTC+3 пользователь Alexey Romanov написал:
HelloScalan2.scala

Alexey Romanov

unread,
Feb 6, 2015, 8:19:29 AM2/6/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Sorry. This time I've verified that the new version compiles and works, and made some precautions to make sure it doesn't go stale again.

Anton Kuznetsov

unread,
Feb 7, 2015, 1:31:29 AM2/7/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Well... just tested again and stumbled upon the new compilation errors.
Alexey, could you tell me how to fix these errors?

HelloScalan.scala:19: error: HelloScalan.this.ArrayCompanion does not take parameters
  val matrix = Array(Array(1.0, 2.0), Array(3.0, 5.0))
                              ^
HelloScalan.scala:20: error: HelloScalan.this.ArrayCompanion does not take parameters
  val vector = Array(2.0, 3.0)
                              ^

пятница, 6 февраля 2015 г., 16:19:29 UTC+3 пользователь Alexey Romanov написал:

Alexey Romanov

unread,
Feb 7, 2015, 3:08:22 AM2/7/15
to sca...@googlegroups.com, aakuzn...@gmail.com
It looks like my message didn't go through, so this might end up a duplicate. You shouldn't be seeing ArrayCompanion in error messages, since it's renamed to SArray now. Check that you have the latest master and run `clean` SBT command.

Anton Kuznetsov

unread,
Feb 7, 2015, 4:13:25 AM2/7/15
to sca...@googlegroups.com, aakuzn...@gmail.com
I did what you suggested and it worked! HelloScalan now compiles and runs correctly. Thank you!

суббота, 7 февраля 2015 г., 11:08:22 UTC+3 пользователь Alexey Romanov написал:

Alexey Romanov

unread,
Feb 7, 2015, 8:43:56 AM2/7/15
to sca...@googlegroups.com, aakuzn...@gmail.com
Excellent! Thanks for being persistent about it :)
Reply all
Reply to author
Forward
0 new messages