tomfanning
Posts: 12
Joined: Fri May 25, 2012 1:34 pm

Need a Mono upgrade

Tue Feb 10, 2015 8:01 pm

Just wondering who maintains packages for Raspbian. I use Mono and it looks like I need an upgrade.

Background:

I'm getting the following unhandled (and seemingly uncatchable) exception randomly from the bowels of Mono:

Code: Select all

System.ObjectDisposedException: The object was used after being disposed.
  at System.Threading.WaitHandle.CheckDisposed () [0x00000] in <filename unknown>:0
  at System.Threading.EventWaitHandle.Set () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
  at System.Net.Sockets.Socket+SocketAsyncResult.set_IsCompleted (Boolean value) [0x00000] in <filename unknown>:0
  at System.Net.Sockets.Socket+SocketAsyncResult.Complete () [0x00000] in <filename unknown>:0
  at System.Net.Sockets.Socket+SocketAsyncResult.Complete (System.Exception e) [0x00000] in <filename unknown>:0
  at System.Net.Sockets.Socket+Worker.Connect () [0x00000] in <filename unknown>:0
  at System.Net.Sockets.Socket+Worker.DispatcherCB (System.Net.Sockets.SocketAsyncResult sar) [0x00000] in <filename unknown>:0
My Mono is installed from the Raspbian repo and is version 3.2.8, released 19 Feb 2014.

Code: Select all

Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4+rpi1)
Copyright (C) 2002-2014 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
It seems that this commit fixes the problem, and it seems to be in Mono 3.12.0. However, the latest Mono in Raspbian is the one I'm running, 3.2.8, confirmed by looking at this.

So the question really is, other than compiling Mono on the Pi itself, who decides what version of Mono appears in the Raspbian repo?

Thanks!

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Need a Mono upgrade

Tue Feb 10, 2015 11:41 pm

Wait for WinIoT, or compile it yourself (it's quite easy, just takes a while).

Heater
Posts: 12976
Joined: Tue Jul 17, 2012 3:02 pm

Re: Need a Mono upgrade

Wed Feb 11, 2015 1:39 am

Raspbian is derived from Debian.

Debian is rather slow in adopting new versions of applications. Quite rightly so as new versions of anything often cause things to fail and Debian tries to provide a stable environment.

I'm guessing that Raspbian does actually have newer versions of packages for reasons of getting the thing built and running on the Pi. No idea if that is so for mono.

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

Re: Need a Mono upgrade

Wed Feb 11, 2015 2:17 am

tomfanning wrote:who decides what version of Mono appears in the Raspbian repo?
I do.

In general I strive to keep raspbian as close to Debian as possible, but in extreme cases I may make exceptions.

The versions of mono in Debian wheezy and jessie at the time were unusuable on arm hardfloat (so much so that they stopped building the packages). So I didn't feel too bad about pushing a newer version. So I grabbed 3.2.8 from (at the time) Debian experimental and pushed it into raspbian wheezy and jessie. 3.2.8 Later 3.2.8 moved from experimental to sid to jessie.

3.2.8 is usable in a lot of cases though it does have some nasty bugs (using the windows.forms textbox is basically gauranteed to crash it). As such given that debian jessie will be shipping 3.2.8 I'm very relunctant to push the versions in raspbian wheezy and jessie forward any further. I may be prepared to create a seperate repository with newer mono packages though.

Also I have nowhere near enough knowlage to package a new version of mono from scratch, so any action (whether in the main repo or in a seperate repo) will have to wait until a new version hits at least Debian experimental.

PacmanII
Posts: 1
Joined: Wed Feb 18, 2015 10:20 am

Re: Need a Mono upgrade

Wed Feb 18, 2015 10:35 am

I absolutely agree with tomfanning: we need at least Mono >= 3.4 on the Pi because this is the first version that claims to be fully compatible with armhf (see changelog http://www.mono-project.com/docs/about- ... ses/3.4.0/). I for example encountered some problems parsing doubles with double.Parse() and decimal seperator with german language settings.

However if you don't want to compile Mono yourself there is a deb package of Mono 3.10 available for the Pi:
http://www.htpcguides.com/install-sonar ... -mono-310/

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Need a Mono upgrade

Fri Feb 20, 2015 8:12 pm

PacmanII wrote:I absolutely agree with tomfanning: we need at least Mono >= 3.4 on the Pi because this is the first version that claims to be fully compatible with armhf (see changelog http://www.mono-project.com/docs/about- ... ses/3.4.0/). I for example encountered some problems parsing doubles with double.Parse() and decimal seperator with german language settings.

However if you don't want to compile Mono yourself there is a deb package of Mono 3.10 available for the Pi:
http://www.htpcguides.com/install-sonar ... -mono-310/
You can do a 'frankenbuild' using the One Stop Shop Build Script (Debian) which takes a lot of the effort out of having to compile from just source code.

Krikroff
Posts: 4
Joined: Tue Feb 24, 2015 11:28 pm

Re: Need a Mono upgrade

Tue Feb 24, 2015 11:30 pm

Please push mono 3.12.0 on Raspbian repo :)

Regards,

dobova86
Posts: 66
Joined: Wed Dec 05, 2012 5:32 pm

Re: Need a Mono upgrade

Tue Mar 10, 2015 11:33 am

PacmanII wrote:I absolutely agree with tomfanning: we need at least Mono >= 3.4 on the Pi because this is the first version that claims to be fully compatible with armhf (see changelog http://www.mono-project.com/docs/about- ... ses/3.4.0/). I for example encountered some problems parsing doubles with double.Parse() and decimal seperator with german language settings.

However if you don't want to compile Mono yourself there is a deb package of Mono 3.10 available for the Pi:
http://www.htpcguides.com/install-sonar ... -mono-310/
Hi Pacman, I've tried 3.10 as per your link, but TextBox test still fail. May we need really last release 3.12. I will try compilation on the Pi2

ppumkin
Posts: 82
Joined: Tue May 29, 2012 10:22 pm

Re: Need a Mono upgrade

Thu Mar 12, 2015 10:53 pm

PacmanII wrote:I absolutely agree with tomfanning: we need at least Mono >= 3.4 on the Pi because this is the first version that claims to be fully compatible with armhf (see changelog http://www.mono-project.com/docs/about- ... ses/3.4.0/). I for example encountered some problems parsing doubles with double.Parse() and decimal seperator with german language settings.

However if you don't want to compile Mono yourself there is a deb package of Mono 3.10 available for the Pi:
http://www.htpcguides.com/install-sonar ... -mono-310/
OMG! I was looking and looking, and trying to cross compile with QEMU, and ng tool something, and bought a gcc compiler, and tried various sources, even build my own package on the Pi (which failed for some unknown reason after 6 hours.. dammit)

And viola.. here it is. 3.10 Mono package... thankkkkkk yooouu soo much! :D

ppumkin
Posts: 82
Joined: Tue May 29, 2012 10:22 pm

Re: Need a Mono upgrade

Thu Mar 12, 2015 10:59 pm

Krikroff wrote:Please push mono 3.12.0 on Raspbian repo :)

Regards,
+1

dobova86
Posts: 66
Joined: Wed Dec 05, 2012 5:32 pm

Re: Need a Mono upgrade

Fri Mar 13, 2015 2:15 pm

I grabbed this from very usefull Scott Hanselman site (http://www.hanselman.com) .. :D

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list 
sudo apt-get update && apt-get upgrade 
sudo apt-get install mono-complete
It seems to work ... In case you have previous Mono version installed you prabably need "apt-get dist-upgrade". This will install 3.12.1 on the raspi.

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

Re: Need a Mono upgrade

Fri Mar 13, 2015 2:20 pm

dobova86, can you confirm what distro you are running and whether you are using a pi1 or a pi2?

dobova86
Posts: 66
Joined: Wed Dec 05, 2012 5:32 pm

Re: Need a Mono upgrade

Fri Mar 13, 2015 2:38 pm

Now I'm using PI2, but I've not yet tested if installation and runtime is working fine (it is compiling fine with xbuild). I got a problem and I can't test executable in this moment.
I've a PI also, so can test on there.

Distro Raspbian:

Code: Select all

Linux raspberrypi2 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
On Pi2:
PS:

Code: Select all

[email protected] ~ $ mono --version
Mono JIT compiler version 3.12.1 (tarball Fri Mar  6 23:28:08 UTC 2015)
Copyright (C) 2002-2014 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


dobova86
Posts: 66
Joined: Wed Dec 05, 2012 5:32 pm

Re: Need a Mono upgrade

Sun Mar 15, 2015 7:15 pm

I have tested some WinForm code that doesn't work on Mono 3.2.8 and 3.10, but it's working fine now in 3.12 on PI2 board.
I can't, in this moment, test on a PI1 board becouse I've problem with OS :cry: . Will try tomorrow.

hakanl
Posts: 15
Joined: Tue Jun 26, 2012 4:53 am

Re: Need a Mono upgrade

Mon Mar 23, 2015 7:35 am

In my tests I couldn't use the debian packages for mono 3.12.x on Pi1 because they were built for armv7, and RasPi1 is armv6. It seems our only options at this point are A. use the 3.10 that someone built, or B. build from source (MANY hours).

dobova86
Posts: 66
Joined: Wed Dec 05, 2012 5:32 pm

Re: Need a Mono upgrade

Mon Mar 23, 2015 10:50 am

hakanl wrote:In my tests I couldn't use the debian packages for mono 3.12.x on Pi1 because they were built for armv7, and RasPi1 is armv6. It seems our only options at this point are A. use the 3.10 that someone built, or B. build from source (MANY hours).
Yes, the 3.12 on PI1 is not working, due to wrong binaries. Only on Pi2 it's running fine.

zog
Posts: 200
Joined: Sun Nov 20, 2011 5:43 pm
Contact: Website

Re: Need a Mono upgrade

Sun Jul 19, 2015 10:04 pm

Hi this is a cross post that may be of interest to you mono guys requiring a mono upgrade. I have managed to build mono 4.3 on an rpi2 running jessie as I needed a mono upgrade to run a 3D Printer control program called Repetier Host V1.5.3.

How to do it is within the original post just ignore all the stuff about Repetier Host.

viewtopic.php?f=38&t=105708&p=791212#p791212

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

Re: Need a Mono upgrade

Tue Aug 04, 2015 4:02 am

I'm currently attempting to build mono 4.0.2.5 packages for raspbian (based on the source from Debian expermental). If I get a successful build I will set up a repo for it and make it available (I will NOT be replacing the existing versions of mono in the main raspbian wheezy and jessie repos).

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

Re: Need a Mono upgrade

Tue Aug 04, 2015 7:07 am

Ok, packages are available.

for wheezy:
deb http://plugwash.raspbian.org/mono4 wheezy-mono4 main

for jessie:
deb http://plugwash.raspbian.org/mono4 jessie-mono4 main

Please test and say what works and what doesn't.

signing key is the same as the raspbian repos, so you don't need to add any keys.

gurabli
Posts: 1
Joined: Wed Apr 01, 2015 7:47 am

Re: Need a Mono upgrade

Sun Aug 09, 2015 1:20 am

plugwash wrote:Ok, packages are available.

for wheezy:
deb http://plugwash.raspbian.org/mono4 wheezy-mono4 main

for jessie:
deb http://plugwash.raspbian.org/mono4 jessie-mono4 main

Please test and say what works and what doesn't.

signing key is the same as the raspbian repos, so you don't need to add any keys.
Thanks!
Sorry for the noob question, but how do I install Mono4 using the above? I also don't know if I need wheezy or jessie, as I tend to use both. I'm using Minibian latest atm.

Can you please guide me a little? I added wheezy to source, and installed but the version I got is 3.2.8

Thanks!

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Need a Mono upgrade

Thu Aug 13, 2015 12:24 am

gurabli wrote: Sorry for the noob question, but how do I install Mono4 using the above? I also don't know if I need wheezy or jessie, as I tend to use both. I'm using Minibian latest atm.

Can you please guide me a little? I added wheezy to source, and installed but the version I got is 3.2.8

Thanks!
Try this

Code: Select all

sudo su -
echo "deb http://plugwash.raspbian.org/mono4 wheezy-mono4 main" >> /etc/apt/sources.list
apt-get update
apt-cache search mono-4
mono-4.0-gac - Mono GAC tool (for CLI 4.0)
mono-4.0-service - Mono service manager for CLI 4.0
[email protected]:~#


giova
Posts: 3
Joined: Sat Aug 15, 2015 12:53 am

Re: Need a Mono upgrade

Sat Aug 15, 2015 12:58 am

ok i've installed your release.

I first installed mono-complete
then followed your procedure

All went fine.
I've tested my console app that uses npgsql 2.2.5rc2 and Entity FrameWork 6
All went fine also

So thank you for this release that saved me !

my conf : Raspberry pi2 Rasbian (the release of may 2015)

Krikroff
Posts: 4
Joined: Tue Feb 24, 2015 11:28 pm

Re: Need a Mono upgrade

Wed Aug 19, 2015 12:09 am

plugwash wrote:Ok, packages are available.

for wheezy:
deb http://plugwash.raspbian.org/mono4 wheezy-mono4 main

for jessie:
deb http://plugwash.raspbian.org/mono4 jessie-mono4 main

Please test and say what works and what doesn't.

signing key is the same as the raspbian repos, so you don't need to add any keys.
Thanks i'll try soon :)

hakanl
Posts: 15
Joined: Tue Jun 26, 2012 4:53 am

Re: Need a Mono upgrade

Wed Aug 19, 2015 6:03 pm

I just tested this out on my RPi 1 and it worked really well, now I have latest mono 4 without having to compile it. Thanks a lot!

JPelletier
Posts: 17
Joined: Fri Mar 13, 2015 1:34 pm

Re: Need a Mono upgrade

Tue Oct 20, 2015 5:27 pm

Thanks fore the repo plugwash, it works perfectly on rpi1

Any plan to update to 4.0.4.4 ? I need this fix HttpClient authentication not working from Mono 4.0.4

Return to “Other programming languages”