techi eth | 26 May 07:26 2015
Picon

Is operator behavior with mono version

Hi,

I am facing one problem while using 'is' operator with mono.When i run my test with mono version(2.10.8) it works fine but when i run with mono (3.2.8) it caught under infinite loop.

I have attached my sample programme for reference.When i run same programme with VisulStudio (2013) it works fine.

Please let me know is this issue fix with any version of mono.
Attachment (Program.cs): text/x-csharp, 1621 bytes
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Cyd Haselton | 24 May 16:47 2015
Picon

Error Building mono On Android: Undefined Ref to mono_threads_core_get_stack_bounds

Second attempt at building on Android with the following configure:

/bld/mono/mono-4.0.0/mono $ ./configure --prefix=/usr/mono --mandir=/usr/share/man --enable-shared --disable-nls --disable-boehm --with-sysroot=/usr/gcc-4.9.2/sysroot --without-x --with-monodroid=yes --with-libgdiplus=no --host=arm-linux-androideabi --target=arm-linux-androideabi --build=arm-linux-androideabi

When configure is done, it displays the following:

mcs source: mcs

Engine:
Host: arm-unknown-linux-androideabi
Target: arm-unknown-linux-androideabi
GC: sgen and Included Boehm GC with typed GC and parallel mark
TLS: pthread
SIGALTSTACK: no
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)

Libraries:
.NET 4.5: yes
MonoDroid: yes
MonoTouch: no
Xamarin.Mac: no
JNI support: IKVM Native
libgdiplus: assumed to be installed
zlib: system zlib


configure: WARNING: Turning off static Mono is a risk


Running make proceeds until failing with the following errors:

../../mono/utils/.libs/libmonoutils.a(mono-threads.o): In function `mono_thread_info_get_stack_bounds':
/bld/mono/mono-4.0.0/mono/utils/mono-threads.c:839: undefined reference to `mono_threads_core_get_stack_bounds'
/usr/gcc-4.9.2/bin/ld: .libs/libmonosgen-2.0.so: hidden symbol `mono_threads_core_get_stack_bounds' isn't defined
/usr/gcc-4.9.2/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Google returns one similar result with the same error but at a different point in the build with an earlier mono version. The thread refers to a later build as the solution.

Any advice would be appreciated
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Neale Ferguson | 21 May 22:20 2015
Picon

Timing/race conditions

Hi,
I have been experiencing some failures with the tests in mono/tests,
particularly in a single core configuration.

Firstly, the sleep test: when the delegated thread is started, the main
thread goes to call the StopWatch start method which requires JITting.
This involves gc interaction as objects are allocated. However, the
delegated thread gets up and starts issuing GC.Collection() calls which
end up occurring every 50 microseconds. This means the main thread never
gets a chance to get out of the allocation phase so never gets to execute
the stopwatch start, thread sleep etc. so the thread never ends. In a
multi-core configuration this is not a problem and the test passes. I
found by inserting a Thread.Yield() as the first method called in the
delegated thread eliminates the problem [1].

Secondly, the xxxxx-exit (e.g. thread-exit) tests will occasionally fail
with an abort due to "suspend_thread suspend took xxx ms, which is more
than the allowed 200 ms” where xxx exceeds 200. This seems to be due to
the exiting thread sometimes not getting to the stage of setting the
thread->state to ThreadState_Stopped in the
ves_icall_System_Environment_Exit() processing within the 200ms time
period. Again, with multiple cores this is not a problem (or the problem
is much rarer). I found by inserting a mono_thread_info_yield() prior to
the suspend_internal_thread() in mono_thread_suspend_all_other_threads()
fixes the problem [2]. I am not sure this is the best option and it’s
still theoretically possible for the problem to still occur depending on
how heavily the system is loaded. I was wondering if the setting of the
state to ThreadState_stopped could be moved earlier in the process rather
than in thread_cleanup() or if there’s another alternative.

While the occasional failure has been experienced with some of the more
pathological tests, the trouble is they happen nearly 100% of the time on
a single core virtual machine, less often on a 2 core but in a virtual
machine environment where there may be 100s of virtual machines competing
for the real cores the probability of failure increases. In addition tests
in the main test suite also have failed for the same reason as described
in the second case.

Neale

[1] Circumvention for case 1 -

--- a/mono/tests/sleep.cs
+++ b/mono/tests/sleep.cs
 <at>  <at>  -13,6 +13,7  <at>  <at>  public class Tests
        public static int test_0_time_drift () {
                // Test the Thread.Sleep () is able to deal with time
drifting due to interrupts
                Thread t = new Thread (delegate () {
+                               Thread.Yield();
                                while (!finished)
                                        GC.Collect ();
                        });

[2] Circumvention for case 2 -

--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c

 <at>  <at>  -3132,6 +3147,8  <at>  <at>  void mono_thread_suspend_all_other_threads (void)
 
                        UNLOCK_THREAD (thread);
 
+                       mono_thread_info_yield ();
+
                        /* Signal the thread to suspend */
                        suspend_thread_internal (thre

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
cyd | 20 May 21:44 2015
Picon

Building from Source Fails with mcs: Command not found

Building mono from downloaded source on an Android device. I ran make
get-monolite-latest and still get the following errors

make[2]: Entering directory `/bld/mono/mono-4.0.0/runtime'
if test -w /bld/mono/mono-4.0.0/mcs; then :; else chmod -R +w
/bld/mono/mono-4.0.0/mcs; fi
cd /bld/mono/mono-4.0.0/mcs && make --no-print-directory -s NO_DIR_CHECK=1
PROFILES='binary_reference_assemblies net_4_5 xbuild_12 xbuild_14 monodroid 
' CC='gcc --sysroot=/usr/gcc-4.9.2/sysroot' all-profiles
make[6]: mcs: Command not found
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.
Illegal instruction
make[8]: *** [build/deps/basic-profile-check.exe] Error 132
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'

I've found what I think is the mcs executable in runtime/_tmpdir/bin, but
copying it to where the build seems to be looking for it doesn't help.

How do I resolve this?

--
View this message in context: http://mono.1490590.n4.nabble.com/Building-from-Source-Fails-with-mcs-Command-not-found-tp4666000.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
techi eth | 20 May 07:02 2015
Picon

Monodevelop & mono version

Hi,

Is their any compatibility matrix for monodevelop & mono version on ubuntu 14.04 ?


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Neale Ferguson | 19 May 16:19 2015
Picon

Token not found

I am trying to determine why I am getting the following abort with the
following message and stack trace. I am after a strategy for shooting the
problem rather than a definitive answer...

Could not find required dynamic token 0x0a000005

#7  0x0000003979832925 in raise () from /lib64/libc.so.6

#8  0x0000003979834105 in abort () from /lib64/libc.so.6

#9  0x0000000000628209 in monoeg_log_default_handler (log_domain=<value
optimized out>, log_level=G_LOG_LEVEL_ERROR,
    message=<value optimized out>, unused_data=<value optimized out>) at
goutput.c:233
#10 0x0000000000628297 in monoeg_g_logv (log_domain=0x0,
log_level=G_LOG_LEVEL_ERROR, format=<value optimized out>,
    args=<value optimized out>) at goutput.c:113
#11 0x00000000006283e3 in monoeg_g_log (log_domain=<value optimized out>,
log_level=<value optimized out>, format=<value optimized out>)
    at goutput.c:123
#12 0x00000000005b6d12 in mono_reflection_lookup_dynamic_token
(image=0x16a4a10, token=167772165, valid_token=1, handle_class=
    0x7fb1867ed4d0, context=0x0) at reflection.c:11877
#13 0x000000000053eff7 in mono_get_method_from_token (image=0x16a4a10,
token=167772165, klass=0x0, context=0x0,
    used_context=<value optimized out>, error=0x7fb1867ed580) at
loader.c:1790
#14 0x000000000053e002 in mono_get_method_checked (image=0x16a4a10,
token=167772165, klass=0x0, context=0x0, error=0x7fb1867ed580)
    at loader.c:1947
#15 0x000000000053f651 in mono_get_method_full (image=<value optimized
out>, token=<value optimized out>, klass=<value optimized out>,
    context=<value optimized out>) at loader.c:1911
#16 0x000000000042997f in mini_get_method_allow_open (cfg=0x7fb174011ca0,
m=<value optimized out>, token=<value optimized out>,
    context=<value optimized out>, klass=0x0) at method-to-ir.c:7144
#17 mini_get_method (cfg=0x7fb174011ca0, m=<value optimized out>,
token=<value optimized out>, context=<value optimized out>, klass=0x0)
    at method-to-ir.c:7153
#18 0x0000000000458668 in mono_method_to_ir (cfg=0x7fb174011ca0,
method="%s:%s ()", start_bblock=0x7fb174014a10, end_bblock=
    0x7fb174014b38, return_var=0x0, inline_args=<value optimized out>,
inline_offset=0, is_virtual_call=0) at method-to-ir.c:8795
#19 0x000000000041bb02 in mini_method_compile (method="%s:%s ()",
opts=370239999, domain=0xcf2d10, flags=<value optimized out>, parts=0)
    at mini.c:5208
#20 0x000000000041d2a1 in mono_jit_compile_method_inner (method="%s:%s
()", opt=370239999, ex=0x7fb1867edfb8) at mini.c:5951
#21 mono_jit_compile_method_with_opt (method="%s:%s ()", opt=370239999,
ex=0x7fb1867edfb8) at mini.c:6230
#22 0x000000000041dd2b in mono_jit_compile_method (method="%s:%s ()") at
mini.c:6267
#23 0x00000000004acb88 in common_call_trampoline (regs=0x7fb1867ee3c8,
code=0x7fb1c8041f5e "A\203\377\377\017\204\020", m="%s:%s ()",
---Type <return> to continue, or q <return> to quit---
    tramp=<value optimized out>, vt=vtable(%s), vtable_slot=<value
optimized out>, need_rgctx_tramp=0) at mini-trampolines.c:590
#24 0x00000000004ad594 in mono_vcall_trampoline (regs=0x7fb1867ee3c8,
code=0x7fb1c8041f5e "A\203\377\377\017\204\020",
    slot=<value optimized out>, tramp=0x4175d05a
"\350\201\356{\377\004\a") at mini-trampolines.c:783
#25 0x0000000040f1c046 in ?? ()
#26 0x00007fb1867ee2a0 in ?? ()
#27 0x0000000041764ddd in ?? ()
#28 0x00007fb1c4b8efc0 in ?? ()
#29 0x00007fb174000bd5 in ?? ()
#30 0x00007fb1c804281b in
System.Runtime.Serialization.Formatters.Binary.ObjectWriter:GetObjectData
(this=
Jonathan Mitchell | 17 May 13:20 2015

Building Mono MDK

I would like to build a 64 bit version of the Mono MDK for OS X.
It looks as if the current Mono OS X release is still 32 bit only.

How do I configure an MDK build?

Thanks

Jonathan
cyd | 17 May 12:24 2015
Picon

Build Mono WITHOUT bash?

Is there a version of the mono source that can be built without bash?

I'm building mono on an Android device in the KBOX environment, which has
the busybox version of bash.  It does not support arrays so when running
make it fails when running ./doltlibtool (at line 4, args=())or
./doltcompile (line 3, args=("$ <at> ")).

Thanks!

--
View this message in context: http://mono.1490590.n4.nabble.com/Build-Mono-WITHOUT-bash-tp4665954.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
Alex J Lennon | 16 May 13:14 2015
Picon

Building 4.0.1.34 release

Hi,

Building the 4.0.1.34 release is erroring on the install step

 /usr/bin/install: cannot stat
'targets/Microsoft.Portable.VisualBasic_4.0.targets': No such file or
directory

Is this to be expected?

Thanks,

Alex
Miguel de Icaza | 12 May 15:50 2015

Re: Patch for Bug 8207: Can't set 1000000 baud with System.IO.Ports.SerialPort.BaudRate

Mono 4.0 branched a long time ago, so it is possible that this is just a side effect of that.

But you can check the patch in git, if the patch is not on the mono 4.0.0 branch, and only in master, it means that it will be part of Mono 4.2

Miguel

On Tue, May 12, 2015 at 4:47 AM, Ariel Rocholl <publico <at> arocholl.com> wrote:

Hi there,

 

I don’t see this included in Mono 4.0, probably misunderstood this one would be merged into 4.0.

 

Do you have a target release where this will be available?


Best Regards,
----
Ariel Rocholl

 

From: mono-devel-list-bounces <at> lists.ximian.com [mailto:mono-devel-list-bounces <at> lists.ximian.com] On Behalf Of Miguel de Icaza
Sent: Wednesday, February 25, 2015 17:45
To: Christian Hofstaedtler
Cc: mono-devel
Subject: Re: [Mono-dev] Patch for Bug 8207: Can't set 1000000 baud with System.IO.Ports.SerialPort.BaudRate

 

Applied, and updated also to support Mac.

 

On Tue, Feb 24, 2015 at 3:45 PM, Christian Hofstaedtler <ch---mono-devel <at> zeha.at> wrote:

This patch (against mono-2.10.8.1 from Debian) allows setting
custom baud rates, and very likely would support a baudrate of
1000000.

I release this patch under the MIT license.


--- serial.c.orig       2013-01-30 12:06:52.379691461 +0100
+++ serial.c.orig       2013-01-30 13:05:50.383390154 +0100
<at> <at> -17,6 +17,11 <at> <at>
 #endif
 #include <sys/ioctl.h>

+/* This is for ASYNC_*, serial_struct on linux */
+#if defined(__linux__)
+#include <linux/serial.h>
+#endif
+
 #include <glib.h>

 /* This is for FIONREAD on solaris */
<at> <at> -151,6 +156,7 <at> <at>
 set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStopBits stopBits, MonoHandshake handshake)
 {
        struct termios newtio;
+       gboolean custom_baud_rate = FALSE;

        if (tcgetattr (fd, &newtio) == -1)
                return FALSE;
<at> <at> -227,8 +233,10 <at> <at>
            break;
        case 50:
        case 0:
-       default:
            baud_rate = B9600;
+           break;
+       default:
+           custom_baud_rate = TRUE;
                break;
        }

