Building IronRuby under Mono

Hello,

I’m trying to compile IronRuby under Mono, but I’m receiving a few
errors.
Any ideas?

$ uname -a
Linux zen 2.6.27-9-generic #1 SMP Thu Nov 20 22:15:32 UTC 2008 x86_64
GNU/Linux

$ mono --version
Mono JIT compiler version 1.9.1 (tarball)
Copyright © 2002-2007 Novell, Inc and Contributors.
www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none

$ gmcs --version
Mono C# compiler version 1.9.1.0

$ svn co -r 144 http://ironruby.rubyforge.org/svn/trunk ironruby
$ cd ironruby/
$ wget
http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-mono-r144
$ patch -p0 < patch-mono-r144

$ rake compile mono=1
(in /home/antonio/code/ruby/ironruby)
./ast/MethodCallExpression.cs(167,18): warning CS0219: The variable
invoke' is assigned but its value is never used ./ast/expressiontreevisitor.cs(99,30): warning CS0219: The variablec’
is
assigned but its value is never used
./actions/callsite.cs(255,25): warning CS0219: The variable newRule' is assigned but its value is never used ./actions/callsite.cs(146,18): warning CS0219: The variabletypeofT’ is
assigned but its value is never used
./com/VarEnumSelector.cs(313,37): warning CS0168: The variable
narrowingLevel' is declared but never used ./compiler/LambdaCompiler.Logical.cs(182,33): warning CS0219: The variablep’ is assigned but its value is never used
./compiler/LambdaCompiler.Logical.cs(234,19): warning CS0219: The
variable
labReturnLeft' is assigned but its value is never used ./compiler/LambdaCompiler.Logical.cs(410,19): warning CS0219: The variablelabReturnLeft’ is assigned but its value is never used
./compiler/LambdaCompiler.Statements.cs(368,19): warning CS0219: The
variable endCatchBlock' is assigned but its value is never used ./compiler/lambdacompiler.unary.cs(84,35): warning CS0219: The variablelabIfNull’ is assigned but its value is never used
./compiler/TryStatementInfo.cs(110,24): warning CS0219: The variable
cb' is assigned but its value is never used ./compiler/ilgen.cs(1104,18): warning CS0219: The variableisFromFloatingPoint’ is assigned but its value is never used
./utils/helpers.cs(37,20): error CS1502: The best overloaded method
match
for System.Reflection.Emit.DynamicMethod.DynamicMethod(string, System.Type, System.Type[], System.Reflection.Module)' has some invalid arguments /usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error) ./utils/helpers.cs(37,20): error CS1503: Argument 4: Cannot convert typebool’ to `System.Reflection.Module’
Compilation failed: 2 error(s), 12 warnings
rake aborted!
Command failed with status (1): [gmcs
/out:"/home/antonio/code/ruby/ironrub…]
/home/antonio/code/ruby/ironruby/Rakefile:270
(See full trace by running task with --trace)

Thanks in advance,
Antonio

2008/12/7 Antonio C. [email protected]:

Mono JIT compiler version 1.9.1 (tarball)
Copyright © 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none

Try Mono 2.0?

Using Mono 2.0 I was able to build IronRuby but it’s not working
properly:

~/code/ruby/ironruby/build/mono_debug$ ./ir.exe
IronRuby 1.0.0.0 on .NET 2.0.50727.42
Copyright © Microsoft Corporation. All rights reserved.

Note that local variables do not work today in the console.
As a workaround, use globals instead (eg $x = 42 instead of x = 42).

3 + 3
unknown: An exception was thrown by the type initializer for
Microsoft.Scripting.SourceCodeReader
(System::TypeInitializationException)

~/code/ruby/ironruby/build/mono_debug$ mono ./ir.exe
~/code/ruby/hello.rb
mscorlib:0:in set_Fallback': Argument cannot be null. (System::ArgumentNullException) from mscorlib:0:in.ctor’
from mscorlib:0:in GetDecoder' from mscorlib:0:inInitialize’
from mscorlib:0:in .ctor' from mscorlib:0:in.ctor’

Any suggestions?

Thanks,
Antonio

I’m curious… I’m running into a number of issues just compiling… is
this
from the SVN or Git repo?

2008/12/8 Michael L. [email protected]:

I’m curious… I’m running into a number of issues just compiling… is this
from the SVN or Git repo?

He is using old SVN version. The latest doesn’t compile for me.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs