Error while building Scala IDE for 2.10

97 views
Skip to first unread message

Antoras

unread,
Jul 10, 2012, 12:13:42 PM7/10/12
to scala-...@googlegroups.com
I can't compile the actual sources with

./build-all.sh -P scala-2.10.x clean install

The error message is:

[INFO] TypeRef(TypeSymbol(final abstract class Unit extends ))
[INFO]
[INFO] duplicate keys in SWITCH, can't pick arbitrarily one of them to
evict, see SI-6011.
[INFO] at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:46)
[INFO] at scala.tools.nsc.Global.abort(Global.scala:250)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder$jcode$.emitSWITCH(GenASM.scala:1949)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder$$anonfun$genBlock$1$1.apply(GenASM.scala:2593)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder$$anonfun$genBlock$1$1.apply(GenASM.scala:2412)
[INFO] at
scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
[INFO] at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:39)
[INFO] at
scala.tools.nsc.backend.icode.BasicBlocks$BasicBlock.foreach(BasicBlocks.scala:185)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genBlock$1(GenASM.scala:2412)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genBlocks$1(GenASM.scala:2342)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genCode(GenASM.scala:2889)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genMethod(GenASM.scala:1663)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder$$anonfun$genClass$4.apply(GenASM.scala:1498)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder$$anonfun$genClass$4.apply(GenASM.scala:1498)
[INFO] at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
[INFO] at scala.collection.immutable.List.foreach(List.scala:77)
[INFO] at
scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1498)
[INFO] at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:226)
[INFO] at
scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1574)
[INFO] at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1548)
[INFO] at scala.tools.nsc.Global$Run.compileSources(Global.scala:1544)
[INFO] at scala.tools.nsc.Global$Run.compile(Global.scala:1654)
[INFO] at scala.tools.nsc.Driver.doCompile(Driver.scala:31)
[INFO] at scala.tools.nsc.Main$.doCompile(Main.scala:81)
[INFO] at scala.tools.nsc.Driver.process(Driver.scala:52)
[INFO] at scala.tools.nsc.Driver.main(Driver.scala:65)
[INFO] at scala.tools.nsc.Main.main(Main.scala)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[INFO] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:616)
[INFO] at scala_maven_executions.MainHelper.runMain(MainHelper.java:161)
[INFO] at
scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
[INFO]
[ERROR] error: fatal error:
[INFO] while compiling:
/home/antoras/dev/Scala/scala-ide/org.scala-ide.sdt.core/src/scala/tools/eclipse/wizards/support.scala
[INFO] during phase: jvm
[INFO] library version: version 2.10.0-20120709-134942-9a7546db9f
[INFO] compiler version: version 2.10.0-20120709-134942-9a7546db9f


How to solve this?


Mirco Dotta

unread,
Jul 10, 2012, 12:32:15 PM7/10/12
to scala-...@googlegroups.com
Yeah, it's a known issue (I believe it's a recent regression on 2.10). I think a fix is landing shortly (maybe tomorrow already).

In the meanwhile, you can compiler with 2.9 (just run ./build-all.sh with no arguments).

-- Mirco

---------------
Mirco Dotta
Typesafe - The software stack for applications that scale
PSE-D, 1015 Lausanne, Switzerland
Twitter: @mircodotta








Antoras

unread,
Jul 10, 2012, 12:47:53 PM7/10/12
to scala-...@googlegroups.com
Ok, 2.9 build works fine.

Waiting for fix for 2.10 now ... ;)
> Typesafe <http://www.typesafe.com/> - The software stack for

iulian dragos

unread,
Jul 11, 2012, 4:24:27 AM7/11/12
to scala-...@googlegroups.com
On Tue, Jul 10, 2012 at 6:47 PM, Antoras <ma...@antoras.de> wrote:
Ok, 2.9 build works fine.

Waiting for fix for 2.10 now ... ;)




--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

iulian dragos

unread,
Jul 11, 2012, 4:25:12 AM7/11/12
to scala-...@googlegroups.com
On Wed, Jul 11, 2012 at 10:24 AM, iulian dragos <jagu...@gmail.com> wrote:


On Tue, Jul 10, 2012 at 6:47 PM, Antoras <ma...@antoras.de> wrote:
Ok, 2.9 build works fine.

Waiting for fix for 2.10 now ... ;)


Antoras

unread,
Jul 11, 2012, 5:10:59 AM7/11/12
to scala-...@googlegroups.com
Thanks very much for the fix, it works fine.

