scalac2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

scalac2

Molnár Balázs-2
Hello,

I tried to install scalac2 with sbaz  and after installation the call  
to scalac2 resulted in this exception:

Exception in thread "main" java.lang.NoSuchMethodError:  
scala.runtime.ScalaRunTime$.charValue(Lscala/runtime/BoxedNumber;)C
         at scala.tools.nsc.util.NameTransformer$$anonfun0.apply
(NameTransformer.scala:18)
         at scala.tools.nsc.util.NameTransformer$.enterOp
(NameTransformer.scala:18)
         at scala.tools.nsc.util.NameTransformer$.<init>
(NameTransformer.scala:23)
         at scala.tools.nsc.util.NameTransformer$.<clinit>
(NameTransformer.scala)
         at scala.tools.nsc.symtab.StdNames$class.encode
(StdNames.scala:360)
         at scala.tools.nsc.symtab.SymbolTable.encode
(SymbolTable.scala:10)
         at scala.tools.nsc.symtab.StdNames$nme$.<init>
(StdNames.scala:76)
         at scala.tools.nsc.symtab.SymbolTable.nme(SymbolTable.scala:10)
         at scala.tools.nsc.ast.Trees$class.Modifiers(Trees.scala:33)
         at scala.tools.nsc.Global.Modifiers(Global.scala:30)
         at scala.tools.nsc.ast.Trees$class.$init$(Trees.scala:36)
         at scala.tools.nsc.Global.<init>(Global.scala:30)
         at scala.tools.nsc.Main$.process(Main.scala:51)
         at scala.tools.nsc.Main$.main(Main.scala:69)
         at scala.tools.nsc.Main.main(Main.scala)

I am using

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83)
Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing)

on Mac OS X.


any help would be welcome,
Balazs
Reply | Threaded
Open this post in threaded view
|

Re: scalac2

Gilles Dubochet-2
Hello,

I have also been encountering bizarre exceptions with the Mac OS X JVM.
Somehow, it seems that Apple-designed JVMs just aren't as stable as the
Sun or IBM ones.

You can try at least two things to fix that:

1. Upgrade to the latest version of Java 1.5 (JRE 1.5.0_06-103 and VM
1.5.0_06-57) that is available for free from the Apple developer
connection.

2. Switch back to Java 1.4. To do that, simply set the JAVACMD
environment variable to
'/System/Library/Frameworks/JavaVM.framework/Versions/1.4/Home/bin/java',
for example by executing in a BASH terminal the command: 'export
JAVACMD=/System/...'. As long as this variable is set, SABBUS (the
Scala build script) and the scala2 and scalac2 commands will use Java
1.4.

Good luck,
Gilles @ LAMP.

> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83)
> Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing)
> on Mac OS X.


Reply | Threaded
Open this post in threaded view
|

Re: scalac2

Lex Spoon
In reply to this post by Molnár Balázs-2
Molnár Balázs <[hidden email]> writes:
> I tried to install scalac2 with sbaz  and after installation the call
> to scalac2 resulted in this exception:
>
> Exception in thread "main" java.lang.NoSuchMethodError:


"NoSuchMethod" usually means that your system is mixing incompatible
jars.  Could you do "sbaz upgrade" to check on this?  Hopefully such
binary incompatibilities become less common over time for core
components like the compiler and the system library, but at this early
time, we feel it is better to get the libraries just right even if it
means breaking binary compatibility.

Also, I plan to post a new version of the compiler soon to sbaz,
hopefully later today....

-Lex

Reply | Threaded
Open this post in threaded view
|

Re: scalac2

Molnár Balázs-2
In reply to this post by Gilles Dubochet-2
Hello Gilles,

I tried to use the new JVM but I am still getting the same error. I guess I will
have to wait for a new release.

regards,
Balazs