plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Fri Aug 16, 2013 3:32 pm

paaland wrote:So any updates on mono yet? In December 2013 there were posts about someone having mono 3 running on hardfp raspbian. And that some guy on honeymoon would package it when he was back. Well that's more than halv a year ago. Still can't see a package anywhere.
The bottom line is that there are various patches floating arround but until/unless debian mono guys integrate them there isn't much I can do. Mono is just too big and hairy for us to go it alone.

I had hoped this would have been resolved long ago but that is the way things go sometimes.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 19317
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspbian vs Wheezy (beta) Mono support

Fri Aug 16, 2013 3:57 pm

maddbomber83 wrote:http://blog.alexrp.com/2013/07/21/recen ... no-on-arm/


The TL;DR of all of the above is:
  • configure.in now respects toolchain configuration with regards to target architecture version and target FPU, and invokes the correct compiler executable to detect this information.
  • Hardware feature detection is now done via the Linux auxiliary vector instead of /proc/cpuinfo, so Mono works under QEMU.
  • Also, ARM version detection is now done on iOS too. A new MONO_VERBOSE_HWCAP environment variable has been added to print hardware feature information.
  • The JIT will now actively make use of a VFP unit even when compiled for systems that don’t have one. This results in significantly better floating point performance on systems that don’t yet use the hard ABI.
  • Mono will now work properly on SMP-capable ARM systems even when compiled for non-SMP architecture versions such as ARM v4 and v5.
  • Just build from the Git master branch to get all of the above.
But what about hard float support?

We (Xamarin) are aware that hard float support in Mono is very important for platforms like the Raspberry Pi and, generally, all new ARM boards.

Hard float support is coming. In fact, I’m working on it as I publish this article, so it shouldn’t take long before it lands in master.
Just out of my own personal interest, what are the specific problems with hardfloat support?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

OtherCrashOverride
Posts: 582
Joined: Sat Feb 02, 2013 3:25 am

Re: Raspbian vs Wheezy (beta) Mono support

Fri Aug 16, 2013 5:49 pm

jamesh wrote:Just out of my own personal interest, what are the specific problems with hardfloat support?
Just like the Pi Foundation, they have to prioritize investments of their time and money. None of their target platforms (they charge money for) currently run with a hard-float ABI. Unlike the Pi Foundation though, Xamarin is not a charity.

The technical issues are the same as faced by any compiler. Like Java, Mono processes a custom bytecode instruction set. This bytecode is Just-In-Time (JIT) compiled at runtime (or Ahead-Of-Time [AOT]) into native op-codes in an executable memory page. Since it is native code that is actually performing operations (not interpreted), it needs to obey the same ABI as the platform. The outstanding issue is teaching the Mono JIT the ARM hard-float ABI calling convention while maintaining the current calling conventions (plural: iOS has a modified standard) for their commercial offerings.

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 21, 2013 12:26 am

Ok time for an update.

The "bad news" is it appears the debian guys never did integrate the sony derived hardfloat support (which as mentioned earlier in this thread could never go upstream). I don't know why this is but I presume it was because porting it to the right versions was too much of a maintenance version.

The good news is that xamarin have been reimplementing hard float support themselves upstream (totally independent of the sony work). That work has recently been included in the mono packages in debian experimental. The first upload failed to build due to symbols file issues*, a second upload has been made with a correction for the symbols files issues and is currently waiting for an autobuilder to build it (experimental is low priority on the autobuilders so this may take a little while).

I will wait until they have a successful build of mono for armhf in experimental then I will look into brining it into raspbian.

* This is common and usually easilly fixed, not a major concern.

emg
Posts: 88
Joined: Wed Jan 11, 2012 11:01 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 21, 2013 9:39 am

Thanks for keeping track of this. I thought this was a lost cause...

User avatar
bfagioli
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 21, 2013 8:25 pm

Sounds very encouraging. Thanks.

bluespot
Posts: 6
Joined: Fri Nov 30, 2012 4:59 pm

Re: Raspbian vs Wheezy (beta) Mono support

Thu Dec 26, 2013 2:40 pm

By following instructions in https://bugzilla.xamarin.com/show_bug.cgi?id=7938, I succeeded to install Mono on my RPI. Although compilation took around 10 hours... I'm actually working on a small ASP.NET website and it runs beautifully.

