# Problems compiling IronRuby on Mac Leopard

**URL:** <https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777>\
**Category:** IronRuby\
**Created:** [May 6, 2008, 11:32am UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777 "2008-05-06T11:32:25Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 11:32am UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/1 "2008-05-06T11:32:25Z")

</div>

Hi  
I try to write a little blog article about installing mono and  
ironruby on Mac Leopard from the ground up. It’s a bit a bumpy road  
(especially to get mono build from sources), but I’m almost there.

I’m following these instructions  
[http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/HOWTO](http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/HOWTO)

and work with the latest patch:  
$ patch -p0 \< patch-mono-r94

from here:  
[http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-mono-r94](http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-mono-r94)

but it doesn’t work:  
$ rake compile mono=1

rake aborted!  
cannot resolve path System.dll  
~/mono/compiling/ironruby/rakefile:137  
(See full trace by running task with --trace)

(\* with --trace see below)

What’s needed that the System.dll can be resolved?

Thanks for your help.  
Ben

(\*)  
$ sudo rake compile mono=1 --trace  
(~/mono/compiling/ironruby)  
\*\* Invoke compile (first\_time)  
\*\* Invoke happy (first\_time)  
\*\* Execute happy  
\*\* Invoke clean\_build (first\_time)  
\*\* Invoke happy  
\*\* Execute clean\_build  
\*\* Invoke compile\_dlr (first\_time)  
\*\* Invoke clean\_build  
\*\* Execute compile\_dlr  
rake aborted!  
cannot resolve path System.dll  
./context.rb:90:in `resolve_framework_path' ./context.rb:89:in `each’  
./context.rb:89:in `resolve_framework_path' ./context.rb:130:in `resolve\_framework\_path’  
./context.rb:405:in `resolve_framework_path' ./context.rb:420:in `references’  
./context.rb:418:in `each' ./context.rb:418:in `references’  
./context.rb:434:in `compile' ./context.rb:432:in `chdir’  
./context.rb:432:in `compile' /mono/compiling/ironruby/rakefile:137 ./context.rb:578:in `instance\_eval’  
./context.rb:578:in `source_context' /mono/compiling/ironruby/rakefile:135 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in  
`execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in  
`execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke\_with\_call\_chain’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in  
`synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke\_with\_call\_chain’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in  
`invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in  
`invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke\_with\_call\_chain’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in  
`synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke\_with\_call\_chain’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke\_task’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in  
`top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in  
`top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard\_exception\_handling’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in  
`top_level' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in  
`standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run’  
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31  
/opt/local/bin/rake:16:in `load’  
/opt/local/bin/rake:16

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 12:16pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/2 "2008-05-06T12:16:21Z")

</div>

2008/5/6 Ben A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> What’s needed that the System.dll can be resolved?

You need to have pkg-config correctly configured.

$ pkg-config --variable=libdir mono  
/usr/lib

If you don’t get any output, try setting PKG\_CONFIG\_PATH so that  
pkg-config can find mono.pc.

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/3 "2008-05-06T12:42:24Z")

</div>

that’s my line in ~/.bash\_profile:  
…  
export PKG\_CONFIG\_PATH="/opt/mono/lib/pkgconfig/"  
,…

and this is what I get with  
$ pkg-config --variable=libdir mono

/opt/mono/lib/pkgconfig/…/…/lib

should this be correct - no? What’s wrong here?

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 12:54pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/4 "2008-05-06T12:54:54Z")

</div>

I forgot to mention:

after restarting the shell, I tried it once again:

$ rake compile mono=1  
(in /mono/compiling/ironruby)  
Read in 33 resources from  
‘…/ironruby/src/microsoft.scripting.core/Microsoft.Scripting.txt’  
Writing resource file… Done.

–and than this error (?):  
./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type  
`T' must be a reference type in order to use it as type parameter`T’  
in the generic type or method  
`Microsoft.Scripting.Actions.RuleBuilder<T>'. ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type`T’ must be a reference type in order to use it as type parameter `T' in the generic type or method`Microsoft.Scripting.Actions.RuleBuilder’.

–  
Compilation failed: 2 error(s), 0 warnings  
rake aborted!  
Command failed with status (1): [gmcs  
/out:"/users/shared/xfiles/root/nowit…]  
/mono/compiling/ironruby/rakefile:137

When I now try to run it again I simply get:

$ sudo rake compile mono=1  
rake aborted!  
cannot resolve path System.dll

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 1:29pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/5 "2008-05-06T13:29:23Z")

</div>

2008/5/6 Ben A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> –and than this error (?):  
> ./actions/comdispatch/DispCallable.cs(134,9): error CS0452: The type  
> `T' must be a reference type in order to use it as type parameter `T’  
> in the generic type or method  
> `Microsoft.Scripting.Actions.RuleBuilder<T>'. ./actions/comdispatch/comtypelibdesc.cs(141,9): error CS0452: The type `T’ must be a reference type in order to use it as type parameter `T' in the generic type or method `Microsoft.Scripting.Actions.RuleBuilder'.