<at> <at> -319,16 +327,54 <at> <at>
            newtio.c_iflag |= IXOFF | IXON;
                break;
        }
-
-       if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0 ||
-           tcsetattr (fd, TCSANOW, &newtio) < 0)
+
+       if (custom_baud_rate == FALSE)
        {
-               return FALSE;
+               if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0)
+               {
+                       return FALSE;
+               }
        }
        else
        {
-       return TRUE;
+               /* On Linux, to set a custom baud rate, we must set the "standard" baud_rate
+                * to 38400. */
+               if (cfsetospeed (&newtio, B38400) < 0 || cfsetispeed (&newtio, B38400) < 0)
+               {
+                       return FALSE;
+               }
+       }
+
+       if (tcsetattr (fd, TCSANOW, &newtio) < 0)
+       {
+               return FALSE;
+       }
+
+       if (custom_baud_rate == TRUE)
+       {
+#if defined(__linux__)
+               struct serial_struct ser;
+
+               if (ioctl (fd, TIOCGSERIAL, &ser) < 0)
+               {
+                       return FALSE;
+               }
+
+               ser.custom_divisor = ser.baud_base / baud_rate;
+               ser.flags &= ~ASYNC_SPD_MASK;
+               ser.flags |= ASYNC_SPD_CUST;
+
+               if (ioctl (fd, TIOCSSERIAL, &ser) < 0)
+               {
+                       return FALSE;
+               }
+#else
+               /* Don't know how to set custom baud rate on this platform. */
+               return FALSE;
+#endif
        }
+
+       return TRUE;
 }


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

 


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Angelo Compagnucci | 12 May 10:17 2015
Picon

Recipe for target 'install-frameworks' failed

Hello List,

I'm having trouble cmpiling latest mono 4.0.0 version. Indeed it
double install the FrameworkList.xml but cannot understand very well
why this file should be installe twice.

The error is:

/usr/bin/install -c -c -m 644 frameworks/net_4.5.xml
/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml
/usr/bin/install -c -c -m 644 frameworks/net_4.5.xml
/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml
mkdir -p -- /usr/lib/mono/xbuild/12.0/bin/MSBuild
mkdir -p -- /usr/lib/mono/xbuild/14.0/bin/MSBuild
/usr/bin/install: cannot create regular file
'/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml':
File exists
Makefile:42: recipe for target 'install-frameworks' failed
make[7]: *** [install-frameworks] Error 1

Any advice to share?

Thank you!

--

-- 
Profile: http://it.linkedin.com/in/compagnucciangelo

Gmane