Code: Select all

b@raspberrypi ~ $ mono -V
Mono Runtime Engine version 3.2.7 (master/1dcee20 Sat Dec 14 21:35:17 CET 2013)
Copyright (C) 2002-2013 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       normal
	Notifications: epoll
	Architecture:  armel,vfp+hard
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
b@raspberrypi ~ $ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> DateTime.Now.ToString()   
"26/12/2013 15:38:34"

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Fri Dec 27, 2013 11:32 pm

I gave up waiting for the debian autobuilders to build the pacakge in experimental and just tried building the package in raspbian wheezy.

First I tried just rebuilding the arch specific packages, the build suceeded but then I discovered that the arch all packages also had picked up dependencies that were too new, so I did a full build with the arch all packages as well. That build also succeeded and I'm now testing if I can install the resulting packages successfully. Once I do get them installed I will then test if the original problem is fixed and assuming it is I'll push the packages into raspbian wheezy and jessie.

User avatar
bfagioli
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm

Re: Raspbian vs Wheezy (beta) Mono support

Fri Dec 27, 2013 11:38 pm

Wonderful progress. Please continue with your great work. I can do some testing ... If that is helpful.

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Fri Dec 27, 2013 11:56 pm

emg wrote:Mike,
Here is a small VB application that will generate the error. I use the file transfer feature of UVNC or TightVNC to copy the file to the Pi.
I've just tried to run this app with the mono 3.2 that I just built and I got the following.

root@plugwash:/mono# mono test.exe
The entry point method could not be loaded
root@plugwash:/mono#

Is this the expected behaviour?

Does anyone else have any other testcases I can try? (ideally something I can build from source and then run with the new mono?)

emg
Posts: 88
Joined: Wed Jan 11, 2012 11:01 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 9:08 am

plugwash wrote:
emg wrote:Mike,
Here is a small VB application that will generate the error. I use the file transfer feature of UVNC or TightVNC to copy the file to the Pi.
I've just tried to run this app with the mono 3.2 that I just built and I got the following.

root@plugwash:/mono# mono test.exe
The entry point method could not be loaded
root@plugwash:/mono#

Is this the expected behaviour?

Does anyone else have any other testcases I can try? (ideally something I can build from source and then run with the new mono?)
Hi Plugwash, OP here.I wrote the test.exe. Your result is not expected. It should pop up with a simple 'Hello World' message box. You can see the expected behaviour by running on a soft float version. Have you added VB support to Mono? (I cant remember the packages to add, sorry).

bluespot
Posts: 6
Joined: Fri Nov 30, 2012 4:59 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 2:02 pm

Indeed I didn't knew that VB.Net is a separate module. It needs to be compiled from https://github.com/mono/mono-basic.

What I've tested from a X11 console on my RPI, it does work like a charm :
HelloWorld_Result.png
HelloWorld_Result.png (49.55 KiB) Viewed 4745 times
PS : I can provide the Mono compiled sources via Dropbox if there is an interest.

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 2:37 pm

Thanks for the hint, I installed libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil and libmono-microsoft-visualbasic8.0-cil and test.exe worked successfully.

Note: so far i've been testing on an imx53 board, I need to run some tests on an actual Pi and assuming they pass I will move on to trying to push the new mono into the repo.

User avatar
bfagioli
Posts: 123
Joined: Sat Oct 27, 2012 11:49 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 3:14 pm

One problem we have been seeing with mono is that the DataTime class does not report the correct data. You can test to see if this is now fixed by using the 'csharp' mono tool. Simply run csharp and you will get a 'csharp>' command line prompt where you can type C# lines of code.
If you enter the following:

Code: Select all

DateTime.Now.ToString();
It should print a valid looking date and time. Something like this:

Code: Select all

12/28/2013 10:04:16 AM
If you see a date that looks odd or something like this then -- its still broken

Code: Select all

735203/00/0001

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 3:28 pm

Already checked that one and yes it's fixed (at least on my mx53, haven't tested on the Pi yet).

bluespot
Posts: 6
Joined: Fri Nov 30, 2012 4:59 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 3:32 pm

I also confirm that DateTime bug is fixed, see my post http://www.raspberrypi.org/forum/viewto ... 24#p474724

