Re: [Mono-dev] Shutdown hangs

2016-07-12 Thread Chris Swiedler
Switching to mono 4.0.5 seems a little better, but the problem (or a similar 
problem) is still there, and I get segfaults and other problems with 4.0.

Does anyone have any suggestions for brute-force ways to fix this problem? 
E.g., can I modify ves_icall_System_Environment_Exit or similar to just call 
exit()? I haven't looked at the code but from the call stacks it seems like 
this happens in an attempt to make an orderly shutdown of threads. While that 
would be nice, it's much more important to me for the application to actually 
exit. If I have to, I'll make the process kill itself with SIGKILL, but I'd 
rather not since then I lose the actual exit code.

chris

-Original Message-
From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Chris Swiedler
Sent: Monday, June 13, 2016 9:55 AM
To: mono-devel-list <mono-devel-list@lists.ximian.com>
Subject: [Mono-dev] Shutdown hangs

I'm getting semi-reliable shutdown hangs in a mono command-line app using mono 
4.2.3 on Centos 7 64-bit. The app does different things at different times, and 
the shutdowns only seem to happen when it connects to our SQL server database 
(using the Mono database bindings, not ODBC). We've also seen an occasional 
segfault, also seemingly only when doing database work, though those may have 
gone away since upgrading to 4.2.3.

Does anyone have any thoughts? Pstack output below.

Thanks,
chris


Thread 5 (Thread 0x7f4c777ff700 (LWP 11658)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x005f786c in thread_func (thread_data=0x0) at 
sgen-thread-pool.c:118
#2  0x7f4c77ffedf5 in start_thread (arg=0x7f4c777ff700) at 
pthread_create.c:308
#3  0x7f4c77d2c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7f4c75560700 (LWP 11659)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=sem@entry=0x953c40 
, alertable=alertable@entry=1) at mono-semaphore.c:107
#2  0x005a1736 in finalizer_thread (unused=) at gc.c:1096
#3  0x005841e9 in start_wrapper_internal (data=) at 
threads.c:725
#4  start_wrapper (data=) at threads.c:772
#5  0x00621026 in inner_start_thread (arg=0x7fffda0d42e0) at 
mono-threads-posix.c:97
#6  0x7f4c77ffedf5 in start_thread (arg=0x7f4c75560700) at 
pthread_create.c:308
#7  0x7f4c77d2c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7f4c74fd3700 (LWP 11660)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=sem@entry=0x7f4c68000940, 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x0061f5ba in mono_thread_info_wait_for_resume (info=) at mono-threads.c:110
#3  mono_thread_info_end_self_suspend () at mono-threads.c:692
#4  0x00583d2c in self_suspend_internal (thread=0x7f4c78a74330) at 
threads.c:4546
#5  mono_thread_execute_interruption (thread=thread@entry=0x7f4c78a74330) at 
threads.c:4050
#6  0x00583f50 in mono_thread_interruption_checkpoint_request 
(bypass_abort_protection=bypass_abort_protection@entry=1) at threads.c:4184
#7  0x00584dae in mono_thread_force_interruption_checkpoint () at 
threads.c:4221

Thread 2 (Thread 0x7f4c746ff700 (LWP 11661)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=sem@entry=0x7f4c6c000940, 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x0061f5ba in mono_thread_info_wait_for_resume (info=) at mono-threads.c:110
#3  mono_thread_info_end_self_suspend () at mono-threads.c:692
#4  0x00583d2c in self_suspend_internal (thread=0x7f4c78a74430) at 
threads.c:4546
#5  mono_thread_execute_interruption (thread=thread@entry=0x7f4c78a74430) at 
threads.c:4050
#6  0x005851f9 in ves_icall_System_Threading_Thread_Sleep_internal 
(ms=1000) at threads.c:1206
#17 0x7f4c756fa2e7 in System_Threading_Thread_Sleep_int 
(millisecondsTimeout=1000) at 
/home/cswiedler/mono-main/Extern/mono/source/external/referencesource/mscorlib/system/threading/thread.cs:715

Thread 1 (Thread 0x7f4c78b34780 (LWP 11657)):
#0  0x7f4c7800599d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00632a5a in monoeg_g_usleep (microseconds=1935890) at 
gdate-unix.c:53
#2  0x0061f2bb in suspend_sync_nolock (id=id@entry=139966347736832, 
interrupt_kernel=interrupt_kernel@entry=1) at mono-threads.c:870
#3  0x0061f732 in mono_thread_info_safe_suspend_and_run 
(id=139966347736832, interrupt_kernel=interrupt_kernel@entry=1, 
callback=callback@entry=0x5813c0 , 
user_data=user_data@entry=0x7fffda0d3a10) at mono-threads.c:891
#4  0x00581d29 in suspend_thread_internal (thread=0x7f4c78a74430, 
interrupt=1) at threads.c:4531
#5  0x00

Re: [Mono-dev] Shutdown hangs

2016-07-08 Thread Chris Swiedler
I've switched to 4.0.5, and the hangs are less frequent (though they still 
happen). Now, though, we're getting this shutdown crash. Is it possibly fixed 
by a later patch?

Full stack attached. Short version:

sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
85movq  %rax, %rcx
Id   Target Id Frame
14   Thread 0x7f7d3726b700 (LWP 19847) "Finalizer" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
13   Thread 0x7f7d279cc700 (LWP 19882) "Threadpool moni" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
12   Thread 0x7f7d2757d700 (LWP 19890) "IO Threadpool w" 0x7f7d3de26cd9 in 
__libc_waitpid (pid=pid@entry=24339, stat_loc=stat_loc@entry=0x7f7d2753c19c, 
options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
11   Thread 0x7f7d268ff700 (LWP 19903) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
10   Thread 0x7f7d25dfe700 (LWP 19916) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
9Thread 0x7f7d26d7a700 (LWP 19920) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
8Thread 0x7f7cf79e3700 (LWP 19940) "hydrogen_main" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
7Thread 0x7f7cf77e2700 (LWP 19941) "Timer-Scheduler" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
6Thread 0x7f7cf6dff700 (LWP 19951) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
5Thread 0x7f7cf5bfd700 (LWP 19967) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
4Thread 0x7f7cf59fc700 (LWP 19971) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
3Thread 0x7f7cf57fb700 (LWP 19978) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
2Thread 0x7f7cf55fa700 (LWP 19980) "Threadpool work" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 1Thread 0x7f7d3e955780 (LWP 19843) "LobbyServer" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
...
Thread 1 (Thread 0x7f7d3e955780 (LWP 19843)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061def7 in mono_sem_wait (sem=sem@entry=0x7f7d04000970, 
alertable=alertable@entry=0) at mono-semaphore.c:101
#2  0x006230ca in mono_threads_core_suspend 
(info=info@entry=0x7f7d040008e0, interrupt_kernel=interrupt_kernel@entry=1) at 
mono-threads-posix.c:418
#3  0x00622513 in mono_thread_info_suspend_sync (error_condition=, 
interrupt_kernel=1, tid=140175507707648) at mono-threads.c:474
#4  mono_thread_info_safe_suspend_sync (id=140175507707648, 
interrupt_kernel=interrupt_kernel@entry=1) at mono-threads.c:652
#5  0x00589705 in suspend_thread_internal (thread=0x7f7d37312940, 
interrupt=1) at threads.c:4707
#6  0x00589bdd in mono_thread_suspend_all_other_threads () at 
threads.c:3142
#7  0x0053c0f6 in ves_icall_System_Environment_Exit (result=0) at 
icall.c:6471

-Original Message-
From: David Evans [mailto:dev...@pacificbiosciences.com] 
Sent: Monday, June 13, 2016 12:40 PM
To: Chris Swiedler <cswied...@trionworlds.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: RE: Shutdown hangs

I saw something similar when I was testing 4.2.2 awhile back, a rare hang on 
Exit with the main thread waiting like yours. I haven't tried 4.2.3 to see if 
our hang reproduces yet. We're still on 4.0.4 and we don't see it there.

In the hang we saw, I also had one thread in pthread_cond_wait like yours, 
though we had two threads also in poll() with 
libusb_handle_events_timeout_completed () further up the stack.

(gdb) info threads
  Id   Target Id Frame
  16   Thread 0x7f5eb0bff700 (LWP 2763) "mono" pthread_cond_wait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  15   Thread 0x7f5eae7e1700 (LWP 2765) "Finalizer" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  14   Thread 0x7f5ead26b700 (LWP 2784) "Timer-Scheduler" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
 13   Thread 0x7f5eacf2f700 (LWP 2806) "Top" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  12   Thread 0x7f5eacd2a700 (LWP 2807) "Top" 0x7f5eb1b48b9d in nanosleep 
() at ../sysdeps/unix/syscall-template.S:81
  11   Thread 0x7f5e8e07b700 (LWP 2840) "Top" sem_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 10   Thread 0x7f5e72fa5700 (LWP 2980) "Top" 0x7f5eb186112d in poll () at 
../sysdeps/unix/syscall-template.S:81
  9Thread 0x7f5e727a4700 (LWP 2981) "Top

Re: [Mono-list] Mono C# Console Application dies unexpectedly every ~20 minuts

2016-06-14 Thread Chris Swiedler
What is the exit code of the process? If it's in the 128-150 range then it's 
receiving a signal.

chris

-Original Message-
From: mono-list-boun...@lists.ximian.com 
[mailto:mono-list-boun...@lists.ximian.com] On Behalf Of akurilo
Sent: Tuesday, June 14, 2016 10:23 AM
To: mono-list@lists.ximian.com
Subject: [Mono-list] Mono C# Console Application dies unexpectedly every ~20 
minuts

Hi, i've developed an application for raspberry pi (wheezy) using C# .Net it 
has a lot of code and about 5 active threads all the time, i've set up event 
handlers for ExitProcess, UnhandeledException, whatever events, but every 20 
minutes my app dies with no warning or any message.

I've spent hours trying to find any information about how the app died, but 
haven't found anything in system logs. So i'm wondering if someone knows about 
if mono can kill the process by some reason.

P.S. My process uses 2.5% of memory and ususally no CPU. It has an infinity 
while loop where it does all the mess, but it doesn't seem to be reason why it 
should be killed.

Thanks



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-Console-Application-dies-unexpectedly-every-20-minuts-tp4667992.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com 
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-dev] Shutdown hangs

2016-06-13 Thread Chris Swiedler
I'm getting semi-reliable shutdown hangs in a mono command-line app using mono 
4.2.3 on Centos 7 64-bit. The app does different things at different times, and 
the shutdowns only seem to happen when it connects to our SQL server database 
(using the Mono database bindings, not ODBC). We've also seen an occasional 
segfault, also seemingly only when doing database work, though those may have 
gone away since upgrading to 4.2.3.

Does anyone have any thoughts? Pstack output below.

Thanks,
chris


Thread 5 (Thread 0x7f4c777ff700 (LWP 11658)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x005f786c in thread_func (thread_data=0x0) at 
sgen-thread-pool.c:118
#2  0x7f4c77ffedf5 in start_thread (arg=0x7f4c777ff700) at 
pthread_create.c:308
#3  0x7f4c77d2c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7f4c75560700 (LWP 11659)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=sem@entry=0x953c40 
, alertable=alertable@entry=1) at mono-semaphore.c:107
#2  0x005a1736 in finalizer_thread (unused=) at gc.c:1096
#3  0x005841e9 in start_wrapper_internal (data=) at 
threads.c:725
#4  start_wrapper (data=) at threads.c:772
#5  0x00621026 in inner_start_thread (arg=0x7fffda0d42e0) at 
mono-threads-posix.c:97
#6  0x7f4c77ffedf5 in start_thread (arg=0x7f4c75560700) at 
pthread_create.c:308
#7  0x7f4c77d2c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7f4c74fd3700 (LWP 11660)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=sem@entry=0x7f4c68000940, 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x0061f5ba in mono_thread_info_wait_for_resume (info=) at mono-threads.c:110
#3  mono_thread_info_end_self_suspend () at mono-threads.c:692
#4  0x00583d2c in self_suspend_internal (thread=0x7f4c78a74330) at 
threads.c:4546
#5  mono_thread_execute_interruption (thread=thread@entry=0x7f4c78a74330) at 
threads.c:4050
#6  0x00583f50 in mono_thread_interruption_checkpoint_request 
(bypass_abort_protection=bypass_abort_protection@entry=1) at threads.c:4184
#7  0x00584dae in mono_thread_force_interruption_checkpoint () at 
threads.c:4221

Thread 2 (Thread 0x7f4c746ff700 (LWP 11661)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=sem@entry=0x7f4c6c000940, 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x0061f5ba in mono_thread_info_wait_for_resume (info=) at mono-threads.c:110
#3  mono_thread_info_end_self_suspend () at mono-threads.c:692
#4  0x00583d2c in self_suspend_internal (thread=0x7f4c78a74430) at 
threads.c:4546
#5  mono_thread_execute_interruption (thread=thread@entry=0x7f4c78a74430) at 
threads.c:4050
#6  0x005851f9 in ves_icall_System_Threading_Thread_Sleep_internal 
(ms=1000) at threads.c:1206
#17 0x7f4c756fa2e7 in System_Threading_Thread_Sleep_int 
(millisecondsTimeout=1000) at 
/home/cswiedler/mono-main/Extern/mono/source/external/referencesource/mscorlib/system/threading/thread.cs:715

Thread 1 (Thread 0x7f4c78b34780 (LWP 11657)):
#0  0x7f4c7800599d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00632a5a in monoeg_g_usleep (microseconds=1935890) at 
gdate-unix.c:53
#2  0x0061f2bb in suspend_sync_nolock (id=id@entry=139966347736832, 
interrupt_kernel=interrupt_kernel@entry=1) at mono-threads.c:870
#3  0x0061f732 in mono_thread_info_safe_suspend_and_run 
(id=139966347736832, interrupt_kernel=interrupt_kernel@entry=1, 
callback=callback@entry=0x5813c0 , 
user_data=user_data@entry=0x7fffda0d3a10) at mono-threads.c:891
#4  0x00581d29 in suspend_thread_internal (thread=0x7f4c78a74430, 
interrupt=1) at threads.c:4531
#5  0x005834ff in mono_thread_suspend_all_other_threads () at 
threads.c:3154
#6  0x00538176 in ves_icall_System_Environment_Exit (result=0) at 
icall.c:6006
#7  0x40731832 in ?? ()
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] High threadpool CPU usage

2016-06-03 Thread Chris Swiedler
Well, looking at some pstack+top output, I’m not sure it’s GC anymore. I ran 
pstack and top as close to simultaneously as I could, and the high-cpu threads 
were just in pthread_cond_timedwait. Is it possible we get into a scenario 
where mono_cond_timedwait_ms is sleeping with a timeout_ms that's extremely 
short? Is there an easy way to force the compiler (#pragma or something?) to 
not optimize out the timeout_ms value? I'd rather not build all of mono with 
optimizations off, but I could disable optimizations for a few files.

chris

  PID USER  PR  NIVIRTRESSHR S %CPU %MEM TIME+ COMMAND
17369 hydrogen  20   0 6491744 157928  17216 S 53.3  0.1   0:05.08 Threadpool 
work
17385 hydrogen  20   0 6491744 157928  17216 S 46.7  0.1   0:09.38 Threadpool 
work

Thread 8 (Thread 0x7f52c65fc700 (LWP 17369)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00618817 in mono_cond_timedwait_ms 
(cond=cond@entry=0x7f52c65fbdc0, mutex=0x2887808, timeout_ms=) 
at mono-mutex.c:181
#2  0x00586f28 in worker_park () at threadpool-ms.c:509

Thread 4 (Thread 0x7f528a7fe700 (LWP 17385)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00618817 in mono_cond_timedwait_ms 
(cond=cond@entry=0x7f528a7fddc0, mutex=0x2887808, timeout_ms=) 
at mono-mutex.c:181
#2  0x00586f28 in worker_park () at threadpool-ms.c:509

From: Rodrigo Kumpera [mailto:kump...@gmail.com] 
Sent: Friday, May 27, 2016 5:07 PM
To: Chris Swiedler <cswied...@trionworlds.com>
Cc: Ludovic Henry <ludo...@xamarin.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] High threadpool CPU usage

Chris,

Can you at least enable GC logging? That will tell you how frequently and for 
how long the collector is running.

On Fri, May 27, 2016 at 11:04 AM, Chris Swiedler <cswied...@trionworlds.com> 
wrote:
Thanks. I’ll try to use the profiler, but this problem doesn’t happen at 
startup, and running the application under profiling for eight hours is 
probably infeasible.
 
I see that at one point mono support signal-based enabling/disabling of the 
profiler, like how SIGUSR2 toggles the trace mechanism on and off. Is that sort 
of functionality ever going to be re-added? Currently there’s the heapshot 
option via the TCP listener, perhaps there could be enable/disable commands via 
that mechanism?
 
chris
 
From: Ludovic Henry [mailto:ludo...@xamarin.com] 
Sent: Friday, May 27, 2016 1:27 AM

To: Chris Swiedler <cswied...@trionworlds.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] High threadpool CPU usage
 
Hi Chris,
 
The signal handler you are seeing is the GC signalling every thread to suspend 
them. So yes you are right, that's the sgen collector stopping the world.
 
To track down the large number of allocation, I would encourage you to try the 
log profiler (documentation: 
http://www.mono-project.com/docs/debug+profile/profile/profiler/ ). That should 
give you some more insights in where the allocations are coming from.
 
Thank you,
Ludovic
 
On Thu, May 26, 2016 at 8:20 PM Chris Swiedler <cswied...@trionworlds.com> 
wrote:
Thanks, Ludovic. I’m using mono-4.2.3. The ‘massive amounts of GC’ idea makes 
sense based on what I’m seeing. When I run pstack, I get a number of threadpool 
threads in stacks with:
 
#0  0x7fdff1c6a952 in do_sigsuspend (set=0x954220 ) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:32
#1  __GI___sigsuspend (set=set@entry=0x954220 ) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:46
#2  0x005c7534 in suspend_thread (info=0x7fdf480008c0, 
context=context@entry=0x7fde997ea1c0) at sgen-os-posix.c:126
#3  0x005c771f in suspend_handler (_dummy=, 
_info=, context=0x7fde997ea1c0) at sgen-os-posix.c:153
#4  
 
I thought this was related to GDB / pstack attaching, but it’s actually the 
suspend handling for the sgen collector, right? 
 
Is a thread suspending itself CPU-intensive? I see lots of threads with high 
CPU at any point, which seems to indicate that this wouldn’t just be the CPU 
usage of the collector thread itself.
 
Do you have any suggestions for how to track down the large numbers of 
allocations? This isn’t very easy to reproduce, but now that I know what to 
look for, I might be able to get it to happen in a test environment.
 
chris
 
From: Ludovic Henry [mailto:ludo...@xamarin.com] 
Sent: Thursday, May 26, 2016 8:43 AM
To: Chris Swiedler <cswied...@trionworlds.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] High threadpool CPU usage
 
Hi Chris,
 
The first stacktrace you are observing is for threadpool thread parking. We use 
this technique for threads that are currently not doing anything, to keep them 
around for a little while (5-60 seconds) so if we have burst of usage, we do 
n

Re: [Mono-dev] High threadpool CPU usage

2016-05-27 Thread Chris Swiedler
Thanks. I’ll try to use the profiler, but this problem doesn’t happen at 
startup, and running the application under profiling for eight hours is 
probably infeasible.

I see that at one point mono support signal-based enabling/disabling of the 
profiler, like how SIGUSR2 toggles the trace mechanism on and off. Is that sort 
of functionality ever going to be re-added? Currently there’s the heapshot 
option via the TCP listener, perhaps there could be enable/disable commands via 
that mechanism?

chris

From: Ludovic Henry [mailto:ludo...@xamarin.com]
Sent: Friday, May 27, 2016 1:27 AM
To: Chris Swiedler <cswied...@trionworlds.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] High threadpool CPU usage

Hi Chris,

The signal handler you are seeing is the GC signalling every thread to suspend 
them. So yes you are right, that's the sgen collector stopping the world.

To track down the large number of allocation, I would encourage you to try the 
log profiler (documentation: 
http://www.mono-project.com/docs/debug+profile/profile/profiler/ ). That should 
give you some more insights in where the allocations are coming from.

Thank you,
Ludovic

On Thu, May 26, 2016 at 8:20 PM Chris Swiedler 
<cswied...@trionworlds.com<mailto:cswied...@trionworlds.com>> wrote:
Thanks, Ludovic. I’m using mono-4.2.3. The ‘massive amounts of GC’ idea makes 
sense based on what I’m seeing. When I run pstack, I get a number of threadpool 
threads in stacks with:

#0  0x7fdff1c6a952 in do_sigsuspend (set=0x954220 ) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:32
#1  __GI___sigsuspend (set=set@entry=0x954220 ) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:46
#2  0x005c7534 in suspend_thread (info=0x7fdf480008c0, 
context=context@entry=0x7fde997ea1c0) at sgen-os-posix.c:126
#3  0x005c771f in suspend_handler (_dummy=, 
_info=, context=0x7fde997ea1c0) at sgen-os-posix.c:153
#4  

I thought this was related to GDB / pstack attaching, but it’s actually the 
suspend handling for the sgen collector, right?

Is a thread suspending itself CPU-intensive? I see lots of threads with high 
CPU at any point, which seems to indicate that this wouldn’t just be the CPU 
usage of the collector thread itself.

Do you have any suggestions for how to track down the large numbers of 
allocations? This isn’t very easy to reproduce, but now that I know what to 
look for, I might be able to get it to happen in a test environment.

chris

From: Ludovic Henry [mailto:ludo...@xamarin.com<mailto:ludo...@xamarin.com>]
Sent: Thursday, May 26, 2016 8:43 AM
To: Chris Swiedler 
<cswied...@trionworlds.com<mailto:cswied...@trionworlds.com>>; mono-devel-list 
<mono-devel-list@lists.ximian.com<mailto:mono-devel-list@lists.ximian.com>>
Subject: Re: [Mono-dev] High threadpool CPU usage

Hi Chris,

The first stacktrace you are observing is for threadpool thread parking. We use 
this technique for threads that are currently not doing anything, to keep them 
around for a little while (5-60 seconds) so if we have burst of usage, we do 
not end up destroying and creating threads all the time.

The second stacktrace you are observing is, as you noted, when performing a 
garbage collection, when the GC thread is suspending all the running threads. 
So if you are witnessing this trace very often, it means a thread is allocating 
memory very quickly triggering GC collection very often.

So I would need more information to tell you exactly why it would use 100% CPU. 
Also which version of Mono are you running?

Thank you very much,
Ludovic
On Wed, May 25, 2016 at 8:30 PM Chris Swiedler 
<cswied...@trionworlds.com<mailto:cswied...@trionworlds.com>> wrote:
We have a server app which is periodically going into a mode where all 
threadpool threads start running at very high CPU. I've run pstack when it's in 
this mode, and every time I do it, nearly all the threadpool threads have this 
stack:

#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00618817 in mono_cond_timedwait_ms 
(cond=cond@entry=0x7fe7ee1fddc0, mutex=0x241eb78, timeout_ms=) 
at mono-mutex.c:181
#2  0x00586f28 in worker_park () at threadpool-ms.c:509
#3  worker_thread (data=) at threadpool-ms.c:607
#4  0x005841e9 in start_wrapper_internal (data=) at 
threads.c:725
#5  start_wrapper (data=) at threads.c:772
#6  0x00621026 in inner_start_thread (arg=0x7fe831df4650) at 
mono-threads-posix.c:97
#7  0x7fe88a55edf5 in start_thread (arg=0x7fe7ee1fe700) at 
pthread_create.c:308
#8  0x7fe88a28c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Usually one thread will have a stack like this:

#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=0x9542c0 , 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x005c77

Re: [Mono-dev] High threadpool CPU usage

2016-05-26 Thread Chris Swiedler
Thanks, Ludovic. I’m using mono-4.2.3. The ‘massive amounts of GC’ idea makes 
sense based on what I’m seeing. When I run pstack, I get a number of threadpool 
threads in stacks with:

#0  0x7fdff1c6a952 in do_sigsuspend (set=0x954220 ) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:32
#1  __GI___sigsuspend (set=set@entry=0x954220 ) at 
../sysdeps/unix/sysv/linux/sigsuspend.c:46
#2  0x005c7534 in suspend_thread (info=0x7fdf480008c0, 
context=context@entry=0x7fde997ea1c0) at sgen-os-posix.c:126
#3  0x005c771f in suspend_handler (_dummy=, 
_info=, context=0x7fde997ea1c0) at sgen-os-posix.c:153
#4  

I thought this was related to GDB / pstack attaching, but it’s actually the 
suspend handling for the sgen collector, right?

Is a thread suspending itself CPU-intensive? I see lots of threads with high 
CPU at any point, which seems to indicate that this wouldn’t just be the CPU 
usage of the collector thread itself.

Do you have any suggestions for how to track down the large numbers of 
allocations? This isn’t very easy to reproduce, but now that I know what to 
look for, I might be able to get it to happen in a test environment.

chris

From: Ludovic Henry [mailto:ludo...@xamarin.com]
Sent: Thursday, May 26, 2016 8:43 AM
To: Chris Swiedler <cswied...@trionworlds.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] High threadpool CPU usage

Hi Chris,

The first stacktrace you are observing is for threadpool thread parking. We use 
this technique for threads that are currently not doing anything, to keep them 
around for a little while (5-60 seconds) so if we have burst of usage, we do 
not end up destroying and creating threads all the time.

The second stacktrace you are observing is, as you noted, when performing a 
garbage collection, when the GC thread is suspending all the running threads. 
So if you are witnessing this trace very often, it means a thread is allocating 
memory very quickly triggering GC collection very often.

So I would need more information to tell you exactly why it would use 100% CPU. 
Also which version of Mono are you running?

Thank you very much,
Ludovic
On Wed, May 25, 2016 at 8:30 PM Chris Swiedler 
<cswied...@trionworlds.com<mailto:cswied...@trionworlds.com>> wrote:
We have a server app which is periodically going into a mode where all 
threadpool threads start running at very high CPU. I've run pstack when it's in 
this mode, and every time I do it, nearly all the threadpool threads have this 
stack:

#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00618817 in mono_cond_timedwait_ms 
(cond=cond@entry=0x7fe7ee1fddc0, mutex=0x241eb78, timeout_ms=) 
at mono-mutex.c:181
#2  0x00586f28 in worker_park () at threadpool-ms.c:509
#3  worker_thread (data=) at threadpool-ms.c:607
#4  0x005841e9 in start_wrapper_internal (data=) at 
threads.c:725
#5  start_wrapper (data=) at threads.c:772
#6  0x00621026 in inner_start_thread (arg=0x7fe831df4650) at 
mono-threads-posix.c:97
#7  0x7fe88a55edf5 in start_thread (arg=0x7fe7ee1fe700) at 
pthread_create.c:308
#8  0x7fe88a28c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Usually one thread will have a stack like this:

#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=0x9542c0 , 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x005c77bd in sgen_wait_for_suspend_ack (count=count@entry=18) at 
sgen-os-posix.c:188
#3  0x005c78f9 in sgen_thread_handshake (suspend=suspend@entry=1) at 
sgen-os-posix.c:224
#4  0x005c7e92 in sgen_client_stop_world 
(generation=generation@entry=0) at sgen-stw.c:234
#5  0x005e6aca in sgen_stop_world (generation=0) at sgen-gc.c:3389
#6  0x005e6c29 in sgen_perform_collection (requested_size=4096, 
generation_to_collect=0, reason=0x6d9595 "Nursery full", wait_to_finish=0) at 
sgen-gc.c:2322#7  0x005da62a in sgen_alloc_obj_nolock 
(vtable=vtable@entry=0x7fe85c0343c0, size=size@entry=128) at sgen-alloc.c:291
#8  0x005da913 in sgen_alloc_obj (vtable=vtable@entry=0x7fe85c0343c0, 
size=128) at sgen-alloc.c:457
#9  0x005c86e9 in mono_gc_alloc_obj 
(vtable=vtable@entry=0x7fe85c0343c0, size=) at sgen-mono.c:936
#10 0x005a8b54 in mono_object_new_alloc_specific 
(vtable=vtable@entry=0x7fe85c0343c0) at object.c:4385
#11 0x005a8bf0 in mono_object_new_specific (vtable=0x7fe85c0343c0) at 
object.c:4379
#12 0x005a8c8c in mono_object_new (domain=domain@entry=0x1ded1c0, 
klass=) at object.c:4318
#13 0x005ac1c9 in mono_async_result_new (domain=domain@entry=0x1ded1c0, 
handle=handle@entry=0x0, state=0x0, data=data@entry=0x0, 
object_data=object_data@entry=0x7fe8838af020) at object.c:5768
#14 0x005887ff in mono_threadpool_ms_begin_invoke (doma

[Mono-dev] High threadpool CPU usage

2016-05-25 Thread Chris Swiedler
We have a server app which is periodically going into a mode where all 
threadpool threads start running at very high CPU. I've run pstack when it's in 
this mode, and every time I do it, nearly all the threadpool threads have this 
stack:

#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00618817 in mono_cond_timedwait_ms 
(cond=cond@entry=0x7fe7ee1fddc0, mutex=0x241eb78, timeout_ms=) 
at mono-mutex.c:181
#2  0x00586f28 in worker_park () at threadpool-ms.c:509
#3  worker_thread (data=) at threadpool-ms.c:607
#4  0x005841e9 in start_wrapper_internal (data=) at 
threads.c:725
#5  start_wrapper (data=) at threads.c:772
#6  0x00621026 in inner_start_thread (arg=0x7fe831df4650) at 
mono-threads-posix.c:97
#7  0x7fe88a55edf5 in start_thread (arg=0x7fe7ee1fe700) at 
pthread_create.c:308
#8  0x7fe88a28c1ad in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Usually one thread will have a stack like this:

#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x0061aa37 in mono_sem_wait (sem=0x9542c0 , 
alertable=alertable@entry=0) at mono-semaphore.c:107
#2  0x005c77bd in sgen_wait_for_suspend_ack (count=count@entry=18) at 
sgen-os-posix.c:188
#3  0x005c78f9 in sgen_thread_handshake (suspend=suspend@entry=1) at 
sgen-os-posix.c:224
#4  0x005c7e92 in sgen_client_stop_world 
(generation=generation@entry=0) at sgen-stw.c:234
#5  0x005e6aca in sgen_stop_world (generation=0) at sgen-gc.c:3389
#6  0x005e6c29 in sgen_perform_collection (requested_size=4096, 
generation_to_collect=0, reason=0x6d9595 "Nursery full", wait_to_finish=0) at 
sgen-gc.c:2322#7  0x005da62a in sgen_alloc_obj_nolock 
(vtable=vtable@entry=0x7fe85c0343c0, size=size@entry=128) at sgen-alloc.c:291
#8  0x005da913 in sgen_alloc_obj (vtable=vtable@entry=0x7fe85c0343c0, 
size=128) at sgen-alloc.c:457
#9  0x005c86e9 in mono_gc_alloc_obj 
(vtable=vtable@entry=0x7fe85c0343c0, size=) at sgen-mono.c:936
#10 0x005a8b54 in mono_object_new_alloc_specific 
(vtable=vtable@entry=0x7fe85c0343c0) at object.c:4385
#11 0x005a8bf0 in mono_object_new_specific (vtable=0x7fe85c0343c0) at 
object.c:4379
#12 0x005a8c8c in mono_object_new (domain=domain@entry=0x1ded1c0, 
klass=) at object.c:4318
#13 0x005ac1c9 in mono_async_result_new (domain=domain@entry=0x1ded1c0, 
handle=handle@entry=0x0, state=0x0, data=data@entry=0x0, 
object_data=object_data@entry=0x7fe8838af020) at object.c:5768
#14 0x005887ff in mono_threadpool_ms_begin_invoke (domain=0x1ded1c0, 
target=target@entry=0x7fe8838aee38, method=method@entry=0x2963d28, 
params=params@entry=0x7fe7ed9f8f10) at threadpool-ms.c:1300
#15 0x0054b547 in mono_delegate_begin_invoke (delegate=0x7fe8838aee38, 
params=0x7fe7ed9f8f10) at marshal.c:2111
#16 0x416d29d8 in ?? ()
#17 0x in ?? ()

Just from reading the first stack, it doesn't look like mono_cond_timedwait_ms 
would spin, at least as long as the timeout_ms wasn't 0. For the second stack, 
I don't know whether that's a normal garbage collection pass or (since we see 
it frequently) a sign that garbage collection is happening too often.

Can anyone give me some pointers for where to dig more deeply?

Thanks,
chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Reading threadpool performance counters

2016-05-24 Thread Chris Swiedler
Thanks, Ludovic. I’ve created 
https://bugzilla.xamarin.com/show_bug.cgi?id=41294 with sample code. I’ve also 
verified that it works as expected with mono 3.12, so it sounds like your 
explanation is correct.

chris


From: Ludovic Henry [mailto:ludo...@xamarin.com]
Sent: Tuesday, May 24, 2016 5:46 AM
To: Chris Swiedler <cswied...@trionworlds.com>; mono-devel-list 
<mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] Reading threadpool performance counters

Hi Chris,

I don't think we are keeping this counters up to date in the threadpool. Some 
of them are kept up to date, but as we imported the threadpool implementation 
from referencesources since 4.2, we must have missed this performance counter. 
So you are certainly not doing something wrong.

If you want, you should fill a bug with the information you have so we have a 
look at it as soon as possible.

Thank you very much,
Ludovic

On Mon, May 23, 2016 at 11:59 PM Chris Swiedler 
<cswied...@trionworlds.com<mailto:cswied...@trionworlds.com>> wrote:
Per https://bugzilla.xamarin.com/show_bug.cgi?id=1772 I've been trying to get 
Mono threadpool metrics with lines like this:

m_workItemsAdded = new PerformanceCounter("Mono Threadpool", "Work Items 
Added", Process.GetCurrentProcess().Id.ToString());

However, the counter I get back always has its value set to zero. Are these 
threadpool counters still supported? Am I doing something wrong? This is using 
mono 4.2.3.

Thanks,
chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com<mailto:Mono-devel-list@lists.ximian.com>
http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Reading threadpool performance counters

2016-05-23 Thread Chris Swiedler
Per https://bugzilla.xamarin.com/show_bug.cgi?id=1772 I've been trying to get 
Mono threadpool metrics with lines like this:

m_workItemsAdded = new PerformanceCounter("Mono Threadpool", "Work Items 
Added", Process.GetCurrentProcess().Id.ToString());

However, the counter I get back always has its value set to zero. Are these 
threadpool counters still supported? Am I doing something wrong? This is using 
mono 4.2.3.

Thanks,
chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Cross Platform on Linux/Windows with Mono.Posix reference on Linux

2016-03-30 Thread Chris Swiedler
To Alan's point, we did see crashes when we (unintentionally) deployed 
Mono.Posix.dll along with our app. Our solution was, like he said, to Not Do 
That, and use our Mono.Posix as a compile-time library only.

I do think it's much easier to do it this way than to have different compile 
targets, which (if I'm understanding correctly) is what the other suggestions 
all require.

chris

-Original Message-
From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Jonathan Pryor
Sent: Wednesday, March 30, 2016 7:04 AM
To: Alan McGovern <alan.mcgov...@gmail.com>
Cc: mono-devel-list <mono-devel-list@lists.ximian.com>
Subject: Re: [Mono-dev] Cross Platform on Linux/Windows with Mono.Posix 
reference on Linux

On Mar 30, 2016, at 8:33 AM, Alan <alan.mcgov...@gmail.com> wrote:
> If you package Mono.Posix.dll your app *will crash* on different systems.

Not necessarily.

> This binary is platform specific and is not safe to copy between OS’s.

Mono.Posix.dll *itself* contains no platform-specific code and is perfectly 
safe to copy between operating systems.

Mono.Posix.dll contains P/Invokes into “MonoPosixHelper” 
(libMonoPosixHelper.dylib on OS X, MonoPosixHelper.dll on Windows, etc.), and 
MonoPosixHelper contains operating system-specific code. It *cannot* be copied 
between operating systems; it’s a native library.

> It's fine to have a copy of Mono.Posix.dll used purely for compilation 
> purposes. But at runtime you have to use the system provided one, which 
> typically means the one provided by the system's mono installation.

It’s entirely fine to include Mono.Posix.dll with your app, SO LONG AS you 
*also* copy and distribute MonoPosixHelper with your app.

Additionally, Mono.Posix.dll also P/Invokes other native libraries such as 
INTL.DLL (Mono.Unix.Catalog) and MSVCRT.DLL (Mono.Unix.Native.Stdlib), which 
should be usable on Windows (so long as you also distribute INTL.DLL, etc.).

 - Jon

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Cross Platform on Linux/Windows with Mono.Posix reference on Linux

2016-03-29 Thread Chris Swiedler
Why not just include references to Mono.Posix.dll in the Windows build? You 
don't have to install the full framework. We have a similar issue with server 
apps that are developed on Windows and run on Linux. We just put a win32 build 
of Mono into our source tree and added Mono.Posix as a reference. Everywhere we 
invoke any Posix code, we just wrap the statements in something like "if  
(Environment.OSVersion.Platform == PlatformID.Unix)". 

chris

-Original Message-
From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Edward Ned 
Harvey (mono)
Sent: Tuesday, March 29, 2016 5:49 AM
To: Greg Young <gregoryyou...@gmail.com>; Jason Curl <jcurln...@arcor.de>
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] Cross Platform on Linux/Windows with Mono.Posix 
reference on Linux

> From: mono-devel-list-boun...@lists.ximian.com 
> [mailto:mono-devel-list- boun...@lists.ximian.com] On Behalf Of Greg 
> Young
> 
>  />

(for clarification of my previous response, because I was asked for 
clarification off-list)

If you have some code that calls Mono.Posix.Something(), and you have a 
conditional reference to Mono.Posix in the project, then you're able to build 
on Mono, but on windows, without the reference, your call to 
Mono.Posix.Something() will not compile, which prevents you from building, even 
though at runtime you might never make that call. In order to compile on 
windows, you'll need to comment-out your Mono.Posix.Something() line, via #if 
or [Conditional], which means you need a compiler symbol to indicate whether 
you're building on mono or windows. This could be either separate project 
files, or multiple build configurations. (Or dynamically generated project 
files).

Maybe you can have a conditional reference to Mono.Posix on mono, and have a 
separate conditional reference to ../../ExtraClassLibraries/Mono.Posix.dll on 
windows, with copy-to-destination, so you can get the same code to build on 
both mono and windows, resulting in an effectively identical cross-platform 
binary... But I'm almost certain I recall somebody on this list telling me, 
that the JIT compiler can or will or might in the future, eagerly link 
assemblies at runtime (or just before runtime), so the Mono.Posix.dll file must 
be present on windows at runtime in order to avoid runtime exceptions, even 
though the runtime code execution will never execute that path.

You avoid all these problems by abstracting the functionality you want into an 
interface or abstract class, and using a factory to perform a runtime dynamic 
load of a mono-specific or windows-specific assembly with a derivative class. 
You can build the mono-specific assembly on mono, or maybe you can use the 
double-conditional described above and get the mono-specific assembly to also 
be buildable on windows. No need to copy Mono.Posix.dll to the destination, 
because Mono.Posix will only be called at runtime when run on mono.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Debugging Mono applications under GDB

2015-11-15 Thread Chris Swiedler
Do you mean for development, or for debugging? The application is running on a 
headless server and I can’t run monodevelop or Xamarin on it. I’m building the 
exes with the mono toolchain under Windows, by installing it as a .net profile.

chris

> On Nov 14, 2015, at 6:32 PM, Edward Ned Harvey (mono) 
> <edward.harvey.m...@clevertrove.com> wrote:
> 
>> From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
>> boun...@lists.ximian.com] On Behalf Of Chris Swiedler
>> 
>> We have a server application that's being developed under Visual Studio and
>> run under Mono 3.12. We're generating .mdb files from the .pdbs that VS
>> creates. With those deployed next to the executable, mono will give full
>> callstacks with source and line information when logging exceptions, so I
>> believe the .mdbs are correct.
> 
> Have you considered monodevelop or Xamarin Studio?

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Debugging Mono applications under GDB

2015-11-09 Thread Chris Swiedler
We have a server application that's being developed under Visual Studio and run 
under Mono 3.12. We're generating .mdb files from the .pdbs that VS creates. 
With those deployed next to the executable, mono will give full callstacks with 
source and line information when logging exceptions, so I believe the .mdbs are 
correct.



I've read http://www.mono-project.com/docs/debug+profile/debug/ so many times I 
can quote it by heart, but I still can't get gdb to give me any useful symbols. 
I'm using gdb 7.6.1, so according to the docs, it should just use the JIT 
interface to get symbols.



Is there any way to troubleshoot the loading of symbols by gdb? There are 
examples for how to generate xdb shared object files (I've tried them, but as 
doesn't like some of the assembly that MONO_XDEBUG generates) but nothing on 
the new JIT interface other than "it should work".



I do get errors like "../../gdb/dwarf2-frame.c:683: internal-error: Unknown CFI 
encountered." I'm not sure if those are relevant to my problem. A sample gdb 
session is below.



Thanks,

chris



GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7 Copyright (C) 2013 Free 
Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-redhat-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Attaching to process 21185

Reading symbols from /usr/bin/mono-sgen...(no debugging symbols found)...done.

Reading symbols from /lib64/libm.so.6...Reading symbols from 
/usr/lib/debug/usr/lib64/libm-2.17.so.debug...done.

done.

Loaded symbols for /lib64/libm.so.6

Reading symbols from /lib64/librt.so.1...Reading symbols from 
/usr/lib/debug/usr/lib64/librt-2.17.so.debug...done.

done.

Loaded symbols for /lib64/librt.so.1

Reading symbols from /lib64/libdl.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libdl-2.17.so.debug...done.

done.

Loaded symbols for /lib64/libdl.so.2

Reading symbols from /lib64/libpthread.so.0...Reading symbols from 
/usr/lib/debug/usr/lib64/libpthread-2.17.so.debug...done.

done.

[New LWP 21269]

...

[New LWP 21187]

[Thread debugging using libthread_db enabled] Using host libthread_db library 
"/lib64/libthread_db.so.1".

Loaded symbols for /lib64/libpthread.so.0 Reading symbols from 
/lib64/libgcc_s.so.1...Reading symbols from 
/usr/lib/debug/usr/lib64/libgcc_s-4.8.3-20140911.so.1.debug...done.

done.

Loaded symbols for /lib64/libgcc_s.so.1

Reading symbols from /lib64/libc.so.6...Reading symbols from 
/usr/lib/debug/usr/lib64/libc-2.17.so.debug...done.

done.

Loaded symbols for /lib64/libc.so.6

Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/ld-2.17.so.debug...done.

done.

Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from 
/lib64/libnss_files.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libnss_files-2.17.so.debug...done.

done.

Loaded symbols for /lib64/libnss_files.so.2 Reading symbols from 
/usr/lib/mono/4.5/mscorlib.dll.so...done.

Loaded symbols for /usr/lib/mono/4.5/mscorlib.dll.so Reading symbols from 
/usr/lib64/libMonoPosixHelper.so...done.

Loaded symbols for /usr/lib64/libMonoPosixHelper.so Reading symbols from 
/lib64/libz.so.1...Reading symbols from 
/usr/lib/debug/usr/lib64/libz.so.1.2.7.debug...done.

done.

Loaded symbols for /lib64/libz.so.1

Reading symbols from /lib64/libnss_dns.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libnss_dns-2.17.so.debug...done.

done.

Loaded symbols for /lib64/libnss_dns.so.2 Reading symbols from 
/lib64/libresolv.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libresolv-2.17.so.debug...done.

done.

Loaded symbols for /lib64/libresolv.so.2 clock_nanosleep (clock_id=1, flags=1, 
req=0x7fff271a8e80, rem=0x) at 
../sysdeps/unix/sysv/linux/clock_nanosleep.c:49

49LIBC_CANCEL_RESET (oldstate); Mono support loaded.

(gdb) mono_backtrace 10

#0  clock_nanosleep (clock_id=1, flags=1, req=0x7fff271a8e80, 
rem=0x) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:49

49LIBC_CANCEL_RESET (oldstate);

#1  0x00618c78 in SleepEx ()

#2  0x0058cc7a in ves_icall_System_Threading_Thread_Sleep_internal ()

#3 0x413215c2 in  (wrapper managed-to-native) 
System.Threading.Thread:Sleep_internal (int) + 0x52 (0x41321570 0x413215ee) 
[0x20ee4f0 - LobbyServer.exe]

#4  0x02146a10 in ?? ()

#5  0x7fff271a9410 in ?? ()

#6  0x7f252cc01338 in ?? ()

#7  0x7fff271a9410 in ?? ()

#8  0x7f252cc00b18 in ?? ()

#9  0x02139ac0 in ?? ()

(gdb) info threads

  Id   Target Id Frame

  32   Thread 0x7f252b0ed700 (LWP 2

[Mono-list] Debugging Mono applications under GDB

2015-10-19 Thread Chris Swiedler
We have a server application that's being developed under Visual Studio and run 
under Mono 3.12. We're generating .mdb files from the .pdbs that VS creates. 
With those deployed next to the executable, mono will give full callstacks with 
source and line information when logging exceptions, so I believe the .mdbs are 
correct.

I've read http://www.mono-project.com/docs/debug+profile/debug/ so many times I 
can quote it by heart, but I still can't get gdb to give me any useful symbols. 
I'm using gdb 7.6.1, so according to the docs, it should just use the JIT 
interface to get symbols.

Is there any way to troubleshoot the loading of symbols by gdb? There are 
examples for how to generate xdb shared object files (I've tried them, but as 
doesn't like some of the assembly that MONO_XDEBUG generates) but nothing on 
the new JIT interface other than "it should work". 

I do get errors like "../../gdb/dwarf2-frame.c:683: internal-error: Unknown CFI 
encountered." I'm not sure if those are relevant to my problem. A sample gdb 
session is below.

Thanks,
chris

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7 Copyright (C) 2013 Free 
Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 21185
Reading symbols from /usr/bin/mono-sgen...(no debugging symbols found)...done.
Reading symbols from /lib64/libm.so.6...Reading symbols from 
/usr/lib/debug/usr/lib64/libm-2.17.so.debug...done.
done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/librt.so.1...Reading symbols from 
/usr/lib/debug/usr/lib64/librt-2.17.so.debug...done.
done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libdl-2.17.so.debug...done.
done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libpthread.so.0...Reading symbols from 
/usr/lib/debug/usr/lib64/libpthread-2.17.so.debug...done.
done.
[New LWP 21269]
[New LWP 21266]
[New LWP 21254]
[New LWP 21253]
[New LWP 21252]
[New LWP 21250]
[New LWP 21248]
[New LWP 21246]
[New LWP 21244]
[New LWP 21242]
[New LWP 21240]
[New LWP 21237]
[New LWP 21235]
[New LWP 21223]
[New LWP 21221]
[New LWP 21219]
[New LWP 21217]
[New LWP 21216]
[New LWP 21214]
[New LWP 21213]
[New LWP 21211]
[New LWP 21209]
[New LWP 21208]
[New LWP 21207]
[New LWP 21205]
[New LWP 21204]
[New LWP 21203]
[New LWP 21202]
[New LWP 21200]
[New LWP 21188]
[New LWP 21187]
[Thread debugging using libthread_db enabled] Using host libthread_db library 
"/lib64/libthread_db.so.1".
Loaded symbols for /lib64/libpthread.so.0 Reading symbols from 
/lib64/libgcc_s.so.1...Reading symbols from 
/usr/lib/debug/usr/lib64/libgcc_s-4.8.3-20140911.so.1.debug...done.
done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libc.so.6...Reading symbols from 
/usr/lib/debug/usr/lib64/libc-2.17.so.debug...done.
done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/ld-2.17.so.debug...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from 
/lib64/libnss_files.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libnss_files-2.17.so.debug...done.
done.
Loaded symbols for /lib64/libnss_files.so.2 Reading symbols from 
/usr/lib/mono/4.5/mscorlib.dll.so...done.
Loaded symbols for /usr/lib/mono/4.5/mscorlib.dll.so Reading symbols from 
/usr/lib64/libMonoPosixHelper.so...done.
Loaded symbols for /usr/lib64/libMonoPosixHelper.so Reading symbols from 
/lib64/libz.so.1...Reading symbols from 
/usr/lib/debug/usr/lib64/libz.so.1.2.7.debug...done.
done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libnss_dns.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libnss_dns-2.17.so.debug...done.
done.
Loaded symbols for /lib64/libnss_dns.so.2 Reading symbols from 
/lib64/libresolv.so.2...Reading symbols from 
/usr/lib/debug/usr/lib64/libresolv-2.17.so.debug...done.
done.
Loaded symbols for /lib64/libresolv.so.2 clock_nanosleep (clock_id=1, flags=1, 
req=0x7fff271a8e80, rem=0x) at 
../sysdeps/unix/sysv/linux/clock_nanosleep.c:49
49    LIBC_CANCEL_RESET (oldstate);
Mono support loaded.
(gdb) mono_backtrace 10
#0  clock_nanosleep (clock_id=1, flags=1, req=0x7fff271a8e80, 
rem=0x) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:49
49    LIBC_CANCEL_RESET (oldstate);
#1  0x00618c78 in SleepEx ()
#2  0x0058cc7a in ves_icall_System_Threading_Thread_Sleep_internal ()
#3 0x413215c2 in  (wrapper managed-to-native) 
Sy

[Mono-list] Fwd: [PATCH] mono-4.xx.inc: disable parallel make

2015-07-07 Thread Chris Morgan
Hello.

I had posted last week about issues during the install phase of a
build due to the same file being installed multiple times.

From another user with the same issue it looks like the issue may be
related to parallel make.

Is this a known limitation when building mono?

Chris



-- Forwarded message --
From: Richard Tollerton rich.toller...@ni.com
Date: Tue, Jul 7, 2015 at 4:17 PM
Subject: [PATCH] mono-4.xx.inc: disable parallel make
To: chmor...@gmail.com
Cc: Richard Tollerton rich.toller...@ni.com,
ajlen...@dynamicdevices.co.uk, yo...@yoctoproject.org


A race was observed during `make install` of mono-native under
PARALLEL_MAKE=-j6:

/usr/bin/install: cannot change permissions of
build/tmp-glibc/work/x86_64-linux/mono-native/4.0.2.4-r0/image/
build/tmp-glibc/sysroots/x86_64-linux/usr/lib/mono/xbuild-frameworks/
.NETFramework/v4.5/RedistList/FrameworkList.xml: No such file or
directory

This is definitely a race, because FrameworkList.xml was present once
the failed build completed.

The present mono build doesn't appear to build much of anything in
parallel in the first place, and I would guess that this issue applies
equally to the mono and mono-native builds. So the correct place for the
workaround ought to be in the shared .inc file.

Signed-off-by: Richard Tollerton rich.toller...@ni.com
---
 recipes-mono/mono/mono-4.xx.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-mono/mono/mono-4.xx.inc b/recipes-mono/mono/mono-4.xx.inc
index 2d7f65d..973593a 100644
--- a/recipes-mono/mono/mono-4.xx.inc
+++ b/recipes-mono/mono/mono-4.xx.inc
@@ -68,3 +68,6 @@ FILES_${PN}-dbg   += 
${datadir}/mono-2.0/mono/cil/cil-opcodes.xml ${libdir}/m
 FILES_${PN}-staticdev  +=  ${libdir}/*.a

 RDEPENDS_${PN} =+ bash
+
+# Workaround for observed race in `make install`
+PARALLEL_MAKE=
--
2.4.4
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Issue building 4.0.2.4 on F22

2015-07-06 Thread Chris Morgan
On Monday, July 6, 2015, Alex J Lennon ajlen...@dynamicdevices.co.uk
wrote:

 Chris,

 On 24/06/2015 18:54, Chris Morgan wrote:
  Hello.
 
  I'm building mono here on F22 under Yocto and seeing errors about
  multiple files being installed with the same name. I'm not seeing
  these under F21.
 
  I haven't tried this with the actual mono release natively so there is
  some possibility that the yocto recipe is doing something bad to the
  mono build, however things do build under F21 with the same recipes.
 

 Chris, is this still an issue or did you find a resolution?

 Thanks, Alex



I'm still seeing it here under f22.

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Issue building 4.0.2.4 on F22

2015-06-24 Thread Chris Morgan
Hello.

I'm building mono here on F22 under Yocto and seeing errors about
multiple files being installed with the same name. I'm not seeing
these under F21.

I haven't tried this with the actual mono release natively so there is
some possibility that the yocto recipe is doing something bad to the
mono build, however things do build under F21 with the same recipes.

Output from the build:


 (output snipped)
 | /usr/bin/install -c -c -m 644 frameworks/net_4.5.xml
 /home/cmorgan/projects/yocto/build/tmp/work/x86_64-linux/mono-native/4.0.2.4-r0/image/home/cmorgan/projects/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml
 | /usr/bin/install -c -c -m 644
 targets/Microsoft.WebApplication.targets
 /home/cmorgan/projects/yocto/build/tmp/work/x86_64-linux/mono-native/4.0.2.4-r0/image/home/cmorgan/projects/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/VisualStudio/v9.0/WebApplications
 | mkdir -p -- 
 /home/cmorgan/projects/yocto/build/tmp/work/x86_64-linux/mono-native/4.0.2.4-r0/image/home/cmorgan/projects/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/14.0/bin/MSBuild
 | /usr/bin/install -c -c -m 644
 targets/Microsoft.Portable.Common.targets
 /home/cmorgan/projects/yocto/build/tmp/work/x86_64-linux/mono-native/4.0.2.4-r0/image/home/cmorgan/projects/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.Common.targets
 | /usr/bin/install -c -c -m 644
 targets/Microsoft.WebApplication.targets
 /home/cmorgan/projects/yocto/build/tmp/work/x86_64-linux/mono-native/4.0.2.4-r0/image/home/cmorgan/projects/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/VisualStudio/v9.0/WebApplications
 | /usr/bin/install: cannot create regular file
 '/home/cmorgan/projects/yocto/build/tmp/work/x86_64-linux/mono-native/4.0.2.4-r0/image/home/cmorgan/projects/yocto/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml':
 File exists
 | Makefile:42: recipe for target 'install-frameworks' failed
 | make[6]: *** [install-frameworks] Error 1
 | make[6]: *** Waiting for unfinished jobs


and with 4.0.1.34:

| /usr/bin/install -c -c -m 644
targets/Microsoft.Portable.Common.targets
/home/cmorgan/projects/yocto-cybex/build/tmp/work/x86_64-linux/mono-native/4.0.1.34-r0/image/home/cmorgan/projects/yocto-cybex/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/Portable/v4.5/Microsoft.Portable.Common.targets
| /usr/bin/install -c -c -m 644
targets/Microsoft.WebApplication.targets
/home/cmorgan/projects/yocto-cybex/build/tmp/work/x86_64-linux/mono-native/4.0.1.34-r0/image/home/cmorgan/projects/yocto-cybex/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/VisualStudio/v11.0/WebApplications
| /usr/bin/install -c -c -m 644
targets/Microsoft.WebApplication.targets
/home/cmorgan/projects/yocto-cybex/build/tmp/work/x86_64-linux/mono-native/4.0.1.34-r0/image/home/cmorgan/projects/yocto-cybex/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/VisualStudio/v11.0/WebApplications
| /usr/bin/install: cannot create regular file
'/home/cmorgan/projects/yocto-cybex/build/tmp/work/x86_64-linux/mono-native/4.0.1.34-r0/image/home/cmorgan/projects/yocto-cybex/build/tmp/sysroots/x86_64-linux/usr/lib/mono/xbuild/Microsoft/VisualStudio/v11.0/WebApplications/Microsoft.WebApplication.targets':
File exists
| Makefile:70: recipe for target 'install-web-targets' failed
| make[6]: *** [install-web-targets] Error 1
| make[6]: *** Waiting for unfinished jobs


Thoughts?


Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Does Properties.Settings.Default.Save() work under Linux

2015-04-28 Thread Chris Down
 I would suggest using strace to figure out what file its trying to open. If
 you can trace from that open() call up to a CLR stacktrace, you might be
 able to figure out what is going on.

Thanks Justin, I will give it a try

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Does Properties.Settings.Default.Save() work under Linux

2015-04-27 Thread Chris Down
Thanks for replying.

 The first thing is, don't expect windows forms to be cross platform 
 compatible. They're kinda sorta implemented in mono, but not good. The 
 recommendation is to either design the business logic to be cross-platform, 
 and then design the GUI separately for each platform (probably GTK# for 
 linux), or use something that's intended to be cross-platform, such as 
 Eto.Forms, or XWT.

Yes, I understand that the implementation of windows forms is incomplete and
not good, hence the question,  Does Properties.Settings.Default.Save() work
under Linux.  Does the Save method work on mono?

I am just trying to port an existing application to Linux and everything works
fine except this.

Chris




___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-dev] Update on Build System

2015-04-09 Thread Chris Tacke
It’s been about a year and thought I’d loop back on this thread since it’s 
still something I could really use. Are we yet to a point where we can build 
Mono using the Microsoft compilers only?  If so, I can then start looking at 
modifying those projects to build using the Windows CE compilers.

-Chris Tacke

From: Miguel de Icaza [mailto:mig...@xamarin.com]
Sent: Monday, May 26, 2014 10:23 AM
To: Chris Tacke
Cc: mono-devel
Subject: Re: [Mono-dev] Update on Build System

Hello Chris,

That is what I am trying to do with this work.

There are still a number of problems that I need to address:

 *   Installing the resulting binaries
 *   Signing (currently we are skipping this)
 *   Ensure the binaries produced are identical with Make and msbuild
 *   Add assertions to ensure that flags that we currently ignore are caught, 
in case we add new features in the future
 *   Fix the C# compiler build (currently disabled)
 *   Extend this to other components, so we can have the entire setup in a 
solution.
Then we would have something that works.

Miguel

On Mon, May 26, 2014 at 11:04 AM, Chris Tacke 
cta...@opennetcf.commailto:cta...@opennetcf.com wrote:
Miguel,

This is great news. Are there any plans to update the build system to allow us 
to compile the runtime itself using Visual Studio (i.e. a Microsoft compiler)?

Now before everyone starts with the eye rolling and “why the hell would you 
want to do that?” questions, let me explain.  As of today, we can create 
applications in C# that will run on Windows and a large array of Linux machines 
(including Android) but Windows CE has been orphaned.  Microsoft is not putting 
any effort into the Compact Framework, but there are still people developing 
for Windows CE devices.  I’d like to put a last nail in the coffin of the 
Compact Framework by getting Mono supported on Windows CE so we can all move 
into using technology from the current decade, not the last one.

I don’t see any real path for getting the runtimes to compile for Windows CE  
for ARM and 586 (not 686, since we have new Intel processors now that are 586 
based).  There is an old (last touch in 2009) CeGCC project that might be a 
step, but I was hoping for something a little simpler.  I’m up for any 
suggestions.

-Chris Tacke





From: 
mono-devel-list-boun...@lists.ximian.commailto:mono-devel-list-boun...@lists.ximian.com
 
[mailto:mono-devel-list-boun...@lists.ximian.commailto:mono-devel-list-boun...@lists.ximian.com]
 On Behalf Of Miguel de Icaza
Sent: Friday, May 23, 2014 9:59 PM
To: mono-devel
Subject: [Mono-dev] Update on Build System

Hey guys,

#1 Makefile Build System Update

So the clean staged setup has been added to mono/master and in practice most of 
you will never notice an improvement.

Those working on libraries that had cross dependencies will enjoy reliable and 
working builds.   If you make a change in say System, and you type make in 
mcs/class/System, it will make sure that all the dependencies are properly 
compiled and the result will be stable.

#2 MSBuild setup

Based on the work above, I have updated the MSBuild setup, and it is now 
possible to build most of the managed code with xbuild.   This means that you 
can use this from Visual Studio or Xamarin Studio.

Since xbuild does not support passing /keyfile to the C# compiler, I still have 
to fix about 6-7 assemblies that use -keyfile to be signed.

Once that happens, you should be able to build all of Mono's managed code with:

xbuild msvc/scripts/net_4_5.sln

Currently I disabled generating project files for profiles other than 4.5, just 
because it is easier to debug this way.

I am also a bit sad that our xbuild does not have any support for parallel 
builds, it would have been a neat hack to make the xbuild-based build system 
parallel and get this for free.

#3 Future Parallel Work - Makefiles

I tried to implement parallel builds for mcs/class/Facades, and while it works, 
it regressed some of the other standard targets that we have (the other 
-local).   I will have to revisit this later.

But the principle behind the patch that enabled this could be used for 
mcs/class and parallelize all the builds as well.   We only need to (a) 
generate the assembly dependencies [1] and (b) we need to figure out the -local 
target breakage (same stuff I broke for Facades).

[1]  (which we have from the xbuild work above)
Miguel

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Text Input Source Services

2015-02-17 Thread Chris Hubbard
Hello,

I would like to access Text Input Source Services from a mono app.  I would 
like to get the id, localized name, and primary language of all the currently 
configured keyboard input sources.  I also want to change the selected keyboard 
input source during my application depending on which field is being typed in 
(it is an app that manages lexicon information and we want to change the 
keyboard depending on the writing system of the field being typed in).

Text Input Source Services lives in the Carbon.framework but is not a Carbon 
API.

Here is the Objective-C code that I would like to write in C#:

const void *keys[] = { kTISPropertyInputSourceCategory };
const void *values[] = { kTISCategoryKeyboardInputSource };
CFDictionaryRef filter = CFDictionaryCreate(kCFAllocatorDefault, keys, 
values, 1, NULL, NULL);

NSArray *sources = CFBridgingRelease(TISCreateInputSourceList(filter, 
FALSE));
for (NSUInteger i = 0; i  sources.count; ++i) {
TISInputSourceRef source = (__bridge TISInputSourceRef)sources[i];
NSString *Id = (__bridge NSString *)TISGetInputSourceProperty(source, 
kTISPropertyInputSourceID);
NSString *LocalizedName = (__bridge NSString 
*)TISGetInputSourceProperty(source, kTISPropertyLocalizedName);
NSArray *Languages = 
CFBridgingRelease(TISGetInputSourceProperty(source, 
kTISPropertyInputSourceLanguages));
NSString *primaryLanguage = NULL;
if ([Languages count]  0) {
primaryLanguage = [Languages objectAtIndex:0];
}

// Do something with these properties in C# code
NSLog(@Id=%@, LocalizeName=%@, Primary Language=%@, Id, 
LocalizedName, primaryLanguage);
}

CFRelease(filter);

The challenge I saw with this is exposing constants (from TextInputSources.h). 
For example:

extern const CFStringRef kTISPropertyInputSourceCategory;

Are there any examples of this?  I don’t know how the API implementation is 
doing comparisons (pointer value or string comparisons--and it could change 
over time).

Another options is to use the Cocoa API NSTextInputContext (from 
monomac/src/appkit.cs): 

   [Static]
[Export (localizedNameForInputSource:)]
string LocalizedNameForInputSource (string 
inputSourceIdentifier);

[Export (keyboardInputSources)]
NSArray /* NSString [] */ KeyboardInputSources { get; }

[Export (selectedKeyboardInputSource)]
string SelectedKeyboardInputSource { get; set; }

The first one (LocalizedNameForInputSource) already exists.  I added the last 
two in a local build and they worked correctly.  They only thing missing from 
the Cocoa API is getting the primary language of a keyboard input source based 
on the input source identifier.

So my questions are:
1) What is the proper way to expose Text Input Source Services to Mono code?
2) OR Is there a Cocoa way to get the language of a Keyboard Input Source? 
3) OR should a create a Objective-C Library that wraps Text Input Source 
Services and make a interop for that library?

Thanks,

Chris Hubbard
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] Mac Speech Synthesizer and SoundPlayer

2014-12-24 Thread McKinnon Chris
Hi,

I’ve posted an archive of a Mac SpeechSynthesizer and SoundPlayer” project on 
DropBox.  I’ve been working on this for a while and I’ve come to the conclusion 
that I probably won’t finish it without help:
https://www.dropbox.com/s/1qc0dozzqmhsemw/SpeechSynthesizer.zip?dl=0 
https://www.dropbox.com/s/1qc0dozzqmhsemw/SpeechSynthesizer.zip?dl=0

The original motivation for this work was to get the Telerik Captcha control 
working on the Mac platform.  I knew Mac OS X had a built-in speech synthesizer 
that could be utilized to provide this functionality.  In order to access this 
functionality, I built wrapper classes for the necessary AudioToolbox, 
CoreFoundation, and SpeechSynthesis API calls.

Along the way, I noticed that the SoundPlayer class did not work on OS X.  I’ve 
implemented the basic functionality to play a file and play a stream but I 
haven’t implemented all features supported by the SoundPlayer class.

I’ve tried to match existing .NET class functionality and behaviour whenever 
possible.  I’ve also tried to unit test where appropriate but more could be 
written.  I believe the code should be compatible with OS X 10.8 on-ward, but 
that’s a guess.

This would be my first contribution to the mono project.  How would work like 
this be integrated typically?

Thanks,

Chris McKinnon___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-dev] PR #1447 [MWF] Use Ctrl+PageUp/PageDown for Tab Navigation

2014-12-09 Thread Chris Hubbard

In the Windows implementation of the TabControl, Ctrl+PageUp
navigates to the previous tab and Ctrl+PageDown navigates to the
next tab (with both wrapping around).  This change implements this
feature in the Mono implementation.

https://github.com/mono/mono/pull/1447/

Thanks,
Chris Hubbard
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono on Embedded Platform

2014-11-21 Thread Chris Morgan
On Fri, Nov 21, 2014 at 2:05 AM, techi eth techi...@gmail.com wrote:
 Hey,



 I am very new to mono. I am looking forward to use this great platform over
 Linux on ARM target.



 I have following point to check before start.

 1)  1) How can I achieve small footprint from mono. I have followed the
 below link but it produces install directory which is more than 100 MB with
 mono 3.10.0.

 http://www.mono-project.com/docs/compiling-mono/small-footprint/



 I would like to know below listed things are manual way of doing or I can do
 this by using any of the configure option.

 · Removing unneeded features

 · Removing unneeded data

 · Compilation hints

 · Reducing code in assemblies



 2)  2) I will going to write application which is
 multitasking/multithreading, accessing some device port, talking to
 Ethernet, running WEB service. Can anyone suggest with mono over Linux what
 is Flash  RAM size I should use.



 Techi


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



Hi Techi.

Wanted to share my experience.

We aren't storage constrained, so 100MB+ for us was ok. System with an
arm cortex a8 processor, the beaglebone black actually.

Found out that for every instance of mono we had running that there
was some 17MB of ram overhead. In addition, there is a little bit of a
startup time delay, a second or so, before the the runtime is running
our code. I had asked here about the ram overhead but there wasn't any
response about how to shrink it down or what might be contributing to
it a bit. We would have been ok with maybe 5MB per process. Keep in
mind that I was testing with a pretty trivial application, it wasn't
doing lots of memory allocations, so nothing in the application could
explain why 50k of memory allocations translated to 17MB of overhead.

We ended up rewriting four or five smallish utility applications from
c# into c++ and leaving a single application of high complexity as our
sole c# application that will run on the system. This dropped off 17MB
* 4 of ram and reduced startup time for these applications to
fractions of a second.

Chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] What's the most efficient way to do XOR two byte arrays?

2014-11-19 Thread Chris Eelmaa
There is virtually no difference between Array.Copy and
Buffer.BlockCopy when dealing with large buffers.

If you are rapidly calling Array.Copy with smaller buffers, then yes,
you can save some milliseconds if you switch to Buffer.BlockCopy,
because it skips checks / makes less function calls, and there's less
overhead. As I said, the difference comes to play when we are dealing
with very small data rapidly.


That said,

you can make some serious gains when you're dealing with large
buffers. You just need to parallelize it, and make sure there is no
false cache sharing.

The other trick is to see what Mono.Simd offers. I don't see a reason
why Xoring 128-bit blocks at once shouldn't be possible. You want
something similiar:
http://stackoverflow.com/questions/15067119/how-can-i-use-simd-to-accelerate-xor-two-blocks-of-memory

Note I have absolutely no experience with Mono.Simd but I imagine it's
pretty cool.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Review of PR1349

2014-10-17 Thread Chris Rogus
Disclaimer: I know nothing about these classes.

That said, I firmly support the plan to bring PRs into the mailing list,
and would hate to see such a great plan get no love, so I want to say that
from looking at these (very small and easily digested) changes, they at
least look clean and good.

From a fellow user of Mono who is interested in its success and expansion
(with no say in any outcomes here), thanks for doing this.
On Oct 16, 2014 6:23 PM, Martin Thwaites monofo...@my2cents.co.uk wrote:

 Hi all,

 I've just put up my attempt at getting the MachineKey.Protect and
 Unprotect methods available in mono.  I'd be grateful if someone give it a
 quick review to make sure it makes sense.

 https://github.com/mono/mono/pull/1349

 Couple of notes.  There is no compatibility with encrypted items that were
 done using Windows.  This is a barebones implementation in that it will
 work and be at least as secure as MachineKey.Encrypt/Decrypt (as it uses
 the same methods under the hood).

 This is my first PR for mono, so please be kind.  I've tried my best to
 follow the coding guidelines, but I'm happy to make changes.

 Thanks
 Martin

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Building mono on Windows issues.

2014-10-15 Thread Chris Eelmaa
Hello all,

I have question regarding building mono on windows,
namely I've tried a lot of times, and had a lot of different
problems(such as missing some dependencies, git converting *.sh files
to CRLF ending and cygwin not being able to interpret them, etc..)

however I've reached now to a point where I can run `make` for a little while,
and then receive the error:

In file included from socket-io.c:30:0:
/usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error:
#error ws2tcpip.h is not compatible with winsock.h. Include
winsock2.h instead.
In file included from socket-io.c:30:0:
/usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:147:8: error:
redefinition of 'struct ip_mreq'
In file included from
/usr/i686-pc-mingw32/sys-root/mingw/include/windows.h:93:0,


As you can see, winsock.h doesn't play well with ws2tcpip.h. I ran a
grep to look for winsock.h from mono dir, but there's nothing about
that. That file seems to be crawling in from some arbitrary place?!


After that, I tried to compile with DISABLE_SOCKETS, and then I
arrived to this place:

./.libs/libmini.a(libmini_la-debugger-agent.o): In function
`socket_transport_connect':
/cygdrive/c/GITHUB/mono/mono/mini/debugger-agent.c:1236: undefined
reference to `mono_network_init'



At this point, I have no idea what to do. Is mono master branch
broken, or is it possible to actually build it with Windows from
there? Can anyone confirm? Do I have messed up Windows SDK or
something similiar?

Thanks.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-aspnet-list] Mono ASP.NET vs MS VS

2014-09-26 Thread Chris Rogus
Hi, I am trying to build an ASP.NET website in C# using Razor templates in
MS Visual Studio that will then run in Mono on Linux.

I have never attempted to run an ASP.NET site with Mono before now, and I
only played with MonoDevelop briefly when I last explored Mono a couple
years ago.

I have mono-complete and mono-fastcgi-server4 installed from Xamarin's deb
on my Xubuntu 14.04 desktop VM (running in VirtualBox): sudo
add-apt-repository 'deb http://download.mono-project.com/repo/debian wheezy
main'  # etc

When I use Xamarin Studio 5.4 in Windows 7 (downloaded 5.0.1.3 from
monodevelop.com and then upgraded in-app) to create a new solution of type
C#  ASP.NET  ASP.NET MVC Razor Project, and then copy the bin dir,
Views dir and Global.asax + Web.config + package.config files into my Linux
machine's /var/www/ directory, and finally run xsp4 there, everything works
fine.  Fine here meaning that I open localhost:9000 and see a simple page
that says: Welcome to ASP.NET MVC 5.2 on Mono!  (Note that I can also
accomplish this with nginx + mono-fastcgi-server4.)

When I then use Visual Studio 2013 Professional Update 3 in Windows 7 to
create a new solution of type Visual C#  Web  ASP.NET Web Application 
Empty  check MVC, and then copy from the Xamarin solution I just created
(for demo purposes): Controllers/HomeController and all the contents of the
Views dir except Web.config (note that MS VS uses web and Mono/Xamarin
uses Web, if ever that might matter).  I then right click on the project
in MS VS and then Publish  Custom  (name it)  Publish method: File
System  Target location: (somewhere).  Once that is published locally, I
will then copy that dir into my /var/www in Linux and finally run xsp4
there, where I see this error displayed in the browser when I open
localhost:9000 :

System.InvalidCastException
Cannot cast from source type to destination type.

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or
object): System.Web.WebPages.Razor.
Exception stack trace:
at System.Web.WebPages.Razor.WebRazorHostFactory.GetRazorSection
(System.String virtualPath) [0x0] in filename unknown:0


Version Information: 3.8.0 (tarball Thu Sep 4 12:24:26 UTC 2014); ASP.NET
Version: 4.0.30319.17020


Additionally, if I try to open the Mono solution in my MS VS, it fails to
convert it, with an error:

C:\Users\Chris\Documents\Visual Studio
2013\Projects\MonoSite\MonoSite\MonoSite.csproj : error  : The imported
project C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets
was not found. Confirm that the path in the Import declaration is
correct, and that the file exists on disk.  C:\Users\Chris\Documents\Visual
Studio 2013\Projects\MonoSite\MonoSite\MonoSite.csproj


Now, I am an experienced C# developer and used to do C and C++ once upon a
time, so I would like to contribute / help myself here:

1) If there is something easy and obvious that I am missing in my config,
please let me know.  (e.g. the global or Views web.config files are
different between MS VS and Mono, for sure, but I am not an expert with
these files to know exactly what is needs to be changed in the MS VS one,
if anything, to fix this situation)

2) Otherwise, any advice on how I could figure out exactly where this error
is coming from?  What dll is missing or what line in my config xml is not
right, etc?  How can I debug an ASP.NET application in Mono -- using xsp4
or monodevelop anything else?

3) What do I need to do to get an ASP.NET solution created in MonoDevelop
to open in MS VS?  (Hopefully this is the same solution as getting my MS VS
ASP.NET site to work in Mono/xsp4.)

4) Any advice on where Mono might already have a Publish feature like MS VS
has in MonoDevelop?  Or else where I should go add one if no such feature
yet exists, if it acceptable to the team in charge of this product (I don't
want to do it, submit a pull request and be told it is an undesired
feature).  Such a feature would very helpful for me.


Thanks!

---
Chris Rogus
___
Mono-aspnet-list mailing list
Mono-aspnet-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list


Re: [Mono-dev] System.Json string handling

2014-09-21 Thread Chris Rogus
So, lurker though I have been to date, I would like to one day be able to
help.  Miguel/whoever, what is the road to prove myself to be able to help
with this backlog and support this excellent and worthwhile project?
On Sep 21, 2014 5:18 AM, Martin Thwaites monofo...@my2cents.co.uk wrote:

 I would have to both agree and disagree with Edward on that...

 Yes you need things to be updated and made to work so you get people
 wanting to use the platform.  However, without making sure that the patches
 meet standards and are considering all the options, you risk the opposite
 the code gets worse, there are knock on affects.

 I'm as frustrated with the current process as most as I've been waiting
 for the MVC5 stuff to be fixed and merged for a while.  What I would say is
 though, I'd prefer for MVC4 to continue working as is, than some MVC5 stuff
 work and MVC4 become unstable.

 You have to appreciate the position Miguel and the mono team are in.  They
 have a commercial product to maintain, that without that, they wouldn't be
 able to eat (or put on what I've been told are awesome parties).

 At the end of the day, having mono is better than not.  Also, it's better
 maintained than some other open source projects.

 That said, I think that there isn't enough time, currently, dedicated to
 code that isn't useful to Xamarin.  They have taken stewardship of a
 platform that goes beyond mobile platforms, and are controlling the
 elements that are not part of their core business, however, they are acting
 as a bottleneck for those.

 In short, there is a lot room for improvement, but where we are is by no
 means a bad position.

 Just my two (or possibly four) cents.

 Martin

 On 21 September 2014 02:29, 何子杰Hzj_jie hzj_...@hotmail.com wrote:

  And how to define practices and skills? If you guys do not have time to
 review the changes from contributors out of mono group, then how to find
 out new people to join the group? And, I continually see an incorrect
 design pattern in mono source code, which may cause unexpected behavior in
 multithreading environment. This kind of issue may not be able to get
 totally fixed, until someone else pointed out the design pattern is not
 correct.

 .Hzj_jie
  --
 From: Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com
 Sent: ‎21/‎9/‎2014 3:13
 To: Miguel de Icaza mig...@xamarin.com; 何子杰Hzj_jie
 hzj_...@hotmail.com
 Cc: Steffen Kieß steffen.ki...@ipvs.uni-stuttgart.de;
 mono-devel-list@lists.ximian.com
 Subject: RE: [Mono-dev] System.Json string handling

   From: mono-devel-list-boun...@lists.ximian.com [mailto:
 mono-devel-list-
  boun...@lists.ximian.com] On Behalf Of Edward Ned Harvey (mono)
 
  Tru dat.  However,

 I guess I'm actually trying to say two separate things:

 * When broken stuff doesn't get fixed, it's a disincentive for usage
 adoption.
 and
 * When pull requests get ignored, it is a disincentive to contributors
 trying to contribute anymore (fixing things).

 This is an unfortunate positive feedback loop, which can hopefully be
 broken some day.  I know based on my experience here so far, I'm not going
 to bother trying to fix anything anymore.  My time would have been better
 spent, finding an alternative to mono SslStream instead of trying to
 contribute the fix to make mono SslStream operational.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??

2014-09-15 Thread Chris Tacke
Mono itself, being open source is “use at my own risk”.  Anything that I build 
from source, I’d assume was “use at my own risk”.  I understand and accept that 
risk.

Maybe it’s just that it’s Monday, but that response sure reads to me as 
“There’s been a regression in the build system between 3.2 and 3.10 and though 
you’ve taken the time to report it, we don’t really care.”

When I find and fix this problem locally, should I bother to report it?

-Chris




From: Rodrigo Kumpera [mailto:kump...@gmail.com]
Sent: Monday, September 15, 2014 11:18 AM
To: Chris Tacke
Cc: DavidKarlas; mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??

Minimal builds are not supported for general consumption, use at your own risk.



On Sat, Sep 13, 2014 at 12:03 PM, Chris Tacke 
cta...@opennetcf.commailto:cta...@opennetcf.com wrote:
This may seem like a simplistic question, but how do I explicitly set a C# 
preprocessor directive when manually building with make?  I'd like to *not* 
modify the makefile if I can avoid it, since I'm trying to write procedures 
that can be applied on future builds with a clean pull from git.

-Chris



 -Original Message-
 From: 
 mono-devel-list-boun...@lists.ximian.commailto:mono-devel-list-boun...@lists.ximian.com
  [mailto:mono-devel-list-mailto:mono-devel-list-
 boun...@lists.ximian.commailto:boun...@lists.ximian.com] On Behalf Of Chris 
 Tacke
 Sent: Saturday, September 13, 2014 10:44 AM
 To: DavidKarlas; 
 mono-devel-list@lists.ximian.commailto:mono-devel-list@lists.ximian.com
 Subject: Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??

 The procedure I used for building both was identical (I wrote down the
 procedures the first time and followed then exactly the second).

 The configuration command used was:

 ./configure --prefix=/usr/local --enable-minimal=aot,profiler,com,remoting -
 -with-profile2=no --with-profile4=no

 So it's definitely a difference between the two builds.

 -Chris


  -Original Message-
  From: 
  mono-devel-list-boun...@lists.ximian.commailto:mono-devel-list-boun...@lists.ximian.com
   [mailto:mono-devel-list-mailto:mono-devel-list-
  boun...@lists.ximian.commailto:boun...@lists.ximian.com] On Behalf Of 
  DavidKarlas
  Sent: Saturday, September 13, 2014 1:41 AM
  To: 
  mono-devel-list@lists.ximian.commailto:mono-devel-list@lists.ximian.com
  Subject: Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??
 
  You probably defined DISABLE_REMOTING in 3.2.7 and forgot to define it in
  3.10...
 
 https://github.com/mono/mono/blob/master/mcs/class/corlib/System/Del
  egate.cs#L614
 
 
 
  --
  View this message in context: http://mono.1490590.n4.nabble.com/Mono-
 3-
  10-Threadpool-requires-remoting-tp4663848p4663851.html
  Sent from the Mono - Dev mailing list archive at Nabble.com.
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??

2014-09-13 Thread Chris Tacke
The procedure I used for building both was identical (I wrote down the 
procedures the first time and followed then exactly the second).  

The configuration command used was:

./configure --prefix=/usr/local --enable-minimal=aot,profiler,com,remoting 
--with-profile2=no --with-profile4=no

So it's definitely a difference between the two builds.

-Chris


 -Original Message-
 From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
 boun...@lists.ximian.com] On Behalf Of DavidKarlas
 Sent: Saturday, September 13, 2014 1:41 AM
 To: mono-devel-list@lists.ximian.com
 Subject: Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??
 
 You probably defined DISABLE_REMOTING in 3.2.7 and forgot to define it in
 3.10...
 https://github.com/mono/mono/blob/master/mcs/class/corlib/System/Del
 egate.cs#L614
 
 
 
 --
 View this message in context: http://mono.1490590.n4.nabble.com/Mono-3-
 10-Threadpool-requires-remoting-tp4663848p4663851.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??

2014-09-13 Thread Chris Tacke
This may seem like a simplistic question, but how do I explicitly set a C# 
preprocessor directive when manually building with make?  I'd like to *not* 
modify the makefile if I can avoid it, since I'm trying to write procedures 
that can be applied on future builds with a clean pull from git.

-Chris



 -Original Message-
 From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
 boun...@lists.ximian.com] On Behalf Of Chris Tacke
 Sent: Saturday, September 13, 2014 10:44 AM
 To: DavidKarlas; mono-devel-list@lists.ximian.com
 Subject: Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??
 
 The procedure I used for building both was identical (I wrote down the
 procedures the first time and followed then exactly the second).
 
 The configuration command used was:
 
 ./configure --prefix=/usr/local --enable-minimal=aot,profiler,com,remoting -
 -with-profile2=no --with-profile4=no
 
 So it's definitely a difference between the two builds.
 
 -Chris
 
 
  -Original Message-
  From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
  boun...@lists.ximian.com] On Behalf Of DavidKarlas
  Sent: Saturday, September 13, 2014 1:41 AM
  To: mono-devel-list@lists.ximian.com
  Subject: Re: [Mono-dev] Mono 3.10 Threadpool requires remoting??
 
  You probably defined DISABLE_REMOTING in 3.2.7 and forgot to define it in
  3.10...
 
 https://github.com/mono/mono/blob/master/mcs/class/corlib/System/Del
  egate.cs#L614
 
 
 
  --
  View this message in context: http://mono.1490590.n4.nabble.com/Mono-
 3-
  10-Threadpool-requires-remoting-tp4663848p4663851.html
  Sent from the Mono - Dev mailing list archive at Nabble.com.
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono 3.10 Threadpool requires remoting??

2014-09-12 Thread Chris Tacke
We have a Mono application that we have been successfully running against Mono 
3.2.7 for some time now.  We have built Mono ourselves from the source because 
we're targeting the i586 architecture.

We're targeting a headless embedded device, so we've tried to remove things 
that we don't use.  One of those things is Remoting support.

I just got done getting 3.10.1 built and moved over to a target and now when I 
run our app I get a MissingMethodException.  ThreadPool.QueueUserWorkItem seems 
to be calling into Remoting. What's up with that?

Here's the inner exception and its stack trace:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type 
initializ er for SolutionFamily.SFTrace --- 
System.TypeInitializationException: An excepti on was thrown by the type 
initializer for OpenNETCF.IoC.RootWorkItem --- System. MissingMethodException: 
Cannot find the requested method.
  at (wrapper managed-to-native) 
System.Runtime.Remoting.RemotingServices:IsTrans parentProxy (object)
  at System.Delegate.IsTransparentProxy () [0x0] in filename unknown:0
  at System.Threading.ThreadPool.QueueUserWorkItem 
(System.Threading.WaitCallback  callBack, System.Object state) [0x0] in 
filename unknown:0
  at System.Threading.ThreadPool.QueueUserWorkItem 
(System.Threading.WaitCallback  callBack) [0x0] in filename unknown:0
  at OpenNETCF.IoC.WorkItem..ctor () [0x0] in filename unknown:0
  at OpenNETCF.IoC.RootWorkItem..cctor () [0x0] in filename unknown:0
  --- End of inner exception stack trace ---


I can go back and regenerate everything with Remoting support, but I'm 
wondering why this is getting called at all when it wasn't in 3.2.7.


-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Latest source - build yields Could not load type 'Mono.CSharp.CommandLineParser' (17170)

2014-09-12 Thread Chris Tacke
Bug 17170 is marked as RESOLVED/FIXED but it's still occurring with a git 
pull of the latest as of this morning:

https://bugzilla.xamarin.com/show_bug.cgi?id=17170

The proposed workaround of

make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe

After getting monolite and before running make does work, but a straight 
make fails with Could not load type 'Mono.CSharp.CommandLineParser'

-Chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-list] Mono at embedded devices (arm)

2014-09-12 Thread Chris Morgan
On Fri, Sep 12, 2014 at 7:34 AM,  s...@gmx.li wrote:
 What is the size of the mono runtime environment? Is this suitable for little 
 linux systems?

 I found some packages build for certain linux distris as here vor debian
 (ftp://ftp.de.debian.org/debian/pool/main/m/mono/). This is quite a huge 
 number of files

 Want to get it running at an embedded ARM (cortex A8) device - as beagleboard 
 - where I have my own tiny rootfs,
 so no package management.
 Is there some help in cross compiling it? What about the dependencies?

 Thanks
 Steve
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


Hi Steve.

I'm on a beaglebone black here myself. Yocto has packages for mono so
you shouldn't have to go through the trouble of building it yourself
if you are using Yocto. If using Debian I believe they also have
packages for arm.

I looked at running mono applications on the bbb but quickly ran into
an issue where each instance of mono is using ~14MB of ram. With only
512MB of ram available this overhead was high enough that we've
switched away from mono and back to c++11.

I'd be interested in what you see for memory overhead when running on
the embedded side. My testing so far when looking at memory is on the
desktop side so I'm not sure if the memory overhead will be present on
the embedded side.

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-dev] Debugging on a remote (non-Android) Linux Device

2014-09-09 Thread Chris Tacke
I have a Mono project that mirrors a desktop project (same code, same projects, 
etc).  Most development and debugging is done in Visual Studio and the 
Linux/Mono deployment is done on the build server with a command-line call to 
compile the Mono build.

Generally speaking this all works just fine.  

Occasionally, however, we find behavioral differences between the .NET 
Framework and Mono.  For example, right now I have code that works fine on the 
desktop, but under Mono it's failing (it's a socket call out to SSL, and yes, 
I've added a handler for 
ServicePointManager.ServerCertificateValidationCallback as a test but it still 
fails).

When I run into these types of problems, I use Xamarin Studio to add in 
Console.Writeline calls, build, copy via USB, reiterate cycles and try 
narrowing the problem down.  It's extremely slow and painful.

Xamarin Studio can connect and live debug against iOS and Android.  Is there a 
way to configure Xamarin Studio (or Visual Studio) and my Linux device to do 
the same?  I would suspect that someone out there has tried debugging against a 
Raspberry Pi or something and this would be an analogous situation.

If it matters, the Mono build I'm using is not off-the-shelf - I had to compile 
it myself since we're targeting the i586-cored Quark processors.

I used to have a license for both Xamarin iOS and Xamarin Android, but really 
we don't target those devices so I let them lapse.  I'm hoping that the 
debugging pieces aren't wrapped up in those.

-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [Mono-list] Per-process memory overhead

2014-09-08 Thread Chris Morgan
On Fri, Sep 5, 2014 at 8:03 PM, Chris Morgan chmor...@gmail.com wrote:

 Posting to the devel list to see if anyone has any other ideas. I'd love
 to get the overhead of these processes down rather than be worried about
 running out of memory or having to rewrite code in c/c++...


 On Sun, Aug 31, 2014 at 10:26 AM, Agustin Gimenez geni...@gmail.com
 wrote:

 Hi Chris.

 .net and mono always have some overhead, so I think it's normal.

 Instead of creating a dozen of processes, why don't you create just one
 and as many buses as you need inside that process?


 The thought crossed my mind to do that. It isn't the simplest approach
 though but it would work. If it works then its suitable if say 12 of these
 bridges would fit inside of a single 14MB process. If not then I'll end up
 having to reimplement in c and I'd prefer not to go that route.

 Is ~14MB really the overhead I should be expecting per-process? I haven't
 tried mono 3.6 yet but nothing in the release notes indicated a large
 memory overhead savings.





 Cheers.
 El 31/08/2014 02:52, Chris Morgan chmor...@gmail.com escribió:

  Hello.

 I'm looking to use mono for some dbus bridges with dbus-sharp. I've got
 a pretty simple bridge, a couple of classes and a single dbus interface
 that bridges to a socket in a console application. It looks like each
 instance has ~14MB of memory overhead, from smem output:

 30038 cmorgan  mono display_interface.exe 01679219650
  23488

 So, 16.7MB USS, 19.65MB PSS and 23.48MB RSS.

 Using mono 3.4 on Fedora 20.


 I ran the alloc profiler on the application and it looks like there was
 some 700k of memory allocated in the application itself, quite small
 compared to the process memory.

 I'd like to be able to use mono to create a dozen or more of these dbus
 bridges but the embedded arm system I'm using only has 512MB of ram.

 I haven't tested on the arm platform yet, but I'm assuming a similar
 amount of overhead for each process.

 Is this a normal amount of overhead per-process? Thoughts on how I might
 be able to reduce it?

 Chris


 ___
 Mono-list maillist  -  mono-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list





Anyone have any experience in this area of trying to run several mono
applications on an embedded system with limited memory?

Chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Fwd: [Mono-list] Per-process memory overhead

2014-09-05 Thread Chris Morgan
Posting to the devel list to see if anyone has any other ideas. I'd love to
get the overhead of these processes down rather than be worried about
running out of memory or having to rewrite code in c/c++...


On Sun, Aug 31, 2014 at 10:26 AM, Agustin Gimenez geni...@gmail.com wrote:

 Hi Chris.

 .net and mono always have some overhead, so I think it's normal.

 Instead of creating a dozen of processes, why don't you create just one
 and as many buses as you need inside that process?


The thought crossed my mind to do that. It isn't the simplest approach
though but it would work. If it works then its suitable if say 12 of these
bridges would fit inside of a single 14MB process. If not then I'll end up
having to reimplement in c and I'd prefer not to go that route.

Is ~14MB really the overhead I should be expecting per-process? I haven't
tried mono 3.6 yet but nothing in the release notes indicated a large
memory overhead savings.





 Cheers.
 El 31/08/2014 02:52, Chris Morgan chmor...@gmail.com escribió:

  Hello.

 I'm looking to use mono for some dbus bridges with dbus-sharp. I've got a
 pretty simple bridge, a couple of classes and a single dbus interface that
 bridges to a socket in a console application. It looks like each instance
 has ~14MB of memory overhead, from smem output:

 30038 cmorgan  mono display_interface.exe 01679219650
  23488

 So, 16.7MB USS, 19.65MB PSS and 23.48MB RSS.

 Using mono 3.4 on Fedora 20.


 I ran the alloc profiler on the application and it looks like there was
 some 700k of memory allocated in the application itself, quite small
 compared to the process memory.

 I'd like to be able to use mono to create a dozen or more of these dbus
 bridges but the embedded arm system I'm using only has 512MB of ram.

 I haven't tested on the arm platform yet, but I'm assuming a similar
 amount of overhead for each process.

 Is this a normal amount of overhead per-process? Thoughts on how I might
 be able to reduce it?

 Chris


 ___
 Mono-list maillist  -  mono-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-list] Per-process memory overhead

2014-08-31 Thread Chris Morgan
On Sun, Aug 31, 2014 at 10:26 AM, Agustin Gimenez geni...@gmail.com wrote:

 Hi Chris.

 .net and mono always have some overhead, so I think it's normal.

 Instead of creating a dozen of processes, why don't you create just one
 and as many buses as you need inside that process?


The thought crossed my mind to do that. It isn't the simplest approach
though but it would work. If it works then its suitable if say 12 of these
bridges would fit inside of a single 14MB process. If not then I'll end up
having to reimplement in c and I'd prefer not to go that route.

Is ~14MB really the overhead I should be expecting per-process? I haven't
tried mono 3.6 yet but nothing in the release notes indicated a large
memory overhead savings.





 Cheers.
 El 31/08/2014 02:52, Chris Morgan chmor...@gmail.com escribió:

  Hello.

 I'm looking to use mono for some dbus bridges with dbus-sharp. I've got a
 pretty simple bridge, a couple of classes and a single dbus interface that
 bridges to a socket in a console application. It looks like each instance
 has ~14MB of memory overhead, from smem output:

 30038 cmorgan  mono display_interface.exe 01679219650
  23488

 So, 16.7MB USS, 19.65MB PSS and 23.48MB RSS.

 Using mono 3.4 on Fedora 20.


 I ran the alloc profiler on the application and it looks like there was
 some 700k of memory allocated in the application itself, quite small
 compared to the process memory.

 I'd like to be able to use mono to create a dozen or more of these dbus
 bridges but the embedded arm system I'm using only has 512MB of ram.

 I haven't tested on the arm platform yet, but I'm assuming a similar
 amount of overhead for each process.

 Is this a normal amount of overhead per-process? Thoughts on how I might
 be able to reduce it?

 Chris


 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Per-process memory overhead

2014-08-30 Thread Chris Morgan
Hello.

I'm looking to use mono for some dbus bridges with dbus-sharp. I've got a
pretty simple bridge, a couple of classes and a single dbus interface that
bridges to a socket in a console application. It looks like each instance
has ~14MB of memory overhead, from smem output:

30038 cmorgan  mono display_interface.exe 01679219650
 23488

So, 16.7MB USS, 19.65MB PSS and 23.48MB RSS.

Using mono 3.4 on Fedora 20.


I ran the alloc profiler on the application and it looks like there was
some 700k of memory allocated in the application itself, quite small
compared to the process memory.

I'd like to be able to use mono to create a dozen or more of these dbus
bridges but the embedded arm system I'm using only has 512MB of ram.

I haven't tested on the arm platform yet, but I'm assuming a similar amount
of overhead for each process.

Is this a normal amount of overhead per-process? Thoughts on how I might be
able to reduce it?

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] HttpListener SSL client certificate

2014-08-08 Thread Chris Tacke
“Let a real web server be the web server” isn’t much of an answer.  It’s likely 
that the solution doesn’t allow the use of a “real” web server or he likely 
wouldn’t be asking the question. I have a similar scenario where I’m going to 
need to serve up over SSL and I can’t use one so I, too, am interested in how 
this will work out.  I’ve probably got a little time until I have to fully 
commit to a solution, but it sounds like several of us are trying to solve the 
same problem.

-Chris


From: Edward Ned Harvey (mono)mailto:edward.harvey.m...@clevertrove.com
Sent: ‎Friday‎, ‎August‎ ‎8‎, ‎2014 ‎9‎:‎28‎ ‎AM
To: DrGusmanmailto:geni...@gmail.com, 
mono-list@lists.ximian.commailto:mono-list@lists.ximian.com

 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of DrGusman

 I will add the patches you said on the previous postto my mono branch and
 will give it a try, if found it's really unstable or troublesome then I will
 use one of my backup plans, add a nginx router which will do the ssl
 decryption or using also nginx connect through FastCGI.

Oh yeah.  I would expect, if you want to run C# on a web server, it's almost 
certainly best for you to do some of the ASP stuff, fastcgi, or similar.  In 
other words, let a real web server be the web server, because they're focused 
on making web servers stable, secure, and supportable.


 I hope with the Xamarin boom the mono project get more alive as novell left
 it semi abandoned when was sold, the las 3.7 mono version is really a giant
 leap and Miguel and it's team seem to be working really hard (I am also a
 Xamarin customer, got MT and MD).

Maybe.  But I'm doubtful.  It seems to me that Xamarin is focused only on 
mobile devices and basically nothing else.  (Even coverage for mono on OSX is 
very sparse.)


 I'm curious, what do you plan to do to stop using the SslSocket?

We need to make at least a small research project into that.  I'm guessing it 
will probably be Bouncy Castle.  Not 100% sure yet.  Perhaps openssl - but 
since they're really C++ with a crude managed wrapper around it, we might not 
use openssl for that reason.  Bouncy Castle is at least *meant* to be managed 
code, but I recently uncovered a kind of major flaw with their SecureRandom, 
which apparently gets used all over the place, so we'll see.  Like I said, 
haven't made up our minds yet.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-dev] Mono, TDS and SQL Server 2012

2014-08-01 Thread Chris Tacke
I'm trying to add SQL Server support to the Mono (on Linux, not Android if it 
matters) version of one of our products.

I have a codebase that works fine on Windows, but under Mono, it's not 
behaving.  We're using SQL Authentication, not NT.

I am able to get back a list of table names, so I know it's talking to the 
database, but when I attempt to query rows from a table I get this:

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Unknown packet type 129
  at Mono.Data.Tds.Protocol.TdsComm.GetPhysicalPacketHeader () [0x0] in 
filename unknown:0
  at Mono.Data.Tds.Protocol.TdsComm.GetPhysicalPacket () [0x0] in filename 
unknown:0
  at Mono.Data.Tds.Protocol.TdsComm.Peek () [0x0] in filename unknown:0
  at Mono.Data.Tds.Protocol.Tds.NextResult () [0x0] in filename unknown:0
  at System.Data.SqlClient.SqlCommand.ExecuteScalar () [0x0] in filename 
unknown:0
  at OpenNETCF.ORM.SQLStoreBase`1[OpenNETCF.ORM.SqlEntityInfo].ExecuteScalar 
(System.String sql) [0x0] in filename unknown:0
  at OpenNETCF.ORM.SqlServerDataStore.get_ServerVersion () [0x0] in 
filename unknown:0
  at OpenNETCF.ORM.SqlServerDataStore.Fetch (System.String entityName, Int32 
fetchCount, Int32 firstRowOffset, System.String sortField, FieldSearchOrder 
sortOrder, OpenNETCF.ORM.FilterCondition filter, Boolean fillReferences) 
[0x0] in filename unknown:0
  at SolutionFamily.Storage.DataEntityProvider.GetEntityInstances 
(System.String entityName, Int32 skipNumber, Int32 retrieveNumber) [0x0] in 
filename unknown:0
{more call stack omitted}

So it looks like the TDS version in Mono is old, maybe?  Packet type 129 looks 
like it's a result packet:

http://www.freetds.org/tds.html#t129

And it's been in use since SQL Server 7, which itself is pretty far from 
recent.

So my questions, I guess, Are:

-  Is connecting to a SQL Server 2012 database from a Mono app a 
supported scenario?

-  Is there a newer version of TDS on the System.Data.* stuff available 
that adds support?

-  Has anyone had any luck connecting to a modern version of SQL 
Server?

-  Any thoughts on how to proceed (other than debugging and attempting 
to implement this stuff myself)?

-Chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono, TDS and SQL Server 2012

2014-08-01 Thread Chris Tacke
Martin,

Thanks.  Here are the details:


-  Running on Wind River Linux 3.4.43.5 on a Quark processor

-  Mono 3.2.7, built from source by me, specifically for 586 processors

-  CLR Version 4.0.30319.1720

Repro is actually pretty simple.  Create a SqlCommand and the call this:

command.ExecuteScalar(“SELECT SERVERPROPERTY('productversion')”);

And it goes south.  It also fails if you use ExecuteReader with the same 
statement and try to read the first field of the first row.

-Chris



From: mar...@my2cents.co.uk [mailto:mar...@my2cents.co.uk] On Behalf Of Martin 
Thwaites
Sent: Friday, August 01, 2014 4:05 PM
To: Chris Tacke
Cc: mono-devel-list
Subject: Re: [Mono-dev] Mono, TDS and SQL Server 2012


Couple of things that will help.

Mono version, platform and whether it was compiled from source or installed by 
soke other means
Sample app (not your entire codename, just a basic console app that replicates 
the issue).

In the first instance I would look at replicating this using basic stuff, I.e. 
Just a basic datareader on the table in a bear console app.

I believe it does work against 2012 though.  So I could be a specific data type 
or possibly specific data that's causing it.

I can possibly try to replicate on Sunday if you don't get any further 
response, but I think it's highly likely it's data or configuration specific 
not sql version.

Martin
On 1 Aug 2014 19:02, Chris Tacke 
cta...@opennetcf.commailto:cta...@opennetcf.com wrote:
I’m trying to add SQL Server support to the Mono (on Linux, not Android if it 
matters) version of one of our products.

I have a codebase that works fine on Windows, but under Mono, it’s not 
behaving.  We’re using SQL Authentication, not NT.

I am able to get back a list of table names, so I know it’s “talking” to the 
database, but when I attempt to query rows from a table I get this:

[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Unknown packet type 129
  at Mono.Data.Tds.Protocol.TdsComm.GetPhysicalPacketHeader () [0x0] in 
filename unknown:0
  at Mono.Data.Tds.Protocol.TdsComm.GetPhysicalPacket () [0x0] in filename 
unknown:0
  at Mono.Data.Tds.Protocol.TdsComm.Peek () [0x0] in filename unknown:0
  at Mono.Data.Tds.Protocol.Tds.NextResult () [0x0] in filename unknown:0
  at System.Data.SqlClient.SqlCommand.ExecuteScalar () [0x0] in filename 
unknown:0
  at OpenNETCF.ORM.SQLStoreBase`1[OpenNETCF.ORM.SqlEntityInfo].ExecuteScalar 
(System.String sql) [0x0] in filename unknown:0
  at OpenNETCF.ORM.SqlServerDataStore.get_ServerVersion () [0x0] in 
filename unknown:0
  at OpenNETCF.ORM.SqlServerDataStore.Fetch (System.String entityName, Int32 
fetchCount, Int32 firstRowOffset, System.String sortField, FieldSearchOrder 
sortOrder, OpenNETCF.ORM.FilterCondition filter, Boolean fillReferences) 
[0x0] in filename unknown:0
  at SolutionFamily.Storage.DataEntityProvider.GetEntityInstances 
(System.String entityName, Int32 skipNumber, Int32 retrieveNumber) [0x0] in 
filename unknown:0
{more call stack omitted}

So it looks like the TDS version in Mono is old, maybe?  Packet type 129 looks 
like it’s a “result” packet:

http://www.freetds.org/tds.html#t129

And it’s been in use since SQL Server 7, which itself is pretty far from 
“recent”.

So my questions, I guess, Are:

-  Is connecting to a SQL Server 2012 database from a Mono app a 
supported scenario?

-  Is there a newer version of TDS on the System.Data.* stuff available 
that adds support?

-  Has anyone had any luck connecting to a “modern” version of SQL 
Server?

-  Any thoughts on how to proceed (other than debugging and attempting 
to implement this stuff myself)?

-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Debian CI PPA for Ubuntu/Debian

2014-06-16 Thread Chris Tacke
Does this mean you ‘ll start looking at hosting official packages for other 
distros too?  For example, I currently maintain a 586 (not 686) build for Wind 
River Linux.  For a variety of reasons, not having to do that myself sure would 
be nice.

-Chris


From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Miguel de Icaza
Sent: Monday, June 16, 2014 8:16 AM
To: Alexander Trauzzi
Cc: mono-devel
Subject: Re: [Mono-dev] Debian CI  PPA for Ubuntu/Debian

Hello Alexander,

We are getting our house in order in terms of Linux support.   Jo Shields, one 
of the Mono/Debian maintainers will be joining Xamarin this July to work on 
both keeping our packages up to date on Linux, as well as restoring our sanity 
when it comes to regressions, public CI and other services that have languished.

We really wish he could start earlier, but he had to wrap up a long commitment 
with his current employer.

That said, we look forward for a bright and lovely future for Mono on Linux 
again.

Miguel

On Mon, Jun 16, 2014 at 6:07 AM, Alexander Trauzzi 
atrau...@gmail.commailto:atrau...@gmail.com wrote:
Hello to the Mono devel list!

I started a discussion this weekend on ubuntu-devel-discuss to talk about Mono 
on that platform and getting more current versions available. You can catch up 
here: 
https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-June/015005.html

As we started to untangle things, it came up that the current CI for Mono on 
Debian is currently not working.  I'm not familiar with building Mono or 
properly packaging software, however I'm wondering if this is something 
Xamarin/Mono could take a look at?

I know historically this relationship has been a bit strange, but what I'm 
looking for here as a user of Mono is for the two sides to somehow come 
together -- I think there's a decent amount interest in having the latest  
greatest available on Ubuntu.

Failing all that, perhaps at the very least, the discussion here on this list 
could focus on what exactly it would take (from Mono/Xamarin's perspective) to 
get current versions of Mono flowing on Ubuntu again.  Also, feel free to jump 
over to the other discussion if it's appropriate.

Before I finish, a choice tweet from a while back: 
https://twitter.com/migueldeicaza/status/442491724683018241
This might just be me, but ensuring developers on Ubuntu are on the same 
footing as Mac/Windows would definitely go a long way towards that hope.

All the best!


  Alexander Trauzzi
  atrau...@gmail.commailto:atrau...@gmail.com

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Debian CI PPA for Ubuntu/Debian

2014-06-16 Thread Chris Tacke
Agreed.  My major pain point with the distro right now is in CI.  I'm using 
Jenkins on a Windows machine to build our C# application products and 
installers for both Windows and Linux platforms.  I have it all working, 
including generating tarballs for Linux.  The one problem is that I don't have 
it pulling and rebuilding Mono, because my steps for that are done on a 
separate Ubuntu VM.  That makes it a manual (i.e. not done very often because 
I'm too busy) process.  It also seems inefficient because anyone else looking 
for a scaled down (we customize what goes into the build to exclude winforms 
and a lot of crusft that simply isn't needed for a headless embedded device), 
586 device like the Intel Galileo dev system is unlikely to ever find our Mono 
tarball on our public FTP.

A central CI system and a central repository for builds would be very useful in 
reducing fragmentation.

-Chris


From: bobsummerw...@gmail.com [mailto:bobsummerw...@gmail.com] On Behalf Of Bob 
Summerwill
Sent: Monday, June 16, 2014 10:03 AM
To: Miguel de Icaza
Cc: Chris Tacke; mono-devel
Subject: Re: [Mono-dev] Debian CI  PPA for Ubuntu/Debian


Hey Chris and Miguel,
I need to support an extra platform too, for Tizen (see http://monotizen.com).

Perhaps we can collaborate on producing some good standard patterns for 
community-supported additional platform support?

It would be good if there was a simple way for additional platforms to hook 
into common CI infrastucture (with contributed VMs), and to expose their 
binaries through the Mono Project website in a common way.

It is great that Xamarin is bringing Linux support back up to first-class 
support, but there will always be a role for community supported lesser 
platforms, and there is no need or benefit in trying to do those in the same 
way as the core platforms.

Cheers,
Bob

On Mon, Jun 16, 2014 at 7:39 AM, Miguel de Icaza 
mig...@xamarin.commailto:mig...@xamarin.com wrote:
Hello Chris,

I am not sure that we will cover every possible Linux, but we will try to cover 
the major Linux distributions/versions.

So there is still room for other minor versions to keep their own builds going.

On Mon, Jun 16, 2014 at 7:34 AM, Chris Tacke 
cta...@opennetcf.commailto:cta...@opennetcf.com wrote:
Does this mean you 'll start looking at hosting official packages for other 
distros too?  For example, I currently maintain a 586 (not 686) build for Wind 
River Linux.  For a variety of reasons, not having to do that myself sure would 
be nice.

-Chris


From: 
mono-devel-list-boun...@lists.ximian.commailto:mono-devel-list-boun...@lists.ximian.com
 
[mailto:mono-devel-list-boun...@lists.ximian.commailto:mono-devel-list-boun...@lists.ximian.com]
 On Behalf Of Miguel de Icaza
Sent: Monday, June 16, 2014 8:16 AM
To: Alexander Trauzzi
Cc: mono-devel
Subject: Re: [Mono-dev] Debian CI  PPA for Ubuntu/Debian

Hello Alexander,

We are getting our house in order in terms of Linux support.   Jo Shields, one 
of the Mono/Debian maintainers will be joining Xamarin this July to work on 
both keeping our packages up to date on Linux, as well as restoring our sanity 
when it comes to regressions, public CI and other services that have languished.

We really wish he could start earlier, but he had to wrap up a long commitment 
with his current employer.

That said, we look forward for a bright and lovely future for Mono on Linux 
again.

Miguel

On Mon, Jun 16, 2014 at 6:07 AM, Alexander Trauzzi 
atrau...@gmail.commailto:atrau...@gmail.com wrote:
Hello to the Mono devel list!

I started a discussion this weekend on ubuntu-devel-discuss to talk about Mono 
on that platform and getting more current versions available. You can catch up 
here: 
https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-June/015005.html

As we started to untangle things, it came up that the current CI for Mono on 
Debian is currently not working.  I'm not familiar with building Mono or 
properly packaging software, however I'm wondering if this is something 
Xamarin/Mono could take a look at?

I know historically this relationship has been a bit strange, but what I'm 
looking for here as a user of Mono is for the two sides to somehow come 
together -- I think there's a decent amount interest in having the latest  
greatest available on Ubuntu.

Failing all that, perhaps at the very least, the discussion here on this list 
could focus on what exactly it would take (from Mono/Xamarin's perspective) to 
get current versions of Mono flowing on Ubuntu again.  Also, feel free to jump 
over to the other discussion if it's appropriate.

Before I finish, a choice tweet from a while back: 
https://twitter.com/migueldeicaza/status/442491724683018241
This might just be me, but ensuring developers on Ubuntu are on the same 
footing as Mac/Windows would definitely go a long way towards that hope.

All the best!


  Alexander Trauzzi
  atrau...@gmail.commailto:atrau...@gmail.com

Re: [Mono-dev] Mono maintainers: Please publicize your membership on the GitHub organization

2014-06-10 Thread Chris Barr
I don't want to do a pull request for Mono.

Chris Barr
Senior Application Developer
Naples Area Board of REALTORS® and
Association of Real Estate Professionals, Inc.
1455 Pine Ridge Road 
Naples, FL 34109-2139
Phone: 239-597-1666
Email: ch...@nabor.com

***
CONFIDENTIALITY NOTE:
This electronic mail transmission may contain confidential or privileged 
information. If you believe that you have received this message in error,  
please notify the sender by reply transmission and delete the message without 
copying or disclosing it.  All personal messages express views solely of the 
sender, which are not to be attributed to the Naples Area Board of Realtors. 
**



-Original Message-
From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Alex Rønne 
Petersen
Sent: Tuesday, June 10, 2014 2:52 PM
To: mono-devel-list@lists.ximian.com
Subject: [Mono-dev] Mono maintainers: Please publicize your membership on the 
GitHub organization

Hi,

This is necessary so that Jenkins [0] can see your membership and test any pull 
requests you open automatically.

You can publicize your membership here: https://github.com/orgs/mono/members

Regards,
Alex

[0] http://monojenkins.cloudapp.net/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Update on Build System

2014-05-26 Thread Chris Tacke
Miguel,

This is great news. Are there any plans to update the build system to allow us 
to compile the runtime itself using Visual Studio (i.e. a Microsoft compiler)?

Now before everyone starts with the eye rolling and “why the hell would you 
want to do that?” questions, let me explain.  As of today, we can create 
applications in C# that will run on Windows and a large array of Linux machines 
(including Android) but Windows CE has been orphaned.  Microsoft is not putting 
any effort into the Compact Framework, but there are still people developing 
for Windows CE devices.  I’d like to put a last nail in the coffin of the 
Compact Framework by getting Mono supported on Windows CE so we can all move 
into using technology from the current decade, not the last one.

I don’t see any real path for getting the runtimes to compile for Windows CE  
for ARM and 586 (not 686, since we have new Intel processors now that are 586 
based).  There is an old (last touch in 2009) CeGCC project that might be a 
step, but I was hoping for something a little simpler.  I’m up for any 
suggestions.

-Chris Tacke





From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Miguel de Icaza
Sent: Friday, May 23, 2014 9:59 PM
To: mono-devel
Subject: [Mono-dev] Update on Build System

Hey guys,

#1 Makefile Build System Update

So the clean staged setup has been added to mono/master and in practice most of 
you will never notice an improvement.

Those working on libraries that had cross dependencies will enjoy reliable and 
working builds.   If you make a change in say System, and you type make in 
mcs/class/System, it will make sure that all the dependencies are properly 
compiled and the result will be stable.

#2 MSBuild setup

Based on the work above, I have updated the MSBuild setup, and it is now 
possible to build most of the managed code with xbuild.   This means that you 
can use this from Visual Studio or Xamarin Studio.

Since xbuild does not support passing /keyfile to the C# compiler, I still have 
to fix about 6-7 assemblies that use -keyfile to be signed.

Once that happens, you should be able to build all of Mono's managed code with:

xbuild msvc/scripts/net_4_5.sln

Currently I disabled generating project files for profiles other than 4.5, just 
because it is easier to debug this way.

I am also a bit sad that our xbuild does not have any support for parallel 
builds, it would have been a neat hack to make the xbuild-based build system 
parallel and get this for free.

#3 Future Parallel Work - Makefiles

I tried to implement parallel builds for mcs/class/Facades, and while it works, 
it regressed some of the other standard targets that we have (the other 
-local).   I will have to revisit this later.

But the principle behind the patch that enabled this could be used for 
mcs/class and parallelize all the builds as well.   We only need to (a) 
generate the assembly dependencies [1] and (b) we need to figure out the -local 
target breakage (same stuff I broke for Facades).

[1]  (which we have from the xbuild work above)
Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Running autogen.sh from outside of source tree?

2014-05-21 Thread Chris Morgan
Hello.

I'm trying to build mono under Yocto. Recently (so I've heard) there
were some changes such that the autotools scripts are being run from
outside of the source tree.

I presume this is something like:

cd mono
mkdir monobuild
cd monobuild
../autogen.sh


[cmorgan@localhost monobuild]$ ../autogen.sh --prefix=/home/cmorgan/mono-prefix
grep: configure.in: No such file or directory
../autogen.sh: line 125: mono/mini/Makefile.am: No such file or directory
../autogen.sh: line 126: mono/metadata/Makefile.am: No such file or directory
Running aclocal -I m4 -I .  ...
aclocal: error: 'configure.ac' is required

**Error**: aclocal failed. This may mean that you have not
installed all of the packages you need, or you may need to
set ACLOCAL_FLAGS to include -I $prefix/share/aclocal
for the prefix where you installed the packages whose
macros were not found


This doesn't appear to work because several things in autogen.sh
assume that the files are present in the current working directory.
Some other steps however do use $srcdir.

My question is whether it seems like a reasonable idea to correct
autogen.sh to remove the assumption that builddir == sourcedir. If so
then I'll go down this route and send a patch. If not then I'll use a
Yocto work around for projects that don't/can't support doing that.
I'm not big on papering over issues so I do prefer the first option
but I didn't want to start work if it turns out that it may be a
nearly impossible task.

Chris
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Running autogen.sh from outside of source tree?

2014-05-21 Thread Chris Morgan
Hi Zoltan.

No, I get that. The question is whether its possible to improve
autogen.sh to support running out of tree by adding some more $srcdir
entries, or whatever, at the appropriate locations.

Chris



On Wed, May 21, 2014 at 3:37 PM, Zoltan Varga var...@gmail.com wrote:
 Hi,

   autogen.sh needs to be run from the tree, its configure+make which can be
 run out-of-tree.

 Zoltan


 On Wed, May 21, 2014 at 9:32 PM, Chris Morgan chmor...@gmail.com wrote:

 Hello.

 I'm trying to build mono under Yocto. Recently (so I've heard) there
 were some changes such that the autotools scripts are being run from
 outside of the source tree.

 I presume this is something like:

 cd mono
 mkdir monobuild
 cd monobuild
 ../autogen.sh


 [cmorgan@localhost monobuild]$ ../autogen.sh
 --prefix=/home/cmorgan/mono-prefix
 grep: configure.in: No such file or directory
 ../autogen.sh: line 125: mono/mini/Makefile.am: No such file or directory
 ../autogen.sh: line 126: mono/metadata/Makefile.am: No such file or
 directory
 Running aclocal -I m4 -I .  ...
 aclocal: error: 'configure.ac' is required

 **Error**: aclocal failed. This may mean that you have not
 installed all of the packages you need, or you may need to
 set ACLOCAL_FLAGS to include -I $prefix/share/aclocal
 for the prefix where you installed the packages whose
 macros were not found


 This doesn't appear to work because several things in autogen.sh
 assume that the files are present in the current working directory.
 Some other steps however do use $srcdir.

 My question is whether it seems like a reasonable idea to correct
 autogen.sh to remove the assumption that builddir == sourcedir. If so
 then I'll go down this route and send a patch. If not then I'll use a
 Yocto work around for projects that don't/can't support doing that.
 I'm not big on papering over issues so I do prefer the first option
 but I didn't want to start work if it turns out that it may be a
 nearly impossible task.

 Chris
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Running autogen.sh from outside of source tree?

2014-05-21 Thread Chris Morgan
So I'm just trying to find out if it seems feasible, at which point
I'll go to it for a few and see if I can do so.

Chris


On Wed, May 21, 2014 at 3:39 PM, Chris Morgan chmor...@gmail.com wrote:
 Hi Zoltan.

 No, I get that. The question is whether its possible to improve
 autogen.sh to support running out of tree by adding some more $srcdir
 entries, or whatever, at the appropriate locations.

 Chris



 On Wed, May 21, 2014 at 3:37 PM, Zoltan Varga var...@gmail.com wrote:
 Hi,

   autogen.sh needs to be run from the tree, its configure+make which can be
 run out-of-tree.

 Zoltan


 On Wed, May 21, 2014 at 9:32 PM, Chris Morgan chmor...@gmail.com wrote:

 Hello.

 I'm trying to build mono under Yocto. Recently (so I've heard) there
 were some changes such that the autotools scripts are being run from
 outside of the source tree.

 I presume this is something like:

 cd mono
 mkdir monobuild
 cd monobuild
 ../autogen.sh


 [cmorgan@localhost monobuild]$ ../autogen.sh
 --prefix=/home/cmorgan/mono-prefix
 grep: configure.in: No such file or directory
 ../autogen.sh: line 125: mono/mini/Makefile.am: No such file or directory
 ../autogen.sh: line 126: mono/metadata/Makefile.am: No such file or
 directory
 Running aclocal -I m4 -I .  ...
 aclocal: error: 'configure.ac' is required

 **Error**: aclocal failed. This may mean that you have not
 installed all of the packages you need, or you may need to
 set ACLOCAL_FLAGS to include -I $prefix/share/aclocal
 for the prefix where you installed the packages whose
 macros were not found


 This doesn't appear to work because several things in autogen.sh
 assume that the files are present in the current working directory.
 Some other steps however do use $srcdir.

 My question is whether it seems like a reasonable idea to correct
 autogen.sh to remove the assumption that builddir == sourcedir. If so
 then I'll go down this route and send a patch. If not then I'll use a
 Yocto work around for projects that don't/can't support doing that.
 I'm not big on papering over issues so I do prefer the first option
 but I didn't want to start work if it turns out that it may be a
 nearly impossible task.

 Chris
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Running autogen.sh from outside of source tree?

2014-05-21 Thread Chris Morgan
Its to avoid having to use autotools-broken vs. autotools scripts
when building mono in Yocto. So yeah, not a big difference and its
fixable by using autotools-broken but then that means the mono build
is somehow broken heh

Chris


On Wed, May 21, 2014 at 3:57 PM, Zoltan Varga var...@gmail.com wrote:
 Hi,

   autogen.sh is designed to generate configure and Makefile.in files into
 the source tree, so they can be distributed. Generating them outside the
 source tree doesn't serve much purpose imho.

 Zoltan


 On Wed, May 21, 2014 at 9:54 PM, Chris Morgan chmor...@gmail.com wrote:

 So I'm just trying to find out if it seems feasible, at which point
 I'll go to it for a few and see if I can do so.

 Chris


 On Wed, May 21, 2014 at 3:39 PM, Chris Morgan chmor...@gmail.com wrote:
  Hi Zoltan.
 
  No, I get that. The question is whether its possible to improve
  autogen.sh to support running out of tree by adding some more $srcdir
  entries, or whatever, at the appropriate locations.
 
  Chris
 
 
 
  On Wed, May 21, 2014 at 3:37 PM, Zoltan Varga var...@gmail.com wrote:
  Hi,
 
autogen.sh needs to be run from the tree, its configure+make which
  can be
  run out-of-tree.
 
  Zoltan
 
 
  On Wed, May 21, 2014 at 9:32 PM, Chris Morgan chmor...@gmail.com
  wrote:
 
  Hello.
 
  I'm trying to build mono under Yocto. Recently (so I've heard) there
  were some changes such that the autotools scripts are being run from
  outside of the source tree.
 
  I presume this is something like:
 
  cd mono
  mkdir monobuild
  cd monobuild
  ../autogen.sh
 
 
  [cmorgan@localhost monobuild]$ ../autogen.sh
  --prefix=/home/cmorgan/mono-prefix
  grep: configure.in: No such file or directory
  ../autogen.sh: line 125: mono/mini/Makefile.am: No such file or
  directory
  ../autogen.sh: line 126: mono/metadata/Makefile.am: No such file or
  directory
  Running aclocal -I m4 -I .  ...
  aclocal: error: 'configure.ac' is required
 
  **Error**: aclocal failed. This may mean that you have not
  installed all of the packages you need, or you may need to
  set ACLOCAL_FLAGS to include -I $prefix/share/aclocal
  for the prefix where you installed the packages whose
  macros were not found
 
 
  This doesn't appear to work because several things in autogen.sh
  assume that the files are present in the current working directory.
  Some other steps however do use $srcdir.
 
  My question is whether it seems like a reasonable idea to correct
  autogen.sh to remove the assumption that builddir == sourcedir. If so
  then I'll go down this route and send a patch. If not then I'll use a
  Yocto work around for projects that don't/can't support doing that.
  I'm not big on papering over issues so I do prefer the first option
  but I didn't want to start work if it turns out that it may be a
  nearly impossible task.
 
  Chris
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Running autogen.sh from outside of source tree?

2014-05-21 Thread Chris Morgan
Hmm.

I don't see any mention of NOCONFIGURE=1 in README.md.

If it were possible to run autogen.sh from outside of tree it would
make building under Yocto a little bit cleaner. Yocto is very
particular about separating source from build from installed files so
they can automate package generation, check for misbehaving packages
etc.

What is interesting is that a good portion of autogen.sh is ok with
being run out of the source directory.

Is it feasible to continue to improve autogen.sh to be run from
outside of the source directory? If so, I can hack on it a bit
tomorrow and see how I make out.

Chris




On Wed, May 21, 2014 at 4:39 PM, Miguel de Icaza mig...@xamarin.com wrote:
 Hello,

 To build Mono with a different prefix, you need to use a tarball package,
 that has all of the bits that are not typically checked into git.

 That said, if you want to use git, you need to at least run this:

 NOCONFIGURE=1 ./autogen.sh

 On the directory where you did your checkout, and then you can run configure
 from a separate directory.


 On Wed, May 21, 2014 at 3:32 PM, Chris Morgan chmor...@gmail.com wrote:

 Hello.

 I'm trying to build mono under Yocto. Recently (so I've heard) there
 were some changes such that the autotools scripts are being run from
 outside of the source tree.

 I presume this is something like:

 cd mono
 mkdir monobuild
 cd monobuild
 ../autogen.sh


 [cmorgan@localhost monobuild]$ ../autogen.sh
 --prefix=/home/cmorgan/mono-prefix
 grep: configure.in: No such file or directory
 ../autogen.sh: line 125: mono/mini/Makefile.am: No such file or directory
 ../autogen.sh: line 126: mono/metadata/Makefile.am: No such file or
 directory
 Running aclocal -I m4 -I .  ...
 aclocal: error: 'configure.ac' is required

 **Error**: aclocal failed. This may mean that you have not
 installed all of the packages you need, or you may need to
 set ACLOCAL_FLAGS to include -I $prefix/share/aclocal
 for the prefix where you installed the packages whose
 macros were not found


 This doesn't appear to work because several things in autogen.sh
 assume that the files are present in the current working directory.
 Some other steps however do use $srcdir.

 My question is whether it seems like a reasonable idea to correct
 autogen.sh to remove the assumption that builddir == sourcedir. If so
 then I'll go down this route and send a patch. If not then I'll use a
 Yocto work around for projects that don't/can't support doing that.
 I'm not big on papering over issues so I do prefer the first option
 but I didn't want to start work if it turns out that it may be a
 nearly impossible task.

 Chris
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-list] recommended http server

2014-05-20 Thread Chris Ochs
I'll have to take a look at the .net zeromq implementation.   In the past
my experiences using zeromq were not that great, although most of that was
due to how the C/C++ libraries did error handling.  On the java side I'm
using Akka which has built in support for zeromq. So if the .net version
works well, that might be a good alternative.




On Tue, May 20, 2014 at 10:08 AM, David Curylo cury...@asme.org wrote:

 You can use the HttpListener (
 http://msdn.microsoft.com/en-us/library/vstudio/system.net.httplistener)
 directly since you really aren’t trying to run any sort of web server.  If
 you need a nice REST HTTP application server, ServiceStack is very nice,
 but I think you just want a low level integration layer, and it’s overkill
 for that.  It sounds like you are stuffing a message in HTTP because it’s a
 common protocol.  I recommend considering ZeroMQ instead of HTTP for this
 sort of integration, particularly since you are already encapsulating your
 data in a message.

 Pure Java implementation: https://github.com/zeromq/jeromq
 Pure .NET/mono implementation: https://github.com/zeromq/netmq


 On May 20, 2014, at 12:08 AM, Chris Ochs ch...@ochsnet.com wrote:

  The use case is to bridge our JVM app with C# code that we need to also
 run.  We would be making http posts containing a protocol buffer message,
 and returning the same.
 
  At first I tried looking for solutions written entirely in C#, but that
 turned out to be a dead end.  The only ones I found that were actively
 maintained had performance issues under load.
 
  I was about to try out Nginx with fastcgi, but thought I'd post here
 before going down another rabbit hole.
 
  FYI I did try embedding.  The problem was that we did run into some
 issues under load that could have been mono or my code.  In either case
 though it takes a lot of time to debug, and I am not confident that it
 would not just be the first of several.  So I finally concluded that
 embedding one vm into another is probably just asking for more trouble then
 I have the time to deal with.
  ___
  Mono-list maillist  -  Mono-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] recommended http server

2014-05-19 Thread Chris Ochs
The use case is to bridge our JVM app with C# code that we need to also
run.  We would be making http posts containing a protocol buffer message,
and returning the same.

At first I tried looking for solutions written entirely in C#, but that
turned out to be a dead end.  The only ones I found that were actively
maintained had performance issues under load.

I was about to try out Nginx with fastcgi, but thought I'd post here before
going down another rabbit hole.

FYI I did try embedding.  The problem was that we did run into some issues
under load that could have been mono or my code.  In either case though it
takes a lot of time to debug, and I am not confident that it would not just
be the first of several.  So I finally concluded that embedding one vm into
another is probably just asking for more trouble then I have the time to
deal with.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-dev] Handling HTTP GZip response cannot find CreateZStream

2014-05-08 Thread Chris Tacke
I have an application that works just fine under .NET.  The application uses 
REST calls to get data from a web service.

When run under Mono on a Windows PC, or Mono on a Linux device, it fails.

The failure happens when the service responds with data payload that is Gzipped.

Down in the bowels of things, I'm getting back an EntryPointNotFoundException 
that says it can't find the CreateZStream method, it appears that it's 
expecting it to be in the MonoPosixHelper

Is this something missing from Mono, or something we're doing incorrectly?

-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] mkbundle and reference assemblies

2014-04-22 Thread Chris Tacke
I'm trying to mkbundle a pretty complex application that has a lot of reference 
assemblies, but mkbundle is having trouble finding those assemblies.

For example, here's part of the output:

--
root@WR-IntelligentDevice:/opt/SF# mkbundle SolutionEngine.exe --deps -o Engine 
-L /opt/SF
OS is: Linux
Sources: 1 Auto-dependencies: True

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 
'OpenNETCF.IoC' or one of its dependencies. The system cannot find the file 
specified.
File name: 'OpenNETCF.IoC'

--

OpenNETCF.IoC.dll is a referenced assembly.  It's in the same folder as the 
application assembly, and even adding an explicit path (it's in the command 
above) doesn't help.  Here's a partial ls as proof:

root@WR-IntelligentDevice:/opt/SF# ls O*
OpenNETCF.BACnet.dll OpenNETCF.MQTT.dll
OpenNETCF.Configuration.dll  OpenNETCF.ORM.DreamFactory.dll
OpenNETCF.DeviceAdmin.dllOpenNETCF.ORM.EDC.dll
OpenNETCF.DreamFactory.dll   OpenNETCF.ORM.SQLite.dll
OpenNETCF.EDC.dllOpenNETCF.ORM.dll
OpenNETCF.Extensions.dll OpenNETCF.Transit.IO.dll
OpenNETCF.IO.XBee.dllOpenNETCF.Web.dll
OpenNETCF.IoC.dll


As you can see, it's definitely there.  How to I tell mkbundle how to find the 
reference assemblies?

-Chris

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mkbundle and reference assemblies

2014-04-22 Thread Chris Tacke
Much closer - the output went from this:

Sources: 1 Auto-dependencies: True

To 

Sources: 58 Auto-dependencies: True


Telling me that it's now trying to pull in a whole lot more.  It's now 
complaining about a missing System.Web assembly that I have to track down, 
but I don't think it's related to this issue.

Thanks again.

-Chris


 -Original Message-
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of Robert Jordan
 Sent: Tuesday, April 22, 2014 1:13 PM
 To: Mono-list@lists.ximian.com
 Subject: Re: [Mono-list] mkbundle and reference assemblies
 
 On 22.04.2014 17:01, Chris Tacke wrote:
  I'm trying to mkbundle a pretty complex application that has a lot of
 reference assemblies, but mkbundle is having trouble finding those
 assemblies.
 
  For example, here's part of the output:
 
  --
  root@WR-IntelligentDevice:/opt/SF# mkbundle SolutionEngine.exe --deps
 -o Engine -L /opt/SF
 
 Try this as a workaround:
 
   cd /opt/SF
   mkbundle --deps -o Engine SolutionEngine.exe *.dll
 
 Robert
 
 
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-dev] ***UNCHECKED*** Re: Ongoing Mono development / Mono roadmap

2014-04-09 Thread Chris Tacke
If you take a look at the live repository for Mono, you can see that Xamarin 
employees regularly update the source code (there are changes from 2 hours 
ago).  That places the statement that Xamarin are unable to work on Mono 
clearly into the FUD column.

Mono is actively being fixed and improved by Xamarin and others.

-Chris




From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Alex J Lennon
Sent: Wednesday, April 09, 2014 4:18 PM
To: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] ***UNCHECKED*** Re: Ongoing Mono development / Mono 
roadmap


On 09/04/2014 22:00, Robert Jordan wrote:
Were you living under a stone the past couple of years? :D

Just trying to understand the realities Robert :-D


You're mixing up Mono  MonoTouch like they were the same
and don't seem to understand how these technologies
are interwoven.

Mono is an Open Source .NET implementation, while MonoTouch
(now Xamarin.iOS) is a spin-off with a lot of enhancements
targeted to mobile development. But at its core, it's still
Mono and its BCL.

Mono's death, as you put it, would imply that Xamarin were
sooner or later out of business. It doesn't look so.

A key component of what I was told toay is that Xamarin are unable to
work on Mono due to contractual obligations to Attachmate. As a
result they are (I am told) abandoning Mono and doing something
else which is the (presumably) VM underneath the Xamarin tooling.

I guess I'm looking for confirmation that either this is true, or
is some strange new form of FUD :) This comes from a discussion which
was originally about Microsoft open sourcing (ish, bits of) .Net.

I care, because I think Mono is pretty fantastic, it allows me to retarget
products my business creates to embedded devices running Linux, and
I want to see it continue and grow. If the death of Mono were to be a
reality I would need to rethink some objectives.

Which is why I asked you guys, because I figure if anybody can give me
a categorical answer then it is the developers...



The truth is rather that *parts* of the Mono framework became
less important for Xamarin, as they are solely focused on mobile
nowadays.

Which parts these are, should be too hard to figure out.

Robert


On 09.04.2014 21:36, Alex J Lennon wrote:

Hi,

I became involved in a conversation today on LinkedIn in which a
commentator was telling me Mono is dead, due to contractual
constraints imposed on Xamarin by the legal owners of Mono, Attachmate.

A snippet of the ensuing conversation follows,

In July 2011, however, Novell - now a subsidiary of Attachmate - and
Xamarin announced that Novell had granted a perpetual license for Mono,
MonoTouch and Mono for Android to Xamarin, which formally and legally
took official stewardship of the project.

It also says as follows:  ...the future of the project was questioned,
since MonoTouch and Mono for Android would now be in direct competition
with the existing commercial offerings owned by Attachmate. It was not
known at the time how Xamarin would prove they had not illegally used
technologies previously developed when they were employed by Novell for
the same work.

In the Mono project website 
(www.mono-project.comhttp://www.mono-project.com), you have three main
offerings, Mono, Xamarin.iOS and Xamarin.Android, and you can find a
link (at the bottom left corner of the page) to Xamarin's website.

It is clear that this is a strategy by Xamarin to offer MonoTouch
developers a migration path to Xamarin tools, and not much more than that.

To be able to woo Mono developers to Xamarin, Novell (Attachmate) and
Xamarin cut this deal, because it is of mutual convenience to the two of
them.

But from any real perspective of active development of the platform,
Mono is dead.

...

This doesn't square at all for me with the near-monthly releases I've
been seeing with functional enhancements I've been needing, such as ARM
hardfp (great work, thanks).

Would anybody care to comment on whether there's a kernel of truth here
or what the roadmap for Mono development currently is?

Thanks,

Alex


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


--

[cid:image001.png@01CF5410.A7C4DBA0]http://www.dynamicdevices.co.uk/

Alex J Lennon / Director
1 Queensway, Liverpool L22 4RA

mobile: +44 (0)7956 668178

[cid:image002.png@01CF5410.A7C4DBA0]http://www.linkedin.com/in/alexjlennon[cid:image003.png@01CF5410.A7C4DBA0]skype:alexjlennon?add

This e-mail message may contain confidential or legally privileged information 
and is intended only for the use of the intended recipient(s). Any unauthorized 
disclosure, dissemination, distribution, copying or the taking of any action in 
reliance on the information herein is prohibited. E-mails are not secure and 
cannot be guaranteed to be error free

Re: [Mono-dev] ms .net source updated and license modified

2014-02-25 Thread Chris Ball
Related, I believe:

http://www.hanselman.com/blog/AnnouncingTheNewRoslynpoweredNETFrameworkReferenceSource.aspx

Sent from my iPhone

 On 25.02.2014, at 18:50, \Andrés G. Aragoneses\ kno...@gmail.com wrote:

 On 25/02/14 18:11, theUser BL wrote:
 »Um die Arbeit mit dem Quellcode noch einfacher zu machen, hat Microsoft
 auch die Lizenzbestimmungen klarer gefasst. Denn bisher mussten
 beispielsweise die Entwickler von Open Source-Klonen aufpassen, dass sie
 nur Erkenntnisse aus dem Reverse Engineering verwenden und nicht aus
 dem Studium des originalen Quellcodes. Denn in vielen Fällen würde dann
 die Gefahr drohen, dass man sich verschiedener Rechteverletzungen
 schuldig macht. Die Microsoft Reference Source License wurde daher nun
 so angepasst, dass beispielsweise die Entwickler des Mono-Teams
 problemlos die .Net-Sourcen anschauen und das Framework dann unter Linux
 klonen können. «

 GoogleTranslate output is:

 To make the work with the source code even easier, Microsoft has
 also the license terms clarified. Because so far had
 For example, the developers of open source clones careful that they
  only use insights from the reverse engineering and not from
 the study of the original source code. Because in many cases would then
 the danger threatening that one different in rights violations
 guilty. The Microsoft Reference Source License was therefore now
 adapted so that for example, the developer of the mono-teams
 easily see the. Net sources and the framework then in Linux
 can clone. 

 If this translation is (kind of) correct, it still is very confusing
 because that license (MS-RSL [1]) is not opensource.

 [1]
 http://en.wikipedia.org/wiki/Shared_source#Microsoft_Reference_Source_License_.28Ms-RSL.29

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-aspnet-list] Mono-aspnet-list Digest, Vol 59, Issue 4

2014-01-20 Thread Chris F Carroll
My own notes on this are at 
http://www.cafe-encounter.net/p1319/run-asp-net-mvc4-on-mono-monodevelop-on-mac-the-c-template-project
 which includes a link to some tips I got at 
http://stackoverflow.com/questions/4239645/does-the-razor-view-engine-work-for-mono

Cheers, Chris

On Monday, 20 January 2014 at 12:00, mono-aspnet-list-requ...@lists.ximian.com 
wrote: 
 Send Mono-aspnet-list mailing list submissions to
 mono-aspnet-list@lists.ximian.com (mailto:mono-aspnet-list@lists.ximian.com)
 
 To subscribe or unsubscribe via the World Wide Web, visit
 http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
 or, via email, send a message with subject or body 'help' to
 mono-aspnet-list-requ...@lists.ximian.com 
 (mailto:mono-aspnet-list-requ...@lists.ximian.com)
 
 You can reach the person managing the list at
 mono-aspnet-list-ow...@lists.ximian.com 
 (mailto:mono-aspnet-list-ow...@lists.ximian.com)
 
 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Mono-aspnet-list digest...
 
 
 Today's Topics:
 
 1. Deploy ASP.Net 4.0 App on Mono 3.2  Apache (ysenan)
 
 
 --
 
 Message: 1
 Date: Sun, 19 Jan 2014 13:47:40 -0800 (PST)
 From: ysenan yazee...@hotmail.com (mailto:yazee...@hotmail.com)
 To: mono-aspnet-list@lists.ximian.com 
 (mailto:mono-aspnet-list@lists.ximian.com)
 Subject: [Mono-aspnet-list] Deploy ASP.Net 4.0 App on Mono 3.2 
 Apache
 Message-ID: 1390168060780-4661741.p...@n4.nabble.com 
 (mailto:1390168060780-4661741.p...@n4.nabble.com)
 Content-Type: text/plain; charset=us-ascii
 
 Hello, 
 
 I am new to Mono and i would like to deploy my web application which is
 developed on Visual Studio 2010 on Mono  Apache.
 
 I installed the environment on CenOS 6.4 and the test page worked; but when
 i copied the published folder it didnt work,
 
  From where can i start ??
 
 thanks 
 
 
 
 --
 View this message in context: 
 http://mono.1490590.n4.nabble.com/Deploy-ASP-Net-4-0-App-on-Mono-3-2-Apache-tp4661741.html
 Sent from the Mono - ASP.NET mailing list archive at Nabble.com 
 (http://Nabble.com).
 
 
 --
 
 ___
 Mono-aspnet-list mailing list
 Mono-aspnet-list@lists.ximian.com (mailto:Mono-aspnet-list@lists.ximian.com)
 http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
 
 
 End of Mono-aspnet-list Digest, Vol 59, Issue 4
 ***
 
 


___
Mono-aspnet-list mailing list
Mono-aspnet-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list


Re: [Mono-aspnet-list] Getting started / would to contribute to class library

2014-01-15 Thread Chris F Carroll
Thanks for responding. The github instructions got me to an error but I did 
have success with http://www.mono-project.com/Compiling_Mono_on_OSX, perhaps my 
automake was out of date or something.  

So, on to the class libraries. I see they are mostly c# / csproj files. Do 
people typically work in Xamarin/Visual Studio? Since the csproj files have 
dependencies presumably you create (ad-hoc?) solutions (which you don’t 
check-in?) whilst working on them?



On Tuesday, 14 January 2014 at 23:03, miniBill wrote:  
 The README explains all the steps: 
 https://github.com/mono/mono/blob/master/README.md#c-building-the-software-from-git
  
  
 2014/1/14 Chris F Carroll
  I’d like to try contributing to development on the class library, e.g. 
  tackle some of the issues in 
  http://go-mono.com/status/status.aspx?reference=4.5profile=4.5assembly=System.Web

   
  I’ve read around the mono-project site and pulled github mono/mono but 
  don’t understand what tools/IDE are suitable / can’t get anything built.  
  Is anyone able to help me get off the ground? I am familiar with .Net 
  tools, much less familiar with *nix toolset.  
   
  For instance, following instructions at 
  http://www.mono-project.com/Test_Suite#Class_Library_tests just gets me   
   
  *** No rule to make target `../../class/lib/build/sn.exe', needed by 
  `../../class/lib/net_4_5/tmp/mscorlib.dll'.  Stop.
   
  Thanks
   
  Chris  
  ___
  Mono-aspnet-list mailing list
  Mono-aspnet-list@lists.ximian.com (mailto:Mono-aspnet-list@lists.ximian.com)
  http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
   
  

___
Mono-aspnet-list mailing list
Mono-aspnet-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list


[Mono-aspnet-list] Getting started / would to contribute to class library

2014-01-14 Thread Chris F Carroll
I’d like to try contributing to development on the class library, e.g. tackle 
some of the issues in 
http://go-mono.com/status/status.aspx?reference=4.5profile=4.5assembly=System.Web

I’ve read around the mono-project site and pulled github mono/mono but don’t 
understand what tools/IDE are suitable / can’t get anything built.  Is anyone 
able to help me get off the ground? I am familiar with .Net tools, much less 
familiar with *nix toolset.

For instance, following instructions at 
http://www.mono-project.com/Test_Suite#Class_Library_tests just gets me  

*** No rule to make target `../../class/lib/build/sn.exe', needed by 
`../../class/lib/net_4_5/tmp/mscorlib.dll'.  Stop.

Thanks

Chris___
Mono-aspnet-list mailing list
Mono-aspnet-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list


[Mono-dev] Installing mono via copy

2013-12-13 Thread Chris Tacke
I have an embedded Linux platform on which I need to install Mono.  The 
platform does not have any installer tools like apt or whatever.  I have to 
custom build Mono for the platform for a variety of reasons.

I am successfully building Mono from source under an Ubuntu machine.  That 
works just fine.

The problem I'm now facing is how to distribute the resulting build.  Due to 
size contraints, I've compiled only the 4.5 stuff, plus I've pulled out a 
variety of things like System.Drawing,  all of the WinForms stuff, etc.  I've 
also stripped the binaries.

What I did was:

- set a custom prefix (and other stuff) during configure
- make  make install.
- Go into the install folder and trim out stuff I don't need and strip binaries

So now I have a set of folders that contain Mono.  My hope was that I could tar 
these up, copy that to the destination, untar it in the /usr directory so that 
the mono bin files end up in /usr/bin, the mono lib files end up in /usr/lib 
etc.

Doing this I success if I do a mono -V.  I get version info.  However, if I try 
to actually run a mono app, it complains about not finding mscorlib.dll.  It's 
looking in the path where I set the prefix back on the build machine.

How should I be going about doing an installation like this?  What am I missing 
in my process?

-Chris





___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Installing mono via copy

2013-12-13 Thread Chris Tacke
I guess to put it another way, the question might be this:

I have a Mono application.  I need to distribute that application onto an 
embedded Linux platform that doesn't have Mono in the OS.  Assuming I don't 
have the luxury of install tool in the OS, what are the steps required to 
deploy Mono and my application such that the application will be able to run?

-Chris


 -Original Message-
 From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
 boun...@lists.ximian.com] On Behalf Of Chris Tacke
 Sent: Friday, December 13, 2013 9:40 AM
 To: mono-devel-list@lists.ximian.com
 Subject: [Mono-dev] Installing mono via copy
 
 I have an embedded Linux platform on which I need to install Mono.  The
 platform does not have any installer tools like apt or whatever.  I have to
 custom build Mono for the platform for a variety of reasons.
 
 I am successfully building Mono from source under an Ubuntu machine.  That
 works just fine.
 
 The problem I'm now facing is how to distribute the resulting build.  Due to
 size contraints, I've compiled only the 4.5 stuff, plus I've pulled out a 
 variety
 of things like System.Drawing,  all of the WinForms stuff, etc.  I've also
 stripped the binaries.
 
 What I did was:
 
 - set a custom prefix (and other stuff) during configure
 - make  make install.
 - Go into the install folder and trim out stuff I don't need and strip 
 binaries
 
 So now I have a set of folders that contain Mono.  My hope was that I could
 tar these up, copy that to the destination, untar it in the /usr directory so 
 that
 the mono bin files end up in /usr/bin, the mono lib files end up in /usr/lib 
 etc.
 
 Doing this I success if I do a mono -V.  I get version info.  However, if I 
 try to
 actually run a mono app, it complains about not finding mscorlib.dll.  It's
 looking in the path where I set the prefix back on the build machine.
 
 How should I be going about doing an installation like this?  What am I 
 missing
 in my process?
 
 -Chris
 
 
 
 
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Installing mono via copy

2013-12-13 Thread Chris Tacke
Yes, that's what I'm trying, but the target environment isn't getting set up 
properly.  I tar it all up, install on the target device and I get errors when 
I try to run.  The first error I'm seeing is that it can't find mscorelib.dll, 
but I suspect it's only the first of many because mono on the destination 
device isn't in the same location as it was on the build machine.

-Chris


 -Original Message-
 From: Brandon Perry [mailto:bperry.volat...@gmail.com]
 Sent: Friday, December 13, 2013 10:19 AM
 To: Chris Tacke
 Cc: mono-devel-list@lists.ximian.com
 Subject: Re: [Mono-dev] Installing mono via copy
 
 Tarball?
 
 Sent from a computer
 
  On Dec 13, 2013, at 10:10, Chris Tacke cta...@opennetcf.com wrote:
 
  I guess to put it another way, the question might be this:
 
  I have a Mono application.  I need to distribute that application onto an
 embedded Linux platform that doesn't have Mono in the OS.  Assuming I
 don't have the luxury of install tool in the OS, what are the steps required 
 to
 deploy Mono and my application such that the application will be able to run?
 
  -Chris
 
 
  -Original Message-
  From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-
 list-
  boun...@lists.ximian.com] On Behalf Of Chris Tacke
  Sent: Friday, December 13, 2013 9:40 AM
  To: mono-devel-list@lists.ximian.com
  Subject: [Mono-dev] Installing mono via copy
 
  I have an embedded Linux platform on which I need to install Mono.  The
  platform does not have any installer tools like apt or whatever.  I have to
  custom build Mono for the platform for a variety of reasons.
 
  I am successfully building Mono from source under an Ubuntu machine.
 That
  works just fine.
 
  The problem I'm now facing is how to distribute the resulting build.  Due
 to
  size contraints, I've compiled only the 4.5 stuff, plus I've pulled out a
 variety
  of things like System.Drawing,  all of the WinForms stuff, etc.  I've also
  stripped the binaries.
 
  What I did was:
 
  - set a custom prefix (and other stuff) during configure
  - make  make install.
  - Go into the install folder and trim out stuff I don't need and strip 
  binaries
 
  So now I have a set of folders that contain Mono.  My hope was that I
 could
  tar these up, copy that to the destination, untar it in the /usr directory 
  so
 that
  the mono bin files end up in /usr/bin, the mono lib files end up in 
  /usr/lib
 etc.
 
  Doing this I success if I do a mono -V.  I get version info.  However, if 
  I try
 to
  actually run a mono app, it complains about not finding mscorlib.dll.  It's
  looking in the path where I set the prefix back on the build machine.
 
  How should I be going about doing an installation like this?  What am I
 missing
  in my process?
 
  -Chris
 
 
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Installing mono via copy

2013-12-13 Thread Chris Tacke
So if I make install DESTDIR /path/to/temp do I still need to install on the 
target at /usr/local (te default prefix), or will anywhere work?  I assume 
the former, but am trying to understand.

-Chris


From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Nikita Tsukanov
Sent: Friday, December 13, 2013 1:06 PM
To: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] Installing mono via copy


- set a custom prefix (and other stuff) during configure
That's the problem. It tries to look for mscorlib at 
$prefix/lib/mono/blablablah instead of /usr/lib. Instead of using custom prefix 
just configure it with normal (i. e. /usr) and use make install 
DESTDIR=/path/to/temp/dir. It will install all files to that directory, and 
you'll be able to create your tarball.

2013/12/13 Chris Tacke cta...@opennetcf.commailto:cta...@opennetcf.com
I have an embedded Linux platform on which I need to install Mono.  The 
platform does not have any installer tools like apt or whatever.  I have to 
custom build Mono for the platform for a variety of reasons.

I am successfully building Mono from source under an Ubuntu machine.  That 
works just fine.

The problem I'm now facing is how to distribute the resulting build.  Due to 
size contraints, I've compiled only the 4.5 stuff, plus I've pulled out a 
variety of things like System.Drawing,  all of the WinForms stuff, etc.  I've 
also stripped the binaries.

What I did was:

- set a custom prefix (and other stuff) during configure
- make  make install.
- Go into the install folder and trim out stuff I don't need and strip binaries

So now I have a set of folders that contain Mono.  My hope was that I could tar 
these up, copy that to the destination, untar it in the /usr directory so that 
the mono bin files end up in /usr/bin, the mono lib files end up in /usr/lib 
etc.

Doing this I success if I do a mono -V.  I get version info.  However, if I try 
to actually run a mono app, it complains about not finding mscorlib.dll.  It's 
looking in the path where I set the prefix back on the build machine.

How should I be going about doing an installation like this?  What am I missing 
in my process?

-Chris





___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] storage.bos.xamarin.com is down?

2013-12-09 Thread Chris Tacke
I'm trying to build the latest Mono sources from git, however when trying to 
build a bootstrap environment I normally do this:

make get-monolite-latest

This is failing for me right now because I keep timing out trying to reach 
storage.bos.xamarin.com.

The network connectivity is fine, since it got all of the source from git 
without a problem.

-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] keep-alive connections not working in mono 3/ubuntu

2013-10-23 Thread Chris Ochs
Thought I'd run this by the list before submitting a bug.  Client is
sending keep-alive headers but actually creating a new tcp connection for
each request.  This was mono built from the 3.2.3 tag, master does the same
thing.  Am I missing something obvious here?

Test code is here:
https://gist.github.com/chrisochs/7113668


Ngrep session showing 2 requests, both with a different origination port by
the client:

T 2013/10/22 23:43:32.686548 127.0.0.1:38695 - 127.0.0.1:80 [AP]
GET /doc/index.html HTTP/1.1.
Connection: keep-alive.
Host: 127.0.0.1.
.


T 2013/10/22 23:43:32.686611 127.0.0.1:80 - 127.0.0.1:38695 [AP]
HTTP/1.1 200 OK.
Server: nginx/1.4.1 (Ubuntu).
Date: Wed, 23 Oct 2013 06:43:32 GMT.
Content-Type: text/html.
Content-Length: 0.
Last-Modified: Wed, 23 Oct 2013 06:38:07 GMT.
Connection: keep-alive.
ETag: 52676ecf-0.
Accept-Ranges: bytes.
.


T 2013/10/22 23:43:32.687104 127.0.0.1:38696 - 127.0.0.1:80 [AP]
GET /doc/index.html HTTP/1.1.
Connection: keep-alive.
Host: 127.0.0.1.
.


T 2013/10/22 23:43:32.687166 127.0.0.1:80 - 127.0.0.1:38696 [AP]
HTTP/1.1 200 OK.
Server: nginx/1.4.1 (Ubuntu).
Date: Wed, 23 Oct 2013 06:43:32 GMT.
Content-Type: text/html.
Content-Length: 0.
Last-Modified: Wed, 23 Oct 2013 06:38:07 GMT.
Connection: keep-alive.
ETag: 52676ecf-0.
Accept-Ranges: bytes.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] MonoObject reference changing to other object type

2013-10-11 Thread Chris Ochs
I'm embedding mono and it's in a threaded environment so was hoping that a
simple explanation of what I'm doing might shed some light on where I am
going wrong, before I post the code.

I'm embedding in java 7 via the jruby ffi.  I have a C function that calls
mono_object_new and returns it as a pointer to jruby.  Some time later I
call another C function with the MonoObject, and when I call
mono_class_get_name on the object's klass, I get back random classes.  My
function that creates the MonoObject is hard wired to a specific
namespace/class.  I'd say roughly 20% of the time I get back a random
class, it's not always the same.

The threading involved comes from Akka.  I am creating the mono object in
one thread and usually using it in another, but never is a mono object used
concurrently by different threads.  I'm also using mono_thread_attach
liberally at this point.

Anything obvious that sticks out?  Seems like a threading issue of some
type.  If I'm missing a call to mono_thread_attach somewhere, would this
behavior be expected?

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] MonoObject reference changing to other object type

2013-10-11 Thread Chris Ochs
Ok so it turned out I just needed to use gchandles, my objects were getting
gc'd.

Chris


On Thu, Oct 10, 2013 at 11:29 PM, Chris Ochs ch...@ochsnet.com wrote:

 I'm embedding mono and it's in a threaded environment so was hoping that a
 simple explanation of what I'm doing might shed some light on where I am
 going wrong, before I post the code.

 I'm embedding in java 7 via the jruby ffi.  I have a C function that calls
 mono_object_new and returns it as a pointer to jruby.  Some time later I
 call another C function with the MonoObject, and when I call
 mono_class_get_name on the object's klass, I get back random classes.  My
 function that creates the MonoObject is hard wired to a specific
 namespace/class.  I'd say roughly 20% of the time I get back a random
 class, it's not always the same.

 The threading involved comes from Akka.  I am creating the mono object in
 one thread and usually using it in another, but never is a mono object used
 concurrently by different threads.  I'm also using mono_thread_attach
 liberally at this point.

 Anything obvious that sticks out?  Seems like a threading issue of some
 type.  If I'm missing a call to mono_thread_attach somewhere, would this
 behavior be expected?

 Chris

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-dev] Compiling for i586 Linux target on an i686 Linux machine

2013-09-16 Thread Chris Tacke
I need to get a 32-bit i586 build of the latest version of Mono to run on an 
embedded target.

For a build machine I'm using Ubuntu 12 on 32-bit i686 VM.

I have successfully pulled the Mono sources and built them using the default 
configuration, and the resulting Mono binaries work just fine ion an i686 
machine.  When I attempt to run on an i586 machine, I get an error that simply 
says Illegal instruction

I assume that I need to cross-compile for i586, but I can't find a --target 
setting that works

I've tried a few things:

./configure --target=i586
./configure --target=i586-linux
./configure --target=i586-linux-gcc

And I always get an error along these lines (the target name changes with what 
I send in):

Configure: error: Cross compiling is not supported for target i586-pc-linux-gcc

Is there a known-good -target flag that I can send in to get a cross-compiled 
i586 output?


-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Error Building Mono RPM for Fedora

2013-08-30 Thread Chris Tacke
I'm trying to build an RPM for the latest Mono source (3.3) and just not having 
much luck.

I was able to pull the source, configure, make, and  make dist.

I hacked the mono-core.spec to get past features not supported in Fedora.

I created the required rpmbuild folders and copied over the spec file and the 
tar.bz2 file from the make process.

I then tried to create the RPM in two ways:

rpmbuild -bb /opt/mono/mono-core.spec

rpmbuild -tb /opt/mono/mono-3.3.0.tar.bz2


Both end up with a failure after making what feels like a lot of progress in 
the build:

Extracting debug info from 
/root/rpmbuild/BUILDROOT/mono-core-3.3.0-0.i386/usr/lib/mono/4.5/mscorlib.dll.so
*** ERROR: No build ID note found in 
/root/rpmbuild/BUILDROOT/mono-core-3.3.0-0.i386/usr/lib/mono/4.5/mscorlib.dll.so
Error: Bad exit status from /var/tmp/rpm-tmp.XC64E7 (%install)

Any pointers on how to proceed from here?

-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Building a Mono RPM

2013-08-27 Thread Chris Tacke
So as a bit of background, this is what I’m doing.  I am building an embedded 
Linux platform running Wind River, which I believe is Fedora based.  The tools 
for building the OS came on a Ubuntu VM.  I am trying to build Mono (succeeded 
there), and then an installer for Mono so that I can install Mono on the 
embedded device.  I’ll follow that with an installer for our application.  I 
was told that RPM was the mechanism for installing packages on Wind River, so I 
went down that road.

What it sounds like you’re telling me is that for building an RPM package for 
Wind River, I should be using Fedora and no Ubuntu, because Ubuntu has outdated 
RPM infrastructure since it doesn’t use RPM for package management.

Is this all correct?

I guess I can build up a Fedora machine to do the work for the installer, it 
just means that now I need two dev OSes to build this target (three if you 
count Windows where we actually do the app development).

Is there any guide or documentation for building a Mono RPM for Fedora?

-Chris


From: Rafael Teixeira [mailto:mono...@gmail.com]
Sent: Tuesday, August 27, 2013 6:28 AM
To: Chris Tacke
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] Building a Mono RPM

It just sounds strange that you are trying to build an RPM package on a system 
based on DEB packaging, in Ubuntu it would be easier to package a .deb package 
to target Debian-based distros like Debian/Ubuntu/Mint/etc... or switch to 
Fedora as your distro for building and packaging if you are targeting the 
Fedora/Red Hat/Centos/etc... family of distros that use RPM files.

You can look at projects of apps that depend on Mono like 
MonoDevelop(http://monodevelop.com/), Banshee (http://banshee.fm/), F-Spot 
(http://f-spot.org/) are packaged for Debian/Ubuntu (not sure they are packaged 
for Fedora/Red Hat nowadays).

Hope it helps,

Rafael Teixeira
O..:.)

On Mon, Aug 26, 2013 at 8:33 PM, Chris Tacke 
cta...@opennetcf.commailto:cta...@opennetcf.com wrote:
Let me preface this with the fact that I’m pretty new to Linux.

I have pulled the Mono source and successfully built it on 32-bit Ubuntu.  I 
was able to successfully take the binaries generated from a “make install” and 
copy them to a different Linux distribution and actually run a Mono app on that 
target.  That seems like the wrong way to approach it though.  I suspect I 
should be distributing an RPM file.

So I decided to try to build the RPM file today, and I’m having very little 
success.  The first issue I had was that rpmbuild would give an “Unknown 
command: recommends” error.  So I went into the spec fiel and commented that 
line out, just to see where it went from there.  Now it complains that it can’t 
find mono-3.3.0-tar.bz2.  I can only assume that I need to generate this file, 
but I’m not sure exactly how.  Is there a script that will do it, or do I just 
tar up the installation?

Is there any documentation on how to build an RPM starting with just a clean OS 
build, or at least from a system where Mono has been compiled and installed?

-Chris


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Building a Mono RPM

2013-08-27 Thread Chris Tacke
Well that seems to have been a huge waste of time.  I built up a Fedora 18 
machine, installed all of the packages necessary for building, pulled the 
source for mono, did a configure, make and a make install.  All went fine.

I then tried to use rpmbuild and again, I get the following error (just like I 
did on Ubuntu):

Error: line 51: Unknown tag: Recommends: libgdiplus0 = 2.6

At this point, should I assume that deploying Mono is best done with a tarball 
instead?

-Chris


From: mono-devel-list-boun...@lists.ximian.com 
[mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Chris Tacke
Sent: Tuesday, August 27, 2013 9:44 AM
To: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] Building a Mono RPM

So as a bit of background, this is what I’m doing.  I am building an embedded 
Linux platform running Wind River, which I believe is Fedora based.  The tools 
for building the OS came on a Ubuntu VM.  I am trying to build Mono (succeeded 
there), and then an installer for Mono so that I can install Mono on the 
embedded device.  I’ll follow that with an installer for our application.  I 
was told that RPM was the mechanism for installing packages on Wind River, so I 
went down that road.

What it sounds like you’re telling me is that for building an RPM package for 
Wind River, I should be using Fedora and no Ubuntu, because Ubuntu has outdated 
RPM infrastructure since it doesn’t use RPM for package management.

Is this all correct?

I guess I can build up a Fedora machine to do the work for the installer, it 
just means that now I need two dev OSes to build this target (three if you 
count Windows where we actually do the app development).

Is there any guide or documentation for building a Mono RPM for Fedora?

-Chris


From: Rafael Teixeira [mailto:mono...@gmail.com]
Sent: Tuesday, August 27, 2013 6:28 AM
To: Chris Tacke
Cc: mono-devel-list@lists.ximian.commailto:mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] Building a Mono RPM

It just sounds strange that you are trying to build an RPM package on a system 
based on DEB packaging, in Ubuntu it would be easier to package a .deb package 
to target Debian-based distros like Debian/Ubuntu/Mint/etc... or switch to 
Fedora as your distro for building and packaging if you are targeting the 
Fedora/Red Hat/Centos/etc... family of distros that use RPM files.

You can look at projects of apps that depend on Mono like 
MonoDevelop(http://monodevelop.com/), Banshee (http://banshee.fm/), F-Spot 
(http://f-spot.org/) are packaged for Debian/Ubuntu (not sure they are packaged 
for Fedora/Red Hat nowadays).

Hope it helps,

Rafael Teixeira
O..:.)

On Mon, Aug 26, 2013 at 8:33 PM, Chris Tacke 
cta...@opennetcf.commailto:cta...@opennetcf.com wrote:
Let me preface this with the fact that I’m pretty new to Linux.

I have pulled the Mono source and successfully built it on 32-bit Ubuntu.  I 
was able to successfully take the binaries generated from a “make install” and 
copy them to a different Linux distribution and actually run a Mono app on that 
target.  That seems like the wrong way to approach it though.  I suspect I 
should be distributing an RPM file.

So I decided to try to build the RPM file today, and I’m having very little 
success.  The first issue I had was that rpmbuild would give an “Unknown 
command: recommends” error.  So I went into the spec fiel and commented that 
line out, just to see where it went from there.  Now it complains that it can’t 
find mono-3.3.0-tar.bz2.  I can only assume that I need to generate this file, 
but I’m not sure exactly how.  Is there a script that will do it, or do I just 
tar up the installation?

Is there any documentation on how to build an RPM starting with just a clean OS 
build, or at least from a system where Mono has been compiled and installed?

-Chris


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.commailto:Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Building a Mono RPM

2013-08-26 Thread Chris Tacke
Let me preface this with the fact that I’m pretty new to Linux.

I have pulled the Mono source and successfully built it on 32-bit Ubuntu.  I 
was able to successfully take the binaries generated from a “make install” and 
copy them to a different Linux distribution and actually run a Mono app on that 
target.  That seems like the wrong way to approach it though.  I suspect I 
should be distributing an RPM file.

So I decided to try to build the RPM file today, and I’m having very little 
success.  The first issue I had was that rpmbuild would give an “Unknown 
command: recommends” error.  So I went into the spec fiel and commented that 
line out, just to see where it went from there.  Now it complains that it can’t 
find mono-3.3.0-tar.bz2.  I can only assume that I need to generate this file, 
but I’m not sure exactly how.  Is there a script that will do it, or do I just 
tar up the installation?

Is there any documentation on how to build an RPM starting with just a clean OS 
build, or at least from a system where Mono has been compiled and installed?

-Chris

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-list] embeded mono segfaults without calling managed code

2013-08-06 Thread Chris Ochs
Hey thanks that solved most of the problem.  I'm getting a segfault now
when I call mono_thread_attach(mono_domain_get()) at some point later in a
thread that's not the main thread.

I have a functions to load the image, create objects, and call methods on
those objects.

What works is if I create the image and objects in the main thread, then
make calls to the objects from any other java thread.  What's strange is
that when calling a method on the object in another thread,  if I pass
mono_domain_get() to mono_thread_attach it segfaults, but if I get the
domain by calling mono_object_get_domain on the object I am calling a
method on, it works fine.

I'll post more info when I get it.  This kind of stuff might be good to put
in the embedding docs.


On Mon, Aug 5, 2013 at 6:52 AM, Rodrigo Kumpera kump...@gmail.com wrote:

 For Java, try this:
 http://docs.oracle.com/javase/6/docs/technotes/guides/vm/signal-chaining.html


 On Mon, Aug 5, 2013 at 1:49 AM, Chris Ochs ch...@ochsnet.com wrote:

 It appears that java and mono both use some of the same signals for GC
 and pthreads, and step on each other.  If you embed mono in a java app it
 works fine until you start spinning up other java threads, then it
 eventually segfaults.  This happens even if you do nothing but call
 mono_jit_init in the main thread.


 On Fri, Aug 2, 2013 at 10:50 PM, snacktime ch...@ochsnet.com wrote:

 I'm embedding mono using C, which I'm calling from java.   I'm loading
 the
 mono runtime in the main thread.  That all works fine, until I load the
 rest
 of my app, at which point it segfaults.  It does this even when the only
 thing I do is call mono_jit_init().  My c method that calls that returns
 void, there are no references to anything from the mono side that I'm
 carrying around.

 I'd debug it with gdb but it's a jruby app, and I haven't figured out
 how to
 debug that under gdb.






 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/embeded-mono-segfaults-without-calling-managed-code-tp4660386.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] embeded mono segfaults without calling managed code

2013-08-06 Thread Chris Ochs
Hmm, so mono_get_root_domain() doesn't segfault.


On Mon, Aug 5, 2013 at 11:37 PM, Chris Ochs ch...@ochsnet.com wrote:

 Hey thanks that solved most of the problem.  I'm getting a segfault now
 when I call mono_thread_attach(mono_domain_get()) at some point later in a
 thread that's not the main thread.

 I have a functions to load the image, create objects, and call methods on
 those objects.

 What works is if I create the image and objects in the main thread, then
 make calls to the objects from any other java thread.  What's strange is
 that when calling a method on the object in another thread,  if I pass
 mono_domain_get() to mono_thread_attach it segfaults, but if I get the
 domain by calling mono_object_get_domain on the object I am calling a
 method on, it works fine.

 I'll post more info when I get it.  This kind of stuff might be good to
 put in the embedding docs.


 On Mon, Aug 5, 2013 at 6:52 AM, Rodrigo Kumpera kump...@gmail.com wrote:

 For Java, try this:
 http://docs.oracle.com/javase/6/docs/technotes/guides/vm/signal-chaining.html


 On Mon, Aug 5, 2013 at 1:49 AM, Chris Ochs ch...@ochsnet.com wrote:

 It appears that java and mono both use some of the same signals for GC
 and pthreads, and step on each other.  If you embed mono in a java app it
 works fine until you start spinning up other java threads, then it
 eventually segfaults.  This happens even if you do nothing but call
 mono_jit_init in the main thread.


 On Fri, Aug 2, 2013 at 10:50 PM, snacktime ch...@ochsnet.com wrote:

 I'm embedding mono using C, which I'm calling from java.   I'm loading
 the
 mono runtime in the main thread.  That all works fine, until I load the
 rest
 of my app, at which point it segfaults.  It does this even when the only
 thing I do is call mono_jit_init().  My c method that calls that returns
 void, there are no references to anything from the mono side that I'm
 carrying around.

 I'd debug it with gdb but it's a jruby app, and I haven't figured out
 how to
 debug that under gdb.






 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/embeded-mono-segfaults-without-calling-managed-code-tp4660386.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list




