This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Internal Compiler Error on Windows

4 replies
Michael Thorpe
Joined: 2011-10-26,
User offline. Last seen 42 years 45 weeks ago.
P {margin-top:0;margin-bottom:0;} 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?
adriaanm
Joined: 2010-02-08,
User offline. Last seen 31 weeks 4 days ago.
Re: Internal Compiler Error on Windows
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.
cheersadriaan

On Wed, Nov 2, 2011 at 4:20 PM, Thorpe, Michael <michael [dot] thorpe09 [at] imperial [dot] ac [dot] 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(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?

xeno.by
Joined: 2011-07-18,
User offline. Last seen 42 years 45 weeks ago.
Re: Internal Compiler Error on Windows

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"
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)
>         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?

Michael Thorpe
Joined: 2011-10-26,
User offline. Last seen 42 years 45 weeks ago.
RE: Re: Internal Compiler Error on Windows

Yes, it's a problem with Swing. Will try dropping down to JDK 1.6 and see if that fixes it.
________________________________________
From: scala-internals [at] googlegroups [dot] com [scala-internals [at] googlegroups [dot] com] on behalf of Eugene Burmako [xeno [dot] by [at] gmail [dot] com]
Sent: 02 November 2011 22:07
To: scala-internals
Subject: [scala-internals] Re: Internal Compiler Error on Windows

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"
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)
> 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?

Hubert Plociniczak
Joined: 2009-09-12,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Internal Compiler Error on Windows

JDK 1.7 is not supported yet and there are known incompatibilities like
the one you mentioned below.

hubert

On 11/02/2011 11:12 PM, Thorpe, Michael wrote:
> Yes, it's a problem with Swing. Will try dropping down to JDK 1.6 and see if that fixes it.
> ________________________________________
> From: scala-internals [at] googlegroups [dot] com [scala-internals [at] googlegroups [dot] com] on behalf of Eugene Burmako [xeno [dot] by [at] gmail [dot] com]
> Sent: 02 November 2011 22:07
> To: scala-internals
> Subject: [scala-internals] Re: Internal Compiler Error on Windows
>
> 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"
> 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)
>> 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?

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland