Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalac-net does not compile trivial sample to dot Net #3844

Closed
scabug opened this issue Sep 15, 2010 · 5 comments
Closed

Scalac-net does not compile trivial sample to dot Net #3844

scabug opened this issue Sep 15, 2010 · 5 comments
Milestone

Comments

@scabug
Copy link

scabug commented Sep 15, 2010

Hi to all,
I have a trivial Scala source that with Scala 2.7.7 is compiled in dot Net using the dot Net runtime 2.0 and the 4.0 (both on Windows XP and Windows 7 at 64 bit). The same gives me a strange error only changing the Scala version to 2.8.0 .

Maybe the problem could be only in giving the right classpath to the scalac-net tool ... because the missing class if present if scala-msil jars.

This is the detail of the error:

>scalac-net HelloWorld.scala
scala.tools.nsc.MissingRequirementError: class scala.runtime.VolatileBooleanRef not found.
        at scala.tools.nsc.symtab.Definitions$$definitions$$.getModuleOrClass(Definitions.scala:513)
        at scala.tools.nsc.symtab.Definitions$$definitions$$.getClass(Definitions.scala:471)
        at scala.tools.nsc.symtab.Definitions$$definitions$$.newValueClass(Definitions.scala:620)
        at scala.tools.nsc.symtab.Definitions$$definitions$$.BooleanClass(Definitions.scala:92)
        at scala.tools.nsc.symtab.Definitions$$definitions$$.initValueClasses(Definitions.scala:643)
        at scala.tools.nsc.symtab.Definitions$$definitions$$.init(Definitions.scala:787)
        at scala.tools.nsc.Global$$Run.<init>(Global.scala:597)
        at scala.tools.nsc.Main$$.process(Main.scala:107)
        at scala.tools.nsc.Main$$.main(Main.scala:122)
        at scala.tools.nsc.Main.main(Main.scala)
error: fatal error: class scala.runtime.VolatileBooleanRef not found.


>scalac-net -verbose HelloWorld.scala
[AssemRefs = .]
Exception in thread "main" java.lang.RuntimeException: Unknown
        at scala.tools.nsc.util.AssemblyClassPath.asClasspathString(MsilClassPath.scala:115)
        at scala.tools.nsc.util.AssemblyClassPath.asClasspathString(MsilClassPath.scala:108)
        at scala.tools.nsc.util.MergedClassPath$$$$anonfun$$asClasspathString$$1.apply(ClassPath.scala:338)
        at scala.tools.nsc.util.MergedClassPath$$$$anonfun$$asClasspathString$$1.apply(ClassPath.scala:338)
        at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:206)
        at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:206)
        at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:61)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$$class.map(TraversableLike.scala:206)
        at scala.collection.immutable.List.map(List.scala:45)
        at scala.tools.nsc.util.MergedClassPath.asClasspathString(ClassPath.scala:338)
        at scala.tools.nsc.Global.<init>(Global.scala:220)
        at scala.tools.nsc.Main$$.process(Main.scala:91)
        at scala.tools.nsc.Main$$.main(Main.scala:122)
        at scala.tools.nsc.Main.main(Main.scala)

In the attached zip you can find the source and batch scripts that I use, to simplify your tests. The same error occurs also on the second trivial source (test.scala).
Note that paths inside are for my develop environment, you'll have to adapt to yours.

Let me know if I can give more infos.

Best Regards,
Sandro

@scabug
Copy link
Author

scabug commented Sep 15, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3844?orig=1
Reporter: Sandro Martini (smartini)
Attachments:

@scabug
Copy link
Author

scabug commented Sep 15, 2010

Sandro Martini (smartini) said:
sample source and scripts for setup the environment

@scabug
Copy link
Author

scabug commented Sep 15, 2010

@lrytz said:
I just tried your HelloWorld on Windows XP and it works for me (with a scala-msil nightly build). Wild guess: if some of the paths to scala / scalac / .jars contains spaces that could be a problem.

@scabug
Copy link
Author

scabug commented Sep 15, 2010

Sandro Martini (smartini) said:
Hi, thanks for the help.

I'm sure I don't have folders with spaces inside the name,
but I'm happy that current nightly builds solve it.

Thank you very much,
Sandro

@scabug
Copy link
Author

scabug commented Sep 15, 2010

@lrytz said:
I just tries 2.8.0.final as well and can confirm your error. Try a nightly build http://www.scala-lang.org/node/212/distributions-msil

@scabug scabug closed this as completed May 18, 2011
@scabug scabug added this to the 2.10.0-M3 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant