# Compiling on Mono?

**URL:** <https://www.ruby-forum.com/t/compiling-on-mono/198011>\
**Category:** IronRuby\
**Created:** [October 24, 2010, 10:52pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011 "2010-10-24T22:52:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 24, 2010, 10:52pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/1 "2010-10-24T22:52:42Z")

</div>

Hello,  
I know there is a special outdated branch provided by casualjim which  
lets  
you compile ironruby on mono/linux, but what about the current version?  
Can  
I compile it with mono? I tried using the 2.8 release of mono to compile  
ironruby 1.1.1, but it would result in an error:

```
    Runtime/SavableScriptCode.cs(40,47): error CS0246: The type or

```

namespace name `ScriptCode' could not be found. Are you missing a using directive or an assembly reference? Runtime/LanguageBoundTextContentProvider.cs(26,62): error CS0246: The type or namespace name`TextContentProvider’ could not be found. Are  
you  
missing a using directive or an assembly reference?  
Runtime/SourceStringContentProvider.cs(25,57): error CS0246: The  
type or namespace name `TextContentProvider' could not be found. Are you missing a using directive or an assembly reference? Runtime/NullTextContentProvider.cs(24,51): error CS0246: The type or namespace name`TextContentProvider’ could not be found. Are you missing  
a  
using directive or an assembly reference?  
SourceFileContentProvider.cs(27,55): error CS0246: The type or  
namespace name `StreamContentProvider’ could not be found. Are you  
missing a  
using directive or an assembly reference?

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 24, 2010, 11:51pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/2 "2010-10-24T23:51:05Z")

</div>

I have this branch successfully compiling on Mono:  
[http://github.com/mletterle/ironruby/tree/linux](http://github.com/mletterle/ironruby/tree/linux)

compile with xbuild /property:TreatWarningsAsErrors=false  
/property:DefineConstants=“DEBUG MONO” Ruby.csproj

On Sun, Oct 24, 2010 at 3:23 PM, Andrius Bentkus  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> missing a using directive or an assembly reference?  
> Ironruby-core mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
IronRuby MVP

> **[Michael Letterle's Blog ·](https://blog.prokrams.com/)**

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 1:44am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/3 "2010-10-25T01:44:16Z")

</div>

> I have this branch successfully compiling on Mono:  
> [http://github.com/mletterle/ironruby/tree/linux](http://github.com/mletterle/ironruby/tree/linux)
> 
> compile with xbuild /property:TreatWarningsAsErrors=false  
> /property:DefineConstants=“DEBUG MONO” Ruby.csproj

The interesting part is how did you get the other projects that  
Ruby,csproj  
depends on to build…

MemoryMapping.V2.cs(16,12): error CS0234: The type or namespace name  
`Unix' does not exist in the namespace `Mono’. Are you missing an assembly  
reference?  
Task “Csc” execution – FAILED  
Done building target  
“CoreCompile” in  
project “~/gentoo/dotnet/mono/ironruby-  
mletterle/Runtime/Microsoft.Scripting.Metadata/Microsoft.Scripting.Metadata.csproj”.–  
FAILED

and

dotnet/mono/ironruby-  
mletterle/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj  
(default  
targets) →   
/usr/lib64/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) →

```
    Hosting/ScriptScope.cs(229,21): error CS0030: Cannot convert 

```

type  
`System.Collections.Generic.KeyValuePair<string,dynamic>' to `System.Collections.Generic.KeyValuePair\<string,object\>’

and

dotnet/mono/ironruby-  
mletterle/Runtime/Microsoft.Scripting.Metadata/Microsoft.Scripting.Metadata.csproj  
(default targets) →   
/usr/lib64/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) →

```
    MemoryMapping.V2.cs(16,12): error CS0234: The type or namespace 

```

name  
`Unix' does not exist in the namespace `Mono’. Are you missing an  
assembly  
reference?

```
     1 Warning(s)
     2 Error(s)

```

Looking at the Microsoft.Scripting.\* projects so no reference to Mono  
specific  
libraries (aka Mono.Posix).

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 4:05am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/4 "2010-10-25T04:05:44Z")

</div>

You may have to compile some of the dependency libraries WITHOUT the  
MONO constant…

On Sun, Oct 24, 2010 at 7:10 PM, Alistair B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> does not exist in the namespace `Mono’. Are you missing an assembly reference?  
> targets) →   
> (default targets) →   
> libraries (aka Mono.Posix).
> 
> > > ```
> > > Runtime/SavableScriptCode.cs(40,47): error CS0246: The type or
> > > 
> > > ```
> > > 
> > > missing a using directive or an assembly reference?  
> > > [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
IronRuby MVP

> **[Michael Letterle's Blog ·](https://blog.prokrams.com/)**

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 9:55am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/5 "2010-10-25T09:55:36Z")

</div>

I got it compiling, there is a missing reference for Mono.Posix, one bad  
cast and you need to use CCI in the constants. Does someone know what  
CCI  
should be?

On Mon, Oct 25, 2010 at 1:49 AM, Michael L. \<

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 11:47am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/6 "2010-10-25T11:47:43Z")

</div>

> I got it compiling, there is a missing reference for Mono.Posix, one bad  
> cast and you need to use CCI in the constants. Does someone know what CCI  
> should be?

patches would be nice 🙂

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/7 "2010-10-25T14:13:49Z")

</div>

On Mon, Oct 25, 2010 at 11:23 AM, Alistair B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > I got it compiling, there is a missing reference for Mono.Posix, one bad  
> > cast and you need to use CCI in the constants. Does someone know what CCI  
> > should be?
> 
> patches would be nice 🙂

I can’t patch the csproj with the missing reference because it would  
break  
building on windows. Creating another set of csproj for the a mono build  
would be madness. Do csproj’ects support something like ifdef or is it  
possible to include a reference only when mono is used?

And the other change I made was a one liner, I don’t think that  
attaching an  
entire patch is is really necessary for it. Just run xbuild with CCI:  
xbuild  
/property:TreatWarningsAsErrors=false /property:DefineConstants=“DEBUG  
MONO”  
Ruby.csproj  
and look at the warning outputs… O for god sake, I’ll just attach it.  
I used this branch: [http://github.com/mletterle/ironruby/tree/linux](http://github.com/mletterle/ironruby/tree/linux) as  
the  
base.

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 4:19pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/8 "2010-10-25T16:19:31Z")

</div>

Doing a google search I found this.I have not had a chance to try it out  
maybe this would  
work.[http://groups.google.com/group/DotNetDevelopment/msg/ba5e2bd42ecb83e3](http://groups.google.com/group/DotNetDevelopment/msg/ba5e2bd42ecb83e3)

Date: Mon, 25 Oct 2010 12:31:08 +0200  
From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Ironruby-core] Compiling on Mono?

On Mon, Oct 25, 2010 at 11:23 AM, Alistair B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I got it compiling, there is a missing reference for Mono.Posix, one bad

> cast and you need to use CCI in the constants. Does someone know what CCI

> should be?

patches would be nice 🙂  
I can’t patch the csproj with the missing reference because it would  
break building on windows. Creating another set of csproj for the a mono  
build would be madness. Do csproj’ects support something like ifdef or  
is it possible to include a reference only when mono is used?

And the other change I made was a one liner, I don’t think that  
attaching an entire patch is is really necessary for it. Just run xbuild  
with CCI: xbuild /property:TreatWarningsAsErrors=false  
/property:DefineConstants=“DEBUG MONO” Ruby.csproj  
and look at the warning outputs… O for god sake, I’ll just attach it.  
I used this branch: [http://github.com/mletterle/ironruby/tree/linux](http://github.com/mletterle/ironruby/tree/linux) as  
the base.

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 7:22pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/9 "2010-10-25T19:22:21Z")

</div>

On Mon, Oct 25, 2010 at 2:51 PM, Joe S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Doing a google search I found this.  
> I have not had a chance to try it out maybe this would work.  
> [http://groups.google.com/group/DotNetDevelopment/msg/ba5e2bd42ecb83e3](http://groups.google.com/group/DotNetDevelopment/msg/ba5e2bd42ecb83e3)

It is really possible, I guess I was too lazy to do the search myself,  
thanks for googling 🙂

> possible to include a reference only when mono is used?  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Ironruby-core mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)
> 
> * * *
> 
> Ironruby-core mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

There is just another question, maybe one of the former developers will  
know, why are there 2 build systems now? Why is there a \*.build.csproj  
for  
every \*.csproj? Isn’t that redudant like the suggested rakefiles?

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 5:22pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/10 "2010-10-25T17:22:27Z")

</div>

References in project files can be conditional. I don’t have an example  
handy, but unless things have changed in the last year :), the project  
files should already have a conditional dependency on the Silverlight  
assemblies.

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Andrius  
Bentkus  
Sent: Monday, October 25, 2010 3:31 AM  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Ironruby-core] Compiling on Mono?

On Mon, Oct 25, 2010 at 11:23 AM, Alistair B.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> I got it compiling, there is a missing reference for Mono.Posix, one bad  
> cast and you need to use CCI in the constants. Does someone know what CCI  
> should be?  
> patches would be nice 🙂

I can’t patch the csproj with the missing reference because it would  
break building on windows. Creating another set of csproj for the a mono  
build would be madness. Do csproj’ects support something like ifdef or  
is it possible to include a reference only when mono is used?

And the other change I made was a one liner, I don’t think that  
attaching an entire patch is is really necessary for it. Just run xbuild  
with CCI: xbuild /property:TreatWarningsAsErrors=false  
/property:DefineConstants=“DEBUG MONO” Ruby.csproj  
and look at the warning outputs… O for god sake, I’ll just attach it.  
I used this branch: [http://github.com/mletterle/ironruby/tree/linux](http://github.com/mletterle/ironruby/tree/linux) as  
the base.

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/11 "2010-10-25T22:11:15Z")

</div>

How do we want to handle things that CAN be worked around in Mono  
before they’re patched then?

I agree that the same binaries should run in either location, but Mono  
necessarily is always playing catchup.

Unless we target Mono… \>.\>

On Mon, Oct 25, 2010 at 1:30 PM, Tomas M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Subject: Re: [Ironruby-core] Compiling on Mono?
> 
> would be madness. Do csproj’ects support something like ifdef or is it
> 
> There is just another question, maybe one of the former developers will  
> know, why are there 2 build systems now? Why is there a \*.build.csproj for  
> every \*.csproj? Isn’t that redudant like the suggestedrakefiles?
> 
> * * *
> 
> Ironruby-core mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
IronRuby MVP

> **[Michael Letterle's Blog ·](https://blog.prokrams.com/)**

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 10:41pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/12 "2010-10-25T22:41:20Z")

</div>

Once we’ll have CI server test against Mono we’ll discover the problem  
right away and don’t check in anything that would be broken on Mono.  
I suggest we implement the workaround, file bugs into Mono and IronRuby  
bug trackers, and add a comment to the code with explanation and a link  
to the filed IronRuby bug. When the bug is fixed in Mono we go and  
remove the workaround to keep the code base clean.

Tomas

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/13 "2010-10-25T23:33:21Z")

</div>

On Mon, Oct 25, 2010 at 9:09 PM, Michael L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How do we want to handle things that CAN be worked around in Mono  
> before they’re patched then?

Then it some cases, I think it might make sense to avoid using a  
feature in IR which is not yet available in the current stable release  
of Mono.

Jb

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/14 "2010-10-25T20:57:44Z")

</div>

I think we should not have any #if MONO conditionals. That would mean  
we’d need a different set of binaries for Mono, Moonlight, etc. almost  
doubling the number of flavors we have today (desktop CLR, Silverlight  
4, Silverlight 3).  
Now that Mono 2.8 is released we can use memory mapped files (it wasn’t  
available when I wrote this code). We don’t need to use P/Invokes  
anymore. I have the V4 implementation somewhere almost working so I  
might be able to check it in soon.

Tomas

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Andrius  
Bentkus  
Sent: Monday, October 25, 2010 10:12 AM  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Ironruby-core] Compiling on Mono?

On Mon, Oct 25, 2010 at 2:51 PM, Joe S.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
Doing a google search I found this.  
I have not had a chance to try it out maybe this would work.  
[http://groups.google.com/group/DotNetDevelopment/msg/ba5e2bd42ecb83e3](http://groups.google.com/group/DotNetDevelopment/msg/ba5e2bd42ecb83e3)

It is really possible, I guess I was too lazy to do the search myself,  
thanks for googling 🙂

* * *

Date: Mon, 25 Oct 2010 12:31:08 +0200  
From:  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Ironruby-core] Compiling on Mono?

On Mon, Oct 25, 2010 at 11:23 AM, Alistair B.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> I got it compiling, there is a missing reference for Mono.Posix, one bad  
> cast and you need to use CCI in the constants. Does someone know what CCI  
> should be?  
> patches would be nice 🙂

I can’t patch the csproj with the missing reference because it would  
break building on windows. Creating another set of csproj for the a mono  
build would be madness. Do csproj’ects support something like ifdef or  
is it possible to include a reference only when mono is used?

And the other change I made was a one liner, I don’t think that  
attaching an entire patch is is really necessary for it. Just run xbuild  
with CCI: xbuild /property:TreatWarningsAsErrors=false  
/property:DefineConstants=“DEBUG MONO” Ruby.csproj  
and look at the warning outputs… O for god sake, I’ll just attach it.  
I used this branch: [http://github.com/mletterle/ironruby/tree/linux](http://github.com/mletterle/ironruby/tree/linux) as  
the base.

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Ironruby-core mailing  
list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

* * *

Ironruby-core mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

There is just another question, maybe one of the former developers will  
know, why are there 2 build systems now? Why is there a \*.build.csproj  
for every \*.csproj? Isn’t that redudant like the suggested rakefiles?

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 11:51pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/15 "2010-10-25T23:51:31Z")

</div>

Hey,

On Mon, Oct 25, 2010 at 7:30 PM, Tomas M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I think we should not have any #if MONO conditionals. That would mean we’d  
> need a different set of binaries for Mono, Moonlight, etc. almost doubling  
> the number of flavors we have today (desktop CLR, Silverlight 4, Silverlight  
> 3).
> 
> Now that Mono 2.8 is released we can use memory mapped files (it wasn’t  
> available when I wrote this code). We don’t need to use P/Invokes anymore.  
> I have the V4 implementation somewhere almost working so I might be able to  
> check it in soon.

I completely agree.

Everytime I worked on making IronRuby working on Mono (IronRuby is  
constantly kicking Mono’s tires, which is very good), I used the  
following workflow:

- Avoid any specific Mono branch.
- Fix any path/casing issue directly in the build files (csproj, …)
- If the code compiles with .net’s csc, and doesn’t with Mono, file a  
bug in Mono, and use a code form that works for both, if possible.
- If the code doesn’t compile because of a Mono feature (better unused  
local variable/field detection), fix directly in the source.

It also may happen that IronRuby triggers a bug in Mono, and thus,  
requires Mono from master to compile/work.

Jb

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 25, 2010, 11:34pm UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/16 "2010-10-25T23:34:37Z")

</div>

On Mon, Oct 25, 2010 at 1:09 PM, Michael L. \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> Unless we target Mono… \>.\>

+1

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 26, 2010, 1:15am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/17 "2010-10-26T01:15:26Z")

</div>

Well, some of us don’t need the CI server as we’re programming against  
mono already 😉

FWIW, I’m looking into getting the linux CI server back up and running  
with CJ’s help.

But agreed. I can back out the ifdef I made and just use the work  
around.

Also, should we be targeting a specific version of mono, or just  
trunk? Something else to think about… historically I always used  
trunk to allow mono to “catch up” as far as possible since the  
majority of work was done against .NET… it seems this might be a  
good chance to change that disconnect.

On Mon, Oct 25, 2010 at 4:18 PM, Tomas M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 4, Silverlight 3).
> > 
> > Date: Mon, 25 Oct 2010 12:31:08 +0200
> > 
> > > what CCI should be?  
> > > And the other change I made was a one liner, I don’t think that  
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Ironruby-core mailing  
> > > \*.build.csproj for every \*.csproj? Isn’t that redudant like the  
> > > suggestedrakefiles?  
> > > –  
> > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > > [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
IronRuby MVP

> **[Michael Letterle's Blog ·](https://blog.prokrams.com/)**

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 26, 2010, 12:06am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/18 "2010-10-26T00:06:34Z")

</div>

On Mon, Oct 25, 2010 at 10:18 PM, Tomas M. \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> Once we’ll have CI server test against Mono we’ll discover the problem  
> right away and don’t check in anything that would be broken on Mono.  
> I suggest we implement the workaround, file bugs into Mono and IronRuby bug  
> trackers, and add a comment to the code with explanation and a link to the  
> filed IronRuby bug. When the bug is fixed in Mono we go and remove the  
> workaround to keep the code base clean.

Tracking and removing again would be overhead but I guess there is no  
other  
way to do it.

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 26, 2010, 3:37am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/19 "2010-10-26T03:37:28Z")

</div>

By “target” I meant “do primary development against” 🙂

BTW my branch is updated, I reset to the current master/HEAD so it  
should be a lot cleaner, also undid the mono ifdef, commented out the  
original calls explaining that Mono doesn’t support it yet. Need to  
work on some repos/patches/bug filing for mono now.

On Mon, Oct 25, 2010 at 5:50 PM, Tomas M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

–  
Michael L.  
IronRuby MVP

> **[Michael Letterle's Blog ·](https://blog.prokrams.com/)**

---

<div class="post-metadata">

**Author:** ![Andrius\_Bentkus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Andrius\_Bentkus](https://www.ruby-forum.com/u/Andrius_Bentkus)\
**Post date:** [October 26, 2010, 2:45am UTC](https://www.ruby-forum.com/t/compiling-on-mono/198011/20 "2010-10-26T02:45:31Z")

</div>

We have actually always targeted Mono and IronRuby mostly works on it.  
Of course we found a bunch of Mono bugs for which we either implemented  
a workaround or filed a bug if the workaround would be too convoluted.

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Mike M.  
Sent: Monday, October 25, 2010 1:39 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Compiling on Mono?

On Mon, Oct 25, 2010 at 1:09 PM, Michael L.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
Unless we target Mono… \>.\>

+1

[Next page](https://www.ruby-forum.com/t/compiling-on-mono/198011.md?page=2)
