[Mono-list] Can't get Ahead-Of-Time compilation working

LKeene lionel.keene at gmail.com
Thu Oct 1 16:53:35 EDT 2009


Hmmm. When I try this I'm getting a message "AOT is not available on this
platform". I was trying mono 2.2 on OSX 10.5.8. with Xcode installed. What
are the actual requirements? 

-L



Glenn R. Martin wrote:
> 
> 
> On 01 Oct 2009, at 07:37 , Alex Shulgin wrote:
> 
>> LKeene wrote:
>>> Sorry for being a bother folks, but I'm finding all of this a little
>>> confusing. I'm a "Windows only" guy and I still don't understand  
>>> what the
>>> steps are to perform AOT using Mono on Mac. My app is pure WinForms  
>>> and I'm
>>> running a VS2008-generated binary on the Mono platform when running  
>>> my app
>>> on Linux or OSX. I know next to nothing about OSX / Linux and have  
>>> been
>>> relying on others to install Mono on their machines and run my app  
>>> whenever
>>> I need to test a new build. The Linux performance is good enough  
>>> with JIT,
>>> but the OSX performance is a little slow so I was hoping that AOT  
>>> would help
>>> here. My app is also doing a ton of startup stuff, so AOT would  
>>> hopefully
>>> help there too.
>>>
>>> My understanding is that if I want to make use of the AOT feature,  
>>> I first
>>> precompile the app using "mono --aot -O=all MyApp.exe". Then I  
>>> invoke the
>>> precompiled app via "mono MyApp.exe.so  
>>> SomeCommandLineArgumentMyAppNeeds".
>>> Is all this correct?
>>
>> You get it right, almost.
>>
>> 1. You have to run mono --aot MyApp.exe on OSX once after every update
>> of the .exe file.  This will give you MyApp.exe.so file which is a
>> native OSX binary.
>>
>> 2. After that run your application as usual: mono MyApp.exe (no .so
>> suffix).  If everything worked right, mono will notice that .so file  
>> and
>> use it instead of JIT-ing the .exe assembly.
>>
>>> I'm doing all of my development on a Windows 7 box, but I suppose  
>>> that in
>>> order to perform a full AOT for OSX I need to perform the above  
>>> steps on OSX
>>> which, according to Apple, has Xcode installed by default? Is there  
>>> anything
>>> else that needs to be installed on the OSX box other than Mono  
>>> itself in
>>> order to get this working? I'm really only interested in AOT on  
>>> OSX, not
>>> Linux.
>>
>> I believe you need Xcode to do this.  Other option might be using
>> macports to pull only binutils package, but now that you mention no
>> experience on Linux/OSX your best bet is using Xcode.
> 
> Of note, Xcode is not installed by default, however it is available in  
> full on your OS install/restore disc.
>>
> 
> Glenn R. Martin
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Can%27t-get-Ahead-Of-Time-compilation-working-tp25649921p25706294.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list