Another question: How does the fix work? Yesterday, you Iulian, did a
small commit for a workaround. But I don't understand how this fixes the
problem occurred on my system. I got an errror in
scala.tools.eclipse.wizards.support and not in
scala.tools.eclipse.ui.ScalaIndenter.
> scala.reflect.internal.__SymbolTable.abort(SymbolTable.__scala:46)
> [INFO] at scala.tools.nsc.Global.abort(__Global.scala:250)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder$jcode$.__emitSWITCH(GenASM.scala:1949)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder$$anonfun$__genBlock$1$1.apply(GenASM.__scala:2593)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder$$anonfun$__genBlock$1$1.apply(GenASM.__scala:2412)
> [INFO] at
> scala.collection.__IndexedSeqOptimized$class.__foreach(IndexedSeqOptimized.__scala:34)
> [INFO] at
> scala.collection.mutable.__ArrayOps.foreach(ArrayOps.__scala:39)
> [INFO] at
> scala.tools.nsc.backend.icode.__BasicBlocks$BasicBlock.__foreach(BasicBlocks.scala:185)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder.genBlock$__1(GenASM.scala:2412)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder.__genBlocks$1(GenASM.scala:2342)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder.genCode(__GenASM.scala:2889)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder.__genMethod(GenASM.scala:1663)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder$$anonfun$__genClass$4.apply(GenASM.scala:__1498)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder$$anonfun$__genClass$4.apply(GenASM.scala:__1498)
> [INFO] at
> scala.collection.__LinearSeqOptimized$class.__foreach(LinearSeqOptimized.__scala:59)
> [INFO] at
> scala.collection.immutable.__List.foreach(List.scala:77)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$JPlainBuilder.genClass(__GenASM.scala:1498)
> [INFO] at
> scala.tools.nsc.backend.jvm.__GenASM$AsmPhase.run(GenASM.__scala:226)
> [INFO] at
> scala.tools.nsc.Global$Run.__compileUnitsInternal(Global.__scala:1574)
> [INFO] at
> scala.tools.nsc.Global$Run.__compileUnits(Global.scala:__1548)
> [INFO] at
> scala.tools.nsc.Global$Run.__compileSources(Global.scala:__1544)
> [INFO] at
> scala.tools.nsc.Global$Run.__compile(Global.scala:1654)
> [INFO] at
> scala.tools.nsc.Driver.__doCompile(Driver.scala:31)
> [INFO] at scala.tools.nsc.Main$.__doCompile(Main.scala:81)
> [INFO] at
> scala.tools.nsc.Driver.__process(Driver.scala:52)
> [INFO] at scala.tools.nsc.Driver.main(__Driver.scala:65)
> [INFO] at scala.tools.nsc.Main.main(__Main.scala)
> [INFO] at
> sun.reflect.__NativeMethodAccessorImpl.__invoke0(Native Method)
> [INFO] at
> sun.reflect.__NativeMethodAccessorImpl.__invoke(__NativeMethodAccessorImpl.java:__57)
> [INFO] at
> sun.reflect.__DelegatingMethodAccessorImpl.__invoke(__DelegatingMethodAccessorImpl.__java:43)
> [INFO] at
> java.lang.reflect.Method.__invoke(Method.java:616)
> [INFO] at
> scala_maven_executions.__MainHelper.runMain(MainHelper.__java:161)
> [INFO] at
> scala_maven_executions.__MainWithArgsInFile.main(__MainWithArgsInFile.java:26)
> [INFO]
> [ERROR] error: fatal error:
> [INFO] while compiling:
> /home/antoras/dev/Scala/scala-__ide/org.scala-ide.sdt.core/__src/scala/tools/eclipse/__wizards/support.scala
> [INFO] during phase: jvm
> [INFO] library version: version
> 2.10.0-20120709-134942-__9a7546db9f
> [INFO] compiler version: version
> 2.10.0-20120709-134942-__9a7546db9f
>
>
> How to solve this?
>
>
>
>
> ---------------
> Mirco Dotta
> Typesafe <http://www.typesafe.com/> - The software stack for
>
> applications that scale
> PSE-D, 1015 Lausanne, Switzerland
> Work: +41 (0)21 691 49 65
> <tel:%2B41%20%280%2921%20691%2049%2065>

iulian dragos

unread,
Jul 11, 2012, 5:27:31 AM7/11/12
to scala-...@googlegroups.com
On Wed, Jul 11, 2012 at 11:10 AM, Antoras <ma...@antoras.de> wrote:
Thanks very much for the fix, it works fine.