This is a recent unrelated error. This problem is reported as Mono bug  
#387040.  
[https://bugzilla.novell.com/show\_bug.cgi?id=387040](https://bugzilla.novell.com/show_bug.cgi?id=387040)

The last working revision is r98. If all you want is to try IronRuby,  
you could update to old revisions.

> When I now try to run it again I simply get:
> 
> $ sudo rake compile mono=1  
> rake aborted!  
> cannot resolve path System.dll

Of course, you are using sudo, which resets the shell environment.  
Therefore, don’t.

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/6 "2008-05-06T14:25:28Z")

</div>

ok, I’m a little confused now. What excactly do I have to do now in  
order to compile it?  
I’m stuck with compiling ironruby.

$ rake compile mono=1  
rake aborted!  
cannot resolve path System.dll

What to do??

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/7 "2008-05-06T13:53:23Z")

</div>

oh I have a script that should do all that.  
i can email it to you if you want.  
I also have that blogpost up that explains everything

> **[Compiling Mono and IronRuby on OSX Leopard - Ivan Porto Carrero](http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/)**
>
> Search form Recent Posts Scalatra 2.2 released Json4s: One AST to rule them all. Typeclass based databinding for scalatra searchable sbt wiki work …

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/8 "2008-05-06T14:27:16Z")

</div>

Ivan, your article was one of the references for my attempt to install  
ironruby on leopard. It would be very nice if you could send me your  
script to removed\_email\_address@domain.invalid  
thanks

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/9 "2008-05-06T14:49:01Z")

</div>

Seo,

As I’ve writte in my 2nd response PKG\_CONFIG\_PATH is set. The question  
is: Is it set correctly and what is the criteria for the correct  
setting?

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 2:32pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/10 "2008-05-06T14:32:10Z")

</div>

2008/5/6 Ben A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> ok, I’m a little confused now. What excactly do I have to do now in  
> order to compile it?

I believe I already answered all your questions. If you have some  
more, please state it.

1. Cannot resolve path System.dll  
Configure pkg-config correctly. Make sure PKG\_CONFIG\_PATH is set. Make  
sure you don’t use sudo, which reset the shell environment.

2. Bizarre CS0452 error from Mono C# compiler  
Mono bug #387040. No solution yet. Downgrade to SVN r98.

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 3:01pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/11 "2008-05-06T15:01:42Z")

</div>

ok I have the reason why it didn’t worked.

on the post of Ivan  
([Compiling Mono and IronRuby on OSX Leopard - Ivan Porto Carrero](http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/))

I copied the line:

export  
PKG\_CONFIG\_PATH=“/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig”

now the path (/usr/local/…) has other exclamation marks than there  
are on my mac.

" (blog)  
" (my mac)

I don’t know if you can see the difference. But fact is that it  
doesn’t work with the “blog marks”.

Does somebody has an explanation for this?

thanks  
Ben

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/12 "2008-05-06T15:16:42Z")

</div>

thanks,  
does that mean, that my terminal don’t know the character set used on  
the website?

On Tue, May 6, 2008 at 3:10 PM, Thibaut Barrère

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 3:12pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/13 "2008-05-06T15:12:30Z")

</div>

> Does somebody has an explanation for this?

The double quote is transformed into mister ”, a nicer yet  
incompatible-with-your-command-line version of itself.

cheers

## Thibaut

[http://blog.logeek.fr](http://blog.logeek.fr) - learning content for developers  
[http://evolvingworker.com](http://evolvingworker.com) - tools for a better day

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 3:24pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/14 "2008-05-06T15:24:25Z")

</div>

if I understand Seo correctly, I _have_ to downgrade in order to  
compile ironruby for mac. There is no other option.

Could somebody tell me the (best) way for downgrading the sources. Can  
I downgrade with SVN the existing sources? If yes - how?  
Or is it better to remove the checked out sources and make a checkout  
again with the specific revision number? Again - how?

thanks for your help

Benh

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/15 "2008-05-06T15:25:36Z")

</div>

> does that mean, that my terminal don’t know the character set used on the  
> website?

If you use the html version on the OS X command line, the variable will  
keep  
the quotes inside the value instead of acting like a string delimiter:

Macintosh:temp thbar$ export  
SOMEVAR="/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig"  
Macintosh:temp thbar$ echo $SOMEVAR  
_“/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig”_

On the other hand, if you use the regular double-quote, you’ll get the  
expected behaviour:

Macintosh:temp thbar$ export  
SOMEVAR="/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig"  
Macintosh:temp thbar$ echo $SOMEVAR  
\*/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig  
\*

hope this helps

– Thibaut

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/16 "2008-05-06T15:29:47Z")

</div>

2008/5/6 Ben A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Could somebody tell me the (best) way for downgrading the sources. Can  
> I downgrade with SVN the existing sources? If yes - how?

Yes. svn update -r 98.

---

<div class="post-metadata">

**Author:** ![ben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@ben](https://www.ruby-forum.com/u/ben)\
**Post date:** [May 6, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/problems-compiling-ironruby-on-mac-leopard/136777/17 "2008-05-06T16:30:43Z")

</div>

thanks,

I always got the error:

svn: Failed to add file ‘web/makefile’: object of the same name already  
exists

I removed web/Makefile, and than it worked …
