Forum: IronRuby Building IronRuby under Mono

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Antonio C. (Guest)
on 2008-12-06 20:45
(Received via mailing list)
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 (C) 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/IronR...
$ 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 variable `c'
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 variable `typeofT' 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
variable
`p' 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
variable
`labReturnLeft' 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 variable
`labIfNull' 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 variable
`isFromFloatingPoint' 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 type
`bool' 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
Seo S. (Guest)
on 2008-12-06 21:04
(Received via mailing list)
2008/12/7 Antonio C. <removed_email_address@domain.invalid>:
> Mono JIT compiler version 1.9.1 (tarball)
> Copyright (C) 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?
Antonio C. (Guest)
on 2008-12-06 22:52
(Received via mailing list)
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 (c) 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:in `Initialize'
    from mscorlib:0:in `.ctor'
    from mscorlib:0:in `.ctor'

Any suggestions?

Thanks,
Antonio
Michael L. (Guest)
on 2008-12-08 01:18
(Received via mailing list)
I'm curious... I'm running into a number of issues just compiling... is
this
from the SVN or Git repo?
Seo S. (Guest)
on 2008-12-08 01:49
(Received via mailing list)
2008/12/8 Michael L. <removed_email_address@domain.invalid>:
> 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 topic is locked and can not be replied to.