Another question: How does the fix work? Yesterday, you Iulian, did a small commit for a workaround. But I don't understand how this fixes the problem occurred on my system. I got an errror in scala.tools.eclipse.wizards.support and not in scala.tools.eclipse.ui.ScalaIndenter.

That's interesting, I didn't see message. As far as I can tell, there's no problematic match in that file. Maybe the compiler reports a spurious file in the error message.

iulian

Antoras

unread,
Jul 11, 2012, 5:56:57 AM7/11/12
to scala-...@googlegroups.com
Ok, the most important thing is that it works fine now.

James Moore

unread,
Jul 16, 2012, 12:18:04 AM7/16/12
to scala-...@googlegroups.com
On Wednesday, July 11, 2012 2:56:57 AM UTC-7, sschaef wrote:
Ok, the most important thing is that it works fine now

It's not working for me - just tried it and got:

(at commit d8de93d97d78befb069eaafc71d2db1108bb8513)

[INFO] == Expanded type of tree ==
[INFO] 
[INFO] TypeRef(TypeSymbol(final abstract class Unit extends ))
[INFO] 
[INFO] duplicate keys in SWITCH, can't pick arbitrarily one of them to evict, see SI-6011.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] org.scala-ide.sdt.build ........................... SUCCESS [0.990s]
[INFO] org.scala-ide.sdt.aspects ......................... SUCCESS [2.503s]
[INFO] org.scala-ide.sdt.core ............................ FAILURE [59.023s]
[INFO] org.scala-ide.sdt.core.tests ...................... SKIPPED
[INFO] org.scala-ide.sdt.debug ........................... SKIPPED
[INFO] org.scala-ide.sdt.debug.tests ..................... SKIPPED
[INFO] org.scala-ide.sdt.weaving.feature ................. SKIPPED
[INFO] org.scala-ide.sdt.feature ......................... SKIPPED
[INFO] org.scala-ide.sdt.dev.feature ..................... SKIPPED
[INFO] org.scala-ide.sdt.source.feature .................. SKIPPED
[INFO] org.scala-ide.sdt.update-site ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:45.177s
[INFO] Finished at: Sun Jul 15 21:04:58 PDT 2012
[INFO] Final Memory: 79M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.0.2:compile (default) on project org.scala-ide.sdt.core: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.scala-ide.sdt.core

James Moore

unread,
Jul 16, 2012, 12:27:46 AM7/16/12
to scala-...@googlegroups.com
Works fine if I build 2.9, FYI.

iulian dragos

unread,
Jul 16, 2012, 2:23:00 AM7/16/12
to scala-...@googlegroups.com
On Mon, Jul 16, 2012 at 6:18 AM, James Moore <ja...@banshee.com> wrote:
On Wednesday, July 11, 2012 2:56:57 AM UTC-7, sschaef wrote:
Ok, the most important thing is that it works fine now

It's not working for me - just tried it and got:

(at commit d8de93d97d78befb069eaafc71d2db1108bb8513)

[INFO] == Expanded type of tree ==
[INFO] 
[INFO] TypeRef(TypeSymbol(final abstract class Unit extends ))
[INFO] 
[INFO] duplicate keys in SWITCH, can't pick arbitrarily one of them to evict, see SI-6011.

For some reason you have an old 2.10 compiler snapshot (check the date of the snapshot in your .m2 directory). I don't really know when/why it forgets to update, but try to delete .m2/repository/org/scala-lang/scala-compiler/2.10.0-SNAPSHOT...

iulian

sschaef

unread,
Jul 16, 2012, 6:53:46 PM7/16/12
to scala-...@googlegroups.com
Once more, another error while building the nightly:

Failed tests:   test1000656(scala.tools.eclipse.hyperlink.HyperlinkDetectorTests): expected 1 link, found 0 expected:<1> but was:<0>
  mainVerificationSucceed(scala.tools.eclipse.launching.MainClassVerifierTest):
  runScalaAppOnSourceWithSeveralPackageDeclaration_t1001096(scala.tools.eclipse.launching.MainClassVerifierTest):
  checkJavaCompilesInNestedProject(scala.tools.eclipse.sbtbuilder.NestedProjectsTest): Missing class file
  transitive_dep_with_error_stops_build(scala.tools.eclipse.sbtbuilder.ProjectDependenciesTest): One error in B expected:<1> but was:<0>
  dependent_projects_are_rebuilt_and_PC_notified(scala.tools.eclipse.sbtbuilder.SbtBuilderTest): Build problems expected:<2> but was:<0>
  dependentProject_should_restart_PC_after_build(scala.tools.eclipse.sbtbuilder.SbtBuilderTest): Build problems List() expected:<2> but was:<0>
  ticket_1000607(scala.tools.eclipse.sbtbuilder.ScalaJavaDepTest): One error expected: List() expected:<1> but was:<0>
  testTODOSearch(scala.tools.eclipse.sbtbuilder.TodoBuilderTest): No valid TODO was found