___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] embeded mono segfaults without calling managed code

2013-08-04 Thread Chris Ochs
It appears that java and mono both use some of the same signals for GC and
pthreads, and step on each other.  If you embed mono in a java app it works
fine until you start spinning up other java threads, then it eventually
segfaults.  This happens even if you do nothing but call mono_jit_init in
the main thread.


On Fri, Aug 2, 2013 at 10:50 PM, snacktime ch...@ochsnet.com wrote:

 I'm embedding mono using C, which I'm calling from java.   I'm loading the
 mono runtime in the main thread.  That all works fine, until I load the
 rest
 of my app, at which point it segfaults.  It does this even when the only
 thing I do is call mono_jit_init().  My c method that calls that returns
 void, there are no references to anything from the mono side that I'm
 carrying around.

 I'd debug it with gdb but it's a jruby app, and I haven't figured out how
 to
 debug that under gdb.






 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/embeded-mono-segfaults-without-calling-managed-code-tp4660386.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-dev] Building source fails: gmcs command not found

2013-05-16 Thread Chris Tacke
Tried the same thing under OpenSUSE 12.3 and I get the same failure, so I'm 
thinking it's not an environment problem, but a source code problem.

-Chris


 -Original Message-
 From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
 boun...@lists.ximian.com] On Behalf Of Chris Tacke
 Sent: Wednesday, May 15, 2013 2:43 PM
 To: mono-devel-list@lists.ximian.com
 Subject: [Mono-dev] Building source fails: gmcs command not found
 
 I'm trying to build Mono from the git source under a brand-new installation
 of Fedora 18.
 
 I'm following the instructions here:
 
 http://www.mono-project.com/Compiling_Mono_From_Git
 
 When I run make, I'm getting a failure after a while while it's attempting to
 make the runtime folder:
 
 if test -w /rootmono/mcs; then :; else chmod -R +w /root/mono/mcs; fi
 cd /root/mono/mcs  make --no-print-director -s NO_DIR_CHECK=1
 PROFILES=' net_2_0 net_3_5 net_4_0 net_4_5 ' CC='gcc' all-profiles
 make[6] gmcs: Command not found
 
 Now I'm pretty new to Mono - very, very new to trying to build it (first time)
 so I've got a steep learning curve to climb, but my reading of this:
 
 http://www.mono-project.com/CSharp_Compiler
 
  is that gmcs is the old compiler for 2.0 and mcs should be what's being used
 for newer stuff.
 
 So I have a few questions.
 
 First, and most obviously, is how do I get Mono to build in this environment.
 Second, though, is I'd like to understand why this is failing.  Why is it 
 trying to
 use gmcs in the first place?
 
 -Chris
 
 
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] Installing Mono on CentOS 5.x (x86_64)

2013-05-08 Thread Chris McLennan
Hello Mono group,

My firm has been using Mono successfully under Ubuntu, OpenSUSE, and
RHEL/CentOS 6. Now we have a client that is using CentOS 5.7 and we've
stubbed our toe getting Mono to install/compile/link.   I'm hoping someone
on this list could provide some insights/best practices/links to binary
RPMs.  Our application requires the following parts of the Mono framework:

mono-core
mono-basic
mono-web
mono-tools

We can compile mono-core no problem (3.0.6), but have various challenges
with the others... and before we continue slogging through I figured
getting some advice from the community would be smart.

Regards,

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-aspnet-list] Which is the correct mono-apache-server for MVC3

2013-04-19 Thread Chris Small
I've setup MVC 3 on Ubuntu using the mono-apache-server4 package, but I'm a
bit confused by the descriptions of the packages at the Ubuntu.com site.
The description for mono-apache-server4 is ASP.NET 1.1 but obviously MVC
3 is (unless it differs in Mono) dependent on .NET 4. The MVC application I
tried is .NET 4.

Could anyone clear up what the different versions are for?

Thanks
___
Mono-aspnet-list mailing list
Mono-aspnet-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list


[Mono-dev] Recent Mono Source Releases

2013-04-18 Thread Chris Ball
Looking at

http://download.mono-project.com/sources/mono/

I don't see any 3.0 source releases after 3.0.7. Are there plans to post
future source releases here?

//Q
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Recent Mono Source Releases

2013-04-18 Thread Chris Ball
Thanks, Rafael. Unfortunately, the release tars had some nice features
(configure was pre-generated, and I believe that monolite was
included) that helped simplify my build process. If these are no
longer maintained, I'll have to update my build scripts, and I may
lose the ability to bootstrap build.

Before i go down this path, does anyone know if these are officially deprecated?

//Q

On 18.04.2013, at 13:24, Rafael Teixeira mono...@gmail.com wrote:

 I think that as GitHub already provides it on the tags page
 (https://github.com/mono/mono/tags) it is not needed to do releases at
 http://download.mono-project.com/sources/mono/.

 tar.gz for 3.0.9 is at
 https://github.com/mono/mono/archive/mono-3.0.9.tar.gz for example

 Hope it helps,
 Rafael Teixeira
 O..:.)


 On Thu, Apr 18, 2013 at 4:54 AM, Chris Ball qha...@gmail.com wrote:
 Looking at

 http://download.mono-project.com/sources/mono/

 I don't see any 3.0 source releases after 3.0.7. Are there plans to post
 future source releases here?

 //Q

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Use of mono-sgen causes mono path detection fallback

2013-03-04 Thread Chris Ball
I maintain a Linux build of mono (and F#) that is hosted via NFS, and used
on a large number of machines, but the mount directory is not always
identical. I have discovered that the mono-sgen binary does not properly
detect the location of mscorlib on my systems, but the normal mono binary
has no problems. This problem occurs in both 2.10.9 and 3.0.4. My simple
test case (for mono 3.0) is to build the runtime, rename the output
directory, and run the following:
   MONO_GAC_PREFIX=/tmp/mono-test/renamed \
  PATH=$PATH:/tmp/mono-test/renamed/bin \
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/mono-test/renamed/lib \
  /tmp/mono-test/renamed/bin/mono /tmp/mono-test/renamed/lib/mono/4.5/sn.exe
   MONO_GAC_PREFIX=/tmp/mono-test/renamed \
  PATH=$PATH:/tmp/mono-test/renamed/bin \
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/mono-test/renamed/lib \
  /tmp/mono-test/renamed/bin/mono-sgen
/tmp/mono-test/renamed/lib/mono/4.5/sn.exe
The first command succeeds (prints out the usage). The second command
fails, returning:
   The assembly mscorlib.dll was not found or could not be loaded.
  It should have been installed in the
`/source/on/build/server/lib/mono/4.5/mscorlib.dll' directory.
I have traced the issue to mono/metadata/assembly.c:compute_base:
   /* Not a well known Mono executable, we are embedded, cant guess the
base */
  if (strcmp (p, /mono)  strcmp (p, /monodis)  strcmp (p, /mint)
 strcmp (p, /monodiet))
return NULL;

By changing this as follows, the behavior is corrected:
   /* Not a well known Mono executable, we are embedded, cant guess the
base */
  if (strcmp (p, /mono)  strcmp (p, /mono-sgen)  strcmp (p,
/monodis)  strcmp (p, /mint)  strcmp (p, /monodiet))
return NULL;
I have not filed this as a bug or submitted a patch yet, because I am not
sure if other binaries should be included in this test as well (e.g.
pedump). My preliminary tests using pedump --verify all suggest that it
should also be added to the well known list.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] ConfigurationErrorsException loading user settings (duplicate key)

2013-02-11 Thread Chris Derrick
A few years ago zidjian pointed out an issue on OSX where he was not able to
read 'application' scoped settings from his app.config file.  Attempting to
do so resulted in a ConfigurationErrorsException which explained that there
was a duplicate key for that 'application' scoped setting.

I'm seeing this same issue on Ubuntu and would like to ask the general forum
if there is a known solution for this.  When zidjian asked he posted it in
the OSX forum so there may have been limited visibility.  In the end he
solved the problem by changing the the scope from 'application' to 'user'. 
This solution will not work for me (I'd rather not bore you with a detailed
explanation of why).  Are there any other known solutions or work arounds?

Thanks,

PS the previous post can be found at
http://mono.1490590.n4.nabble.com/ConfigurationErrorsException-loading-user-settings-duplicate-key-td1548800.html;cid=1337349751614-620



--
View this message in context: 
http://mono.1490590.n4.nabble.com/ConfigurationErrorsException-loading-user-settings-duplicate-key-tp4658540.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] ConfigurationErrorsException loading user settings (duplicate key)

2013-02-11 Thread Chris Derrick
I've resolved the issue.  The source of my problem is that some of my
settings had previously been 'user' scoped.  For this reason the config file
located in ~/.local/share/ set them to a default value.  Like all settings
they were also defined in the config file that sits alongside my executable. 
'application' scoped settings should not be defined in multiple locations so
an error was thrown when a duplicate key was found.

In the end I was able to resolve the issue by deleting the config file in
~/.local/share/ and allowing it to be replaced by a file that does not
mention the 'application' scoped settings.



--
View this message in context: 
http://mono.1490590.n4.nabble.com/ConfigurationErrorsException-loading-user-settings-duplicate-key-tp4658540p4658541.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Fwd: Issues with RavenDB

2012-12-12 Thread Chris Mcvittie
Hi,
I'm trying to access RavenDB (running on Windows) through a console app on
mono using the latest ravendb version.

I'm getting the following errors:

mono *.exe
System.ArgumentException: Can not write to stream
  at System.IO.StreamWriter..ctor (System.IO.Stream stream,
System.Text.Encoding encoding, Int32 bufferSize) [0x0] in filename
unknown:0
  at System.IO.StreamWriter..ctor (System.IO.Stream stream,
System.Text.Encoding encoding) [0x0] in filename unknown:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor
(System.IO.Stream,System.Text.Encoding)
  at Raven.Abstractions.Connection.HttpRequestHelper.WriteDataToRequest
(System.Net.HttpWebRequest req, System.String data, Boolean
disableCompression) [0x0] in filename unknown:0
  at Raven.Client.Connection.HttpJsonRequest.Write (System.String data)
[0x0] in filename unknown:0
  at Raven.Client.Connection.ServerClient.DirectPutIndex (System.String
name, System.String operationUrl, Boolean overwrite,
Raven.Abstractions.Indexing.IndexDefinition definition) [0x0] in
filename unknown:0
  at
Raven.Client.Connection.ServerClient+c__DisplayClass48.PutIndexb__47
(System.String operationUrl) [0x0] in filename unknown:0
  at Raven.Client.Connection.ReplicationInformer.TryOperation[String]
(System.Func`2 operation, System.String operationUrl, Boolean
avoidThrowing, System.String result) [0x0] in filename unknown:0

or with sudo:

sudo mono *.exe
[sudo] password for bluezinc:
System.IO.IOException: Internal error (no progress possible) Flush
  at System.IO.Compression.DeflateStream.CheckResult (Int32 result,
System.String where) [0x0] in filename unknown:0
  at System.IO.Compression.DeflateStream.Flush () [0x0] in filename
unknown:0
  at System.IO.Compression.GZipStream.Flush () [0x0] in filename
unknown:0
  at Raven.Abstractions.Connection.HttpRequestHelper.WriteDataToRequest
(System.Net.HttpWebRequest req, System.String data, Boolean
disableCompression) [0x0] in filename unknown:0
  at Raven.Client.Connection.HttpJsonRequest.Write (System.String data)
[0x0] in filename unknown:0
  at Raven.Client.Connection.ServerClient.DirectPutIndex (System.String
name, System.String operationUrl, Boolean overwrite,
Raven.Abstractions.Indexing.IndexDefinition definition) [0x0] in
filename unknown:0
  at
Raven.Client.Connection.ServerClient+c__DisplayClass48.PutIndexb__47
(System.String operationUrl) [0x0] in filename unknown:0
  at Raven.Client.Connection.ReplicationInformer.TryOperation[String]
(System.Func`2 operation, System.String operationUrl, Boolean
avoidThrowing, System.String result) [0x0] in filename unknown:0

Oren Eini - the RavenDB guy suggested that I contact mono people, because
the Raven client shouldn't be doing anything funky with the http streams.

Can you please advise?

Many thanks,
Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-dev] workflow foundation 4

2012-11-21 Thread Chris Camplejohn
Hi Gary,

Thank you very much for this. I will take a look. Are you actively carrying
on developing it?

Thanks
Chris



--
View this message in context: 
http://mono.1490590.n4.nabble.com/workflow-foundation-4-tp1539102p4657480.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] workflow foundation 4

2012-11-17 Thread Chris Camplejohn
Hi Jon,

Yes you are correct. I had set it to copy the System.Activities locally and
it had copied the reference assembly. Once I used the one from the .NET
Framework assembly it solved this problem.

Thanks
Chris



--
View this message in context: 
http://mono.1490590.n4.nabble.com/workflow-foundation-4-tp1539102p4657428.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] workflow foundation 4

2012-11-16 Thread Chris Camplejohn
Hi Miguel,

What would be required to begin to look into getting this going?

The bit I am missing is that given that System.Activities is completely
managed code with no p-invokes, why does this assembly not work when run
under Mono? What is the restriction that prevents it working?

I think I must be missing something fundamental about Mono because it
implements the JIT so therefore why can it not run any pure .NET assembly?

Thanks
Chris



--
View this message in context: 
http://mono.1490590.n4.nabble.com/workflow-foundation-4-tp1539102p4657409.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] workflow foundation 4

2012-11-16 Thread Chris Camplejohn
Yes I understand that this is the case for some of their assemblies, but I am
interested from a technical perspective what is the limitation? I would like
to get it running with their assemblies before considering if we begin to
rewrite them for Mono.

But for example when I try to run a test workflow application under Mono
using the Microsoft System.Activities.dll I get the following error.

Unhandled Exception: System.InvalidProgramException: Invalid IL code in
System.Activities.Activity:.ctor (): method body is empty.

  at MonoWorkflowConsoleTest.Workflow1..ctor () [0x0] in filename
unknown:0 
  at MonoWorkflowConsoleTest.Program.Main (System.String[] args) [0x0]
in filename unknown:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidProgramException: Invalid
IL code in System.Activities.Activity:.ctor (): method body is empty.

  at MonoWorkflowConsoleTest.Workflow1..ctor () [0x0] in filename
unknown:0 
  at MonoWorkflowConsoleTest.Program.Main (System.String[] args) [0x0]
in filename unknown:0

Thanks
Chris



--
View this message in context: 
http://mono.1490590.n4.nabble.com/workflow-foundation-4-tp1539102p4657422.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] Contributing - System.Speech

2012-10-07 Thread Chris McKinnon
Hi,

I decided to take contributing to Mono seriously about 6 months ago.  I've been 
working on an implementation of the System.Speech namespace in my spare time 
(which isn't much).  The implementation right now is targeted at using the 
underlying Mac Speech API but I'm hoping it will expand to other platforms 
later.

I typically do web development and use the Telerik controls extensively.  I'd 
like to get the .NET 3.5 version of their controls officially supported, so I 
ran MoMa on their web DLL and pick this api to start with.  The use of the 
System.Speech api in their case seems to be limited to speaking Captcha text.

I'm trying to follow best practices and unit test but I don't want to get too 
far down a road without peer-review.  How does one submit code?  Is there a GIT 
repository for spikes?

Thanks,

Chris McKinnon
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Finding leaks from root pinned objects

2012-07-15 Thread Chris Jurney
Thanks... I'm pretty sure it's a pinned gc handle.  I guess my next step is
to either modify the heapshot UI to let me see the data I need, or try to
find a way to run time inspect the heap to get some data on these
allocations.  Any mono pro tips on ways to get at these allocations would
be appreciated.

On Fri, Jul 13, 2012 at 12:32 PM, Rodrigo Kumpera kump...@gmail.com wrote:

 Misc Roots include internal runtime structures and gc handles.

 You can run the profiler manually on console and ask for both, but I
 believe you would not be able to see both at the same time on the UI.


 On Thu, Jul 12, 2012 at 11:07 PM, Primitive jur...@gmail.com wrote:

 I've got a leak in my mono app, and I'm having trouble tracking it down.
  I'm
 hoping I'm just missing something in heapshot that will show me the data I
 need.  I can see from the summary that I'm leaking pinned references from
 Misc Root to System.Byte[] using heapshot.  I can also see a log of all
 my
 System.Byte[] allocations using the logging profiler to track allocations
 and callstacks.  What I can't see is which specific allocations are pinned
 and referenced by root.  Almost all the root referenced Byte[]s are leaks,
 so being able to see a list of the callstacks that generated them would
 show
 me the problem.  Is there a way to get a combination of these two features
 to see what I need?

 Thanks for any help.

 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Finding-leaks-from-root-pinned-objects-tp4650390.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] WebChannelFactory throwing: Client endpoint configuration '' was not found in 0 endpoints

2012-06-08 Thread Chris Derrick
Hmm... if no one has suggestions on how to create a WebChannel then the only
alternative I can think of is to use curl for my communication with the REST
api.  Does anyone know of a better way in C# on Mono to communicate with a
REST api than by using curl?

Thanks,

--
View this message in context: 
http://mono.1490590.n4.nabble.com/WebChannelFactory-throwing-Client-endpoint-configuration-was-not-found-in-0-endpoints-tp4649596p4649787.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] WebChannelFactory throwing: Client endpoint configuration '' was not found in 0 endpoints

2012-05-29 Thread Chris Derrick
I have some C# code that communicates with a REST API.  This code works great
on Windows, but when I run it through Mono an exception is thrown.  Here is
the code that throws the error:

System.ServiceModel.Web.WebChannelFactoryIService cf = new
System.ServiceModel.Web.WebChannelFactoryIService(new Uri(Address));

The error message is: Client endpoint configuration '' was not found in 0
endpoints

Has anyone run into this before? Is there a work around or alternative way
to create a channel that people are using successfully?

Thanks,


--
View this message in context: 
http://mono.1490590.n4.nabble.com/WebChannelFactory-throwing-Client-endpoint-configuration-was-not-found-in-0-endpoints-tp4649596.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] multiple dll mappings in library dllmap

2012-02-13 Thread Chris Morgan
On Mon, Feb 13, 2012 at 1:01 PM, Doug Blank doug.bl...@gmail.com wrote:
 On Sun, Jan 29, 2012 at 12:32 PM, Chris Morgan chmor...@gmail.com wrote:
 Hello.

 I'm trying to dll map libpcap for the SharpPcap.dll.config file. The
 difficulty is that different distros have different dll names:

 ubuntu has libpcap.so.0.8 and libpcap.so.1.1.1, fedora appears to have
 libpcap.so.1 and libpcap.so.1.2.1.

 The documentation for dll mapping,
 http://www.mono-project.com/Config_DllMap, doesn't seem to indicate
 that multiple names are supported and testing with multiple dllmap
 entries shows that the last entry takes effect.

 I also tried using a wildcard like '*' but that doesn't seem to work either.

 Any ideas on how I might be able to map to all three of these dll
 versions so I can maintain compatibility with multiple distributions?

 Arguably, the OS should have sim links from  libpcap.so  to
 libpcap.so.1. If not, surely that must be breaking some Linux standard
 rules.


There are rules. The Debian packager isn't going to change the
packages though because technically the abi hasn't changed since
libpcap 0.8. See this bug report that I filed
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657900 Now I could be
confused and wrong and I'd like to know why. It just seems pretty dumb
to me that Fedora and OpenSUSE have the library symlink and name that
matches what the libpcap guys ship, but the Debian guy won't even
create the extra symlink just to match them. I can understand not
wanting to require all users of libpcap to re-link but its a little
frustrating that he won't add the symlink to make things look the
same.



 Can you create your own links to the correct files? That might require
 a config script, but that is probably the correct way to handle the
 problem.


It would be a huge pain. Users now just download the library, add it
as a reference in their project and go. Adding a config script that
would require root access to modify their filesystem would be a pain.
Or are you suggesting symlinks in the local directory? Its still a
pain since they would have to ship with that script and run it before
the user could run their app less the pinvokes would fail.

So far I haven't found a reasonable solution.

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] DataAdapter.Update throws null constraint violation

2012-02-08 Thread Chris Derrick
No, DataAdapter.Update(Table) does not work for me and I have not found any
work around aside from the lengthy one I mentioned in the original post.

--
View this message in context: 
http://mono.1490590.n4.nabble.com/DataAdapter-Update-throws-null-constraint-violation-tp3727327p4369702.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] multiple dll mappings in library dllmap

2012-01-29 Thread Chris Morgan
Hello.

I'm trying to dll map libpcap for the SharpPcap.dll.config file. The
difficulty is that different distros have different dll names:

ubuntu has libpcap.so.0.8 and libpcap.so.1.1.1, fedora appears to have
libpcap.so.1 and libpcap.so.1.2.1.

The documentation for dll mapping,
http://www.mono-project.com/Config_DllMap, doesn't seem to indicate
that multiple names are supported and testing with multiple dllmap
entries shows that the last entry takes effect.

I also tried using a wildcard like '*' but that doesn't seem to work either.

Any ideas on how I might be able to map to all three of these dll
versions so I can maintain compatibility with multiple distributions?

Chris
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] DataAdapter.Update throws null constraint violation

2012-01-19 Thread Chris Derrick
  + 
WHERE
id=?oldId, conn); 
da.DeleteCommand = new MySqlCommand(DELETE FROM mytable WHERE id=?id,
conn); 
da.InsertCommand.Parameters.Add(?id, MySqlDbType.VarChar, 5, id); 
da.InsertCommand.Parameters.Add(?name, MySqlDbType.VarChar, 40,
name); 
  
da.UpdateCommand.Parameters.Add(?id, MySqlDbType.VarChar, 5, id); 
da.UpdateCommand.Parameters.Add(?name, MySqlDbType.VarChar, 40,
name); 
da.UpdateCommand.Parameters.Add(?oldId, MySqlDbType.VarChar, 5,
id).SourceVersion = DataRowVersion.Original; 
da.DeleteCommand.Parameters.Add(?id, MySqlDbType.VarChar, 5,
id).SourceVersion = DataRowVersion.Original; 

return da; 
} 


When I run this code I get an error message saying that Column 'id' cannot
be null.  Just like NpgSQL the update method is unable to populate the
Parameters properly.  I have created a work around that seems to work, but
it makes me nervous so I would like see if I can't get the update method to
function properly.  Here is the work around: 

foreach (System.Data.DataTable dataTable in ds.Tables) 
{ 
foreach (System.Data.DataRow row in dataTable.Rows) 
{ 
//Update if the row was changed 
if(row.RowState.Equals(System.Data.DataRowState.Modified)) 
{ 
foreach(NpgsqlParameter param in
da.UpdateCommand.Parameters) 
{ 
param.Value = row[param.SourceColumn]; 
} 
   
if(!da.UpdateCommand.Connection.State.Equals(System.Data.ConnectionState.Open)) 
{ 
da.UpdateCommand.Connection.Open(); 
} 
da.UpdateCommand.ExecuteNonQuery(); 
} 

//Then I repeat this for the Insert and the Delete Commands 
} 
} 


As you can see the work around is kinda ugly and makes me nervous.  Any help
getting DataAdapter.Update to work would be greatly appreciated! 

Thanks, 
Chris 

PS I'm running MonoDevelop version 2.4 on Ubuntu 10.04.3 LTS, my version of
Npgsql is 2.0.11.91 and MySQL is 6.4.3.0. 

--
View this message in context: 
http://mono.1490590.n4.nabble.com/DataAdapter-Update-throws-null-constraint-violation-tp3727327p4310715.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


  1   2   3   4   5   6   7   8   9   >