Internal Compiler Error on Windows

15 views
Skip to first unread message

Thorpe, Michael

unread,
Nov 2, 2011, 11:20:21 AM11/2/11
to scala-i...@googlegroups.com
Hi,

I'm trying to build the latest build of the scala compiler on windows, which is currently failing with:

[scalacfork] Compiling 103 files to c:\Users\Michael\scala\build\quick\classes\library

BUILD FAILED
c:\Users\Michael\scala\build.xml:517: java.lang.RuntimeException: Compilation failed because of an internal compiler error; see the error output for details.
        at scala.sys.package$.error(package.scala:27)
        at scala.tools.ant.sabbus.ScalacFork.execute(ScalacFork.scala:144)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

are there any solutions to this problem?

Adriaan Moors

unread,
Nov 2, 2011, 5:38:54 PM11/2/11
to scala-i...@googlegroups.com
Hi Michael,

It's hard to tell what exactly the problem is, as the stacktrace you pasted is from the build tool, not the actual compiler error.
Is there more output? Which revision are you trying to build? Is the JVM's maximum heap size at least 1GB?
If this is not a clean build, try removing the build directory and starting over.

cheers
adriaan

Eugene Burmako

unread,
Nov 2, 2011, 6:07:46 PM11/2/11
to scala-internals
Hi Michael,

Recently I tried to build Scala on Windows and faced the same error
(well, I assume it's the same, since, as Adriaan says, you haven't
posted the entire error log). My problem was in "Program Files"
fragment of the path to either Ant or Scala. IIRC, when I changed
ANT_HOME to C:\PROGRA~2\ant\ and SCALA_HOME to C:\PROGRA~2\Scala,
everything started working again.

Also, I got errors when trying to build Scala with JDK 1.7. It has
some weird problems with Swing, so I switched to JDK 1.6, and
everything was fine. I've heard that there's a separate branch for
building with JDK 1.7, but didn't check this myself.

Cheers,
Eugene

On Nov 2, 4:20 pm, "Thorpe, Michael" <michael.thorp...@imperial.ac.uk>
wrote:
> Hi,
>
> I'm trying to build the latest build of the scala compiler on windows, which is currently failing with:
>
> [scalacfork] Compiling 103 files to c:\Users\Michael\scala\build\quick\classes\library
>
> BUILD FAILED
> c:\Users\Michael\scala\build.xml:517: java.lang.RuntimeException: Compilation failed because of an internal compiler error; see the error output for details.
>         at scala.sys.package$.error(package.scala:27)
>         at scala.tools.ant.sabbus.ScalacFork.execute(ScalacFork.scala:144)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp­l.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>         at org.apache.tools.ant.Task.perform(Task.java:348)
>         at org.apache.tools.ant.Target.execute(Target.java:390)
>         at org.apache.tools.ant.Target.performTasks(Target.java:411)
>         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
>         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.­java:41)

Thorpe, Michael

unread,
Nov 2, 2011, 6:12:34 PM11/2/11
to scala-i...@googlegroups.com
Yes, it's a problem with Swing. Will try dropping down to JDK 1.6 and see if that fixes it.
________________________________________
From: scala-i...@googlegroups.com [scala-i...@googlegroups.com] on behalf of Eugene Burmako [xen...@gmail.com]
Sent: 02 November 2011 22:07
To: scala-internals
Subject: [scala-internals] Re: Internal Compiler Error on Windows

Hubert Plociniczak

unread,
Nov 2, 2011, 6:20:33 PM11/2/11
to scala-i...@googlegroups.com
JDK 1.7 is not supported yet and there are known incompatibilities like
the one you mentioned below.

hubert

Reply all
Reply to author
Forward
0 new messages