[Mono-dev] Compiling mono? I give up [not proceeding] - if anything obvious i'm doing wrong let me know

Rob Wilkens robwilkens at gmail.com
Tue May 1 11:46:53 UTC 2012


[this reply to list -- my earlier replies were off list, but i figure a 
public 'thanks' was in order..]

Thanks again to all that replied.  I am going to try again today using 
the following:

-i am installing to /home/.../mono -- and i am going to give another 
shot at the git version rather than tarball from apt-get source...  That 
environment setup script looks like it'll be a big help.

-I am going to make sure at minimum mono.addins and gtk-sharp are also 
installed to gac, will probably build them from source if i can, if not 
i'll try a gacutil -i to install binaries.  I just hope i don't get 
bizarre version conflicts like i need 0.6.0.0 of mono.addins and i can 
only find 0.6.2.0 and it won't consider them compatible -- but then 
again, if that's a monodevelop thing, i guess i can always rebuild that 
from source and maybe that will resolve this.


-Rob

On 05/01/2012 05:06 AM, Alan wrote:
> The problem you seem to be hitting is that mono has built and
> installed successfully, but you haven't installed all the required
> support libraries for your project into the GAC of that new mono. This
> is why you cannot find Mono.Addins, or gtk, or anything.
>
> The simplest way to fix this is to build and install all required
> support libraries with the same prefix as your custom mono
> (/usr/local).
>
> The not-so-fast-but-quite-safe way is to use the gacutil app to
> install libraries into the /usr/local gac. For example, you'd do
> something like:  "/usr/local/bin/gacutil -i
> /usr/lib/mono/gac/gtk-sharp/2.0.0_2342342/gtk-sharp.dll" for every
> library you need in your new mono.
>
> The fastest (and most likely to cause problems) way is to just type
> this in your terminal before executing an app with your new mono in
> /usr/local: "export MONO_GAC_PREFIX=/usr". This will make the mono in
> /usr/local/ look for a GAC in "/usr/lib/mono/gac". You may get strange
> type load exceptions using this method.
>
> I should also point out that the core libraries that are part of mono
> itself are not always shareable between different builds of mono.
> mscorlib never is. Any library which invokes native functions in the
> mono native library (libmono.so) is not safe to share. Any pure .NET
> library which does not invoke functions in libmono.so is potentially
> safe, but it is completely unsupported and if you try it and it
> breaks, we will just recommend you compile a clean version and don't
> copy assemblies between different versions of mono.
>
> Alan
>
> On 1 May 2012 09:53, Oskar Berggren<oskar.berggren at gmail.com>  wrote:
>> 2012/5/1 Rob Wilkens<robwilkens at gmail.com>:
>>> [apologies if duplicated - i sent from wrong account at first and don't
>>> think it went through]
>>>
>>> I hate trying to get other people's program's to build properly on a
>>> different computer than it was originally built on/for, but i gave building
>>> mono an honest effort before giving up.  I've been trying different
>>
>> Have you seen this:
>> http://www.mono-project.com/Parallel_Mono_Environments
>>
>> It's what I've been following repeatedly with different mono versions
>> over the last couple of years. Building from released source tar
>> balls.
>>
>> I think one of the key differences compared to how I understand what
>> you've been doing is that you should redirect the install path
>> completely to not mix with any directory commonly used. I.e. för Mono
>> 2.10.8 I used
>>
>> ./configure --prefix=/usr/local/mono-2.10.8
>>
>> Repeat the --prefix clause on every configure script in the same "set"
>> of packages. It will then all install neatly and not corrupt anything.
>> Couple that with a helper script as detailed on the page to setup the
>> correct environment variables, and things seems to work out rather
>> nicely.
>>
>> Also, remember that for everything except libgdiplus and mono itself,
>> you need to be inside the environment created by the script in order
>> for the builds of the remaining packages to build against the intended
>> mono version.
>>
>>
>> I've attached some notes from when I last built mono 2.10, with the
>> configure invocations and expected output I used. At the top a list a
>> number of native dependencies that I was able to satisfy using regular
>> apt-get. I also attach the helper scripts I use to execute mono for
>> this environment - these two files are the only ones that go in
>> /usr/local/bin. After having installed libgdiplus and mono you should
>> be able to do:
>>
>> $ mono210 mono --version
>>
>> and
>>
>> $ source mono210env
>> [mono210]$ mono --version
>>
>>
>> When that is working, you can have a look at remaining packages if you
>> like. Remember to do this from "inside" "source mono210env".
>>
>> /Oskar
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>



More information about the Mono-devel-list mailing list