User avatar
simonmcc
Posts: 174
Joined: Mon Aug 19, 2013 10:07 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sat Dec 28, 2013 9:42 pm

bluespot wrote:By following instructions in https://bugzilla.xamarin.com/show_bug.cgi?id=7938, I succeeded to install Mono on my RPI. Although compilation took around 10 hours... I'm actually working on a small ASP.NET website and it runs beautifully.

Code: Select all

b@raspberrypi ~ $ mono -V
Mono Runtime Engine version 3.2.7 (master/1dcee20 Sat Dec 14 21:35:17 CET 2013)
Copyright (C) 2002-2013 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       normal
	Notifications: epoll
	Architecture:  armel,vfp+hard
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
b@raspberrypi ~ $ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> DateTime.Now.ToString()   
"26/12/2013 15:38:34"
I got the compile to work using the same simple instructions, but the sudo make install failed on my 4GB card because it ran out of space. Just a FYI to anyone trying to do the same.
simonmcc.blogspot.com/search/label/pi

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 12:22 am

I've just run tests on the Pi and I was able to successfully do the datetime test, successfully run the test.exe mentioned near the start of this thread and successfully run monodevelop (though I didn't actually try to do anything with it once loaded).

I count that as enough of a success to push this to the repo. That may take some work though because of differences between the mono 2.10.x packaging and the mono 3.2.x packaging.

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 1:04 am

Ok the new mono is in the private wheezy repo, it should hit the public repo on the next mirror run.

bluespot
Posts: 6
Joined: Fri Nov 30, 2012 4:59 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 8:21 am

simonmcc wrote:I got the compile to work using the same simple instructions, but the sudo make install failed on my 4GB card because it ran out of space. Just a FYI to anyone trying to do the same.
Sorry to hear it. I did the compilation on the USB external disk drive in order to speed it a bit up. The installation didn't bring any problems with my 32GB card.
plugwash wrote:Ok the new mono is in the private wheezy repo, it should hit the public repo on the next mirror run.
Excellent news, thank you so much. How long it will take to propagate into the public repo ?

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 10:57 am

It should have happened in the early hours of this morning but the update run failed. I've just made some tweaks and hopefully it should go through in the next hour or so.

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 11:49 am

It's gone through now.

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 11:51 am

By public repo do you mean the source repo or an install package?

plugwash
Forum Moderator
Forum Moderator
Posts: 3238
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 11:59 am

I mean the main raspbian package repository

bluespot
Posts: 6
Joined: Fri Nov 30, 2012 4:59 pm

Re: Raspbian vs Wheezy (beta) Mono support

Sun Dec 29, 2013 3:05 pm

I've installed Mono from the repository, but I've got this following error when I'm attempting to launch xsp4 :

Code: Select all

Missing method System.Configuration.IConfigurationSectionHandler::Create(object,object,XmlNode) in assembly /usr/lib/mono/4.0/System.dll, referenced in assembly /usr/lib/mono/4.0/System.Configuration.dll
Exception caught during reading the configuration file:
System.MissingMethodException: Method not found: 'System.Configuration.IConfigurationSectionHandler.Create'.
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.get_AppSettings () [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server+ApplicationSettings..ctor () [0x00000] in <filename unknown>:0 
xsp4
Listening on address: 0.0.0.0
Root directory: /testWebSite
Listening on port: 8080 (non-secure)
Hit Return to stop the server.

Missing method System.Configuration.ConfigurationProperty::.ctor(string,Type,object,TypeConverter,ConfigurationValidatorBase,ConfigurationPropertyOptions) in assembly /usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll, referenced in assembly /usr/lib/mono/4.0/System.Web.dll
Exception during TraceManager initialization:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Web.Configuration.TraceSection ---> System.MissingMethodException: Method not found: 'System.Configuration.ConfigurationProperty..ctor'.
  --- End of inner exception stack trace ---
  at System.Web.TraceManager..ctor () [0x00000] in <filename unknown>:0 

EDIT : it appears that mono-xsp4 is still in 2.10, as shown here :

Code: Select all

xsp4.exe 2.10.0.0
Copyright (C) 2002-2010 Novell, Inc.
Minimalistic web server for testing System.Web
Could you please update the corresponding packages for mono-xsp, mono-fastcgi-server ?

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 8 guests