Tests in error:
  findReferencesInConstructorSuperCall(scala.tools.eclipse.findreferences.FindReferencesTests): Don't know how to convert element `layout` of type `class org.eclipse.jdt.internal.core.ResolvedBinaryMethod`
  findReferencesInClassFields(scala.tools.eclipse.findreferences.FindReferencesTests): Don't know how to convert element `layout` of type `class org.eclipse.jdt.internal.core.ResolvedBinaryMethod`
  scalaLibrary_in_dependent_project_shouldBe_on_BootClasspath(scala.tools.eclipse.sbtbuilder.SbtBuilderTest)

Real error in test or something other?

James Moore

unread,
Jul 17, 2012, 1:33:01 AM7/17/12
to scala-...@googlegroups.com
On Sun, Jul 15, 2012 at 11:23 PM, iulian dragos <jagu...@gmail.com> wrote:
For some reason you have an old 2.10 compiler snapshot (check the date of the snapshot in your .m2 directory). I don't really know when/why it forgets to update, but try to delete .m2/repository/org/scala-lang/scala-compiler/2.10.0-SNAPSHOT...


Fixed that, and it's much better, but still not working.  Or are the tests not passing now?

I get:

Tests run: 357, Failures: 0, Errors: 311, Skipped: 22

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] org.scala-ide.sdt.build ........................... SUCCESS [0.847s]
[INFO] org.scala-ide.sdt.aspects ......................... SUCCESS [2.155s]
[INFO] org.scala-ide.sdt.core ............................ SUCCESS [4.028s]
[INFO] org.scala-ide.sdt.core.tests ...................... FAILURE [16.305s]
[INFO] org.scala-ide.sdt.debug ........................... SKIPPED
[INFO] org.scala-ide.sdt.debug.tests ..................... SKIPPED
[INFO] org.scala-ide.sdt.weaving.feature ................. SKIPPED
[INFO] org.scala-ide.sdt.feature ......................... SKIPPED
[INFO] org.scala-ide.sdt.dev.feature ..................... SKIPPED
[INFO] org.scala-ide.sdt.source.feature .................. SKIPPED
[INFO] org.scala-ide.sdt.update-site ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:05.325s
[INFO] Finished at: Mon Jul 16 22:31:16 PDT 2012
[INFO] Final Memory: 81M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.15.0:test (default-test) on project org.scala-ide.sdt.core.tests: There are test failures.
[ERROR] 
[ERROR] Please refer to /private/tmp/fnord/scala-ide/org.scala-ide.sdt.core.tests/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.scala-ide.sdt.core.tests

--
James Moore
ja...@restphone.com
http://blog.restphone.com/
http://www.linkedin.com/in/jamesmmooreiv

Mirco Dotta

unread,
Jul 17, 2012, 2:18:57 AM7/17/12
to scala-...@googlegroups.com
The nightly has been failing in the past three days (because of tests failures)


I believe Iulian is looking into it. In the meanwhile, you can compile the IDE sources against Scala 2.9.x (just run  `./build-all.sh` or `mvn clean install`)

-- Mirco

iulian dragos

unread,
Jul 17, 2012, 4:19:29 AM7/17/12
to scala-...@googlegroups.com
The 2.10 branch isn't working because of binary incompatible changes. We'd need to re-deploy a nightly of Sbt, but we are in the process of moving from our own branch (based on 0.11.2) to the stock Sbt, 0.13.0-SNAPSHOT. It didn't make sense to go through another redeploy for that, so hopefully we'll have it up an running in a couple of days.

iulian

ijuma

unread,
Jul 18, 2012, 6:02:34 PM7/18/12
to scala-...@googlegroups.com
On Tuesday, 17 July 2012 09:19:29 UTC+1, Iulian Dragos wrote:
The 2.10 branch isn't working because of binary incompatible changes. We'd need to re-deploy a nightly of Sbt, but we are in the process of moving from our own branch (based on 0.11.2) to the stock Sbt, 0.13.0-SNAPSHOT.

Great that the IDE is moving to stock SBT. Now we just need the Juno and ScalaTest support merged and all is good in the world. ;)

Best,
Ismael 
Reply all
Reply to author
Forward
0 new messages