Re: [Mono-dev] Compiling mono on windows for developing (not running)

2014-05-13 Thread Martin Thwaites
Hi Alex,

I've been giving your tutorial ago, and I have some things that may be good
to add...

firstly, I'm building from git, and I checked it out using the visual
studio clone.  I think this lead to a line endings error, so you need to
run the script in a way that uses them properly.  I found that if you run
it with bash -x -o igncr autogen.sh --prefix=c:\monoinstall
--with-preview=yes it seems to do the trick.

I've now come across another error that you may be able to help with:
=== configuring in eglib (/cygdrive/c/Users/Martin/Source/Repos/mono/eglib)
configure: WARNING: no configuration information is in eglib
=== configuring in libgc (/cygdrive/c/Users/Martin/Source/Repos/mono/libgc)
configure: running /bin/sh ./configure --disable-option-checking
'--prefix=/usr/local'  '--host=i686-pc-mingw32'
'host_alias=i686-pc-mingw32' 'CPPFLAGS_FOR_EGLIB=' 'CFLAGS_FOR_EGLIB='
'--disable-embed-check' '--with-libgc-threads=win32'
'--enable-win32-dllmain=yes' '--enable-parallel-mark'
'CPPFLAGS_FOR_LIBGC=-DWINVER=0x0500 -D_WIN32_WINNT=0x0500
-D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024'
'CFLAGS_FOR_LIBGC= -g -mno-tls-direct-seg-refs -DGC_BUILD -DGC_NOT_DLL'
--cache-file=/dev/null --srcdir=.
/bin/sh: ./configure: No such file or directory
configure: error: ./configure failed for libgc

I'm now at a loss.

As I've stated before, what I'm looking to do is be able to develop mono
(not develop with) in Visual Studio.  Maybe the stuff the Miguel is doing
will help, but I just had a bit of time so thought I'd give your stuff ago.

Thanks,
Martin


On 5 May 2014 03:52, Alex J Lennon ajlen...@dynamicdevices.co.uk wrote:


 On 05/05/2014 03:44, Konaju Games (Dev) wrote:

  With Cygwin, there is one change to make to etc/fstab before starting
  a build.  You need to add noacl to the cygdrive mount.  Without this
  change, any files created by a Win32 process outside of Cygwin will
  result in Cygwin having no permissions to do anything with the files.
 
 http://georgik.sinusgear.com/2012/07/14/how-to-fix-incorrect-cygwin-permission-inwindows-7/
 

 Thanks, I'll have a look and see if that addresses the issue I was
 seeing with having /usr/local mounting during the build.

 Regards, Alex

 ___
 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] Developing Mono

2014-05-13 Thread Martin Thwaites
So I've given in, and I'm now looking at using linux (ubuntu 14.04) to try
and add some things to mono.

I have the same issues with loading the net_4_5.sln file in MD as I do in
VS, in that it won't compile.  I'm assuming that the solution itself is
just broken.

The main issue though is I've not found anything that could show me some
simple steps to how I should go about building and running tests.

I try to read through the pull requests that go on so I see if there is
anything of interest to me.  I've seen from the comments in these that what
I need to do is create a test that passes on .NET, and fails on mono, then
fix the code to make the test pass.  This seems like a simple concept,
however, what steps should I take to do that.

What I thought was that I could create a dummy project in visual studio and
paste the test in, see if it works, then run it on MD in linux.  This
doesn't seem like the best approach to me.

So my question, what is the generally accepted way to create tests for mono?

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


Re: [Mono-dev] Developing Mono

2014-05-13 Thread Robert Jordan

On 14.05.2014 00:55, Martin Thwaites wrote:

So I've given in, and I'm now looking at using linux (ubuntu 14.04) to try
and add some things to mono.

I have the same issues with loading the net_4_5.sln file in MD as I do in
VS, in that it won't compile.  I'm assuming that the solution itself is
just broken.

The main issue though is I've not found anything that could show me some
simple steps to how I should go about building and running tests.


http://www.mono-project.com/Test_Suite

Robert


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


Re: [Mono-dev] Developing Mono

2014-05-13 Thread Miguel de Icaza
Hello Martin,

The solution files that we have on the tree have not really been tested.

I am currently working on fixing a few fundamental bugs in our build system
and once I do that, I should be able to get solution files that work with
MonoDevelop or Visual Studio to work.

Sadly, I have very little time, but I will try to finish it this week.

Miguel


On Tue, May 13, 2014 at 6:55 PM, Martin Thwaites
monofo...@my2cents.co.ukwrote:

 So I've given in, and I'm now looking at using linux (ubuntu 14.04) to try
 and add some things to mono.

 I have the same issues with loading the net_4_5.sln file in MD as I do in
 VS, in that it won't compile.  I'm assuming that the solution itself is
 just broken.

 The main issue though is I've not found anything that could show me some
 simple steps to how I should go about building and running tests.

 I try to read through the pull requests that go on so I see if there is
 anything of interest to me.  I've seen from the comments in these that what
 I need to do is create a test that passes on .NET, and fails on mono, then
 fix the code to make the test pass.  This seems like a simple concept,
 however, what steps should I take to do that.

 What I thought was that I could create a dummy project in visual studio
 and paste the test in, see if it works, then run it on MD in linux.  This
 doesn't seem like the best approach to me.

 So my question, what is the generally accepted way to create tests for
 mono?

 Thanks in advance
 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


Re: [Mono-dev] Repeat builds of core assemblies

2014-05-13 Thread Miguel de Icaza
Hello Bryan,

This is a step in the direction of having everything building with msbuild.

Whether I will succeed or not, is yet to be determined :-)

Miguel


On Mon, May 12, 2014 at 12:07 PM, Bryan Crotaz 
bryan.cro...@silvercurve.co.uk wrote:

 Will this make building on windows possible?

 Bryan Crotaz
 Silver Curve

 On 12 May 2014, at 16:59, Miguel de Icaza mig...@xamarin.com wrote:

 Hey guys,

 Another update: I am almost done with the work, only one cycle left to
 resolve and I will be able to land the changes.

 All the changes are on a branch on github.

 MIguel


 On Fri, May 2, 2014 at 4:27 PM, Miguel de Icaza mig...@xamarin.comwrote:

 Hello guys,

 Just a follow up to my previous posting on this.

 I have managed to untangle this mess, and now I have a clean build that
 does not involve overwriting assemblies.

 In addition to untangling this, I added dependencies on all the
 assemblies involved in this circular dependency mess so if you type make
 in any of System, System.Xml, System.Security, Mono.Security or
 System.Configuration, all the dependencies will be properly built.

 During the fixing, I noticed that our System.Xml build must have broke a
 few eons ago, because there was code in place to perform a 2-stage
 System.Xml build as well (without and with System.Configuration support),
 but nobody noticed that this had happened.   While I fixed this, it raises
 the obvious point that nobody really cares (or likes) System.Configuration.

 While doing this review, I found a few other places that also have these
 ugly loops, so I am going to be fixing those as well.

 Miguel


 On Tue, Apr 22, 2014 at 3:53 PM, Miguel de Icaza mig...@xamarin.comwrote:

 Hey guys,

 I was looking at making the MSBuild system work, and during the process
 I have encountered a few problems that we have in our existing build system
 that are problematic.

 The problem is that System, System.XML and System.Configuration are each
 defined in terms of the other assemblies.   So we gradually bring up each
 one of those assemblies up by first compiling a stub System, which we use
 to build System.XML and System.Configuration.   Then we rebuild System,
 this time referencing System.XML and System.Configuration so we can take a
 dependency on them, and so on.

 To build a complete System.dll for a particular profile (net_2_0,
 net_4_0, etc) takes three steps:

- Core Build
- Secondary Build:
   - Core Build +
   - Defines: XML_DEP + SECURITY_DEP
   - Refs:
  - -r:PrebuiltSystem=../lib/Previous/System.dll
  - -r:System.Xml.dll
  - -r:MonoSecurity=Mono.Security.dll
   - Final Build:
   - Secondary Build +
   - defines: -d:CONFIGURATION_DEP
   - Refs:
  - System.Configuration.dll

 The above is what is required to bring up System.

 Our implementation has one major problem: it overwrites the intermediate
 files.  So the core build output is overwritten by the secondary build, and
 the secondary build is overwritten by the final build.

 It seems that historically, instead of introducing temporary directories
 for each stage, instead we hacked our way out of it.   We introduced a
 LIBRARY_USE_INTERMEDIATE_FILE whose sole purpose was to work around the
 case where Windows was actively telling us we were doing something wrong
 (we were overwriting a file that we were actively referencing!)

 The above is also likely going to prevent reliable parallel builds, or
 probably means that we introduced some gross hack to make the above work in
 parallel.

 I am going to try to fix this, but the Makefile goop is pretty dense,
 and I might fail.   I just figured I should share my findings in case
 civilization comes to an end and a future archeologist tries to figure out
 why this was not working.

 These are the defines that we use to bring up System for each profile:

 basic Profile:

 basic: -d:NET_1_1 -d:NET_2_0 -d:BOOTSTRAP_BASIC -d:CONFIGURATION_2_0

 basic: -d:NET_1_1 -d:NET_2_0 -d:BOOTSTRAP_BASIC -d:CONFIGURATION_2_0
 -d:XML_DEP


 Build Profile:

 build: -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
 -d:CONFIGURATION_2_0

 build: -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
 -d:CONFIGURATION_2_0  -d:XML_DEP


 Net 2.0 profile:

 net_2_0: -d:NET_1_1 -d:NET_2_0  -d:CONFIGURATION_2_0

 net_2_0: -d:NET_1_1 -d:NET_2_0  -d:CONFIGURATION_2_0  -d:XML_DEP
 -d:SECURITY_DEP

 net_2_0: -d:NET_1_1 -d:NET_2_0  -d:CONFIGURATION_2_0  -d:XML_DEP
 -d:SECURITY_DEP -d:CONFIGURATION_DEP


 Net 4.0 profile:

 net_4_0: -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
 -d:CONFIGURATION_2_0

 net_4_0: -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
 -d:CONFIGURATION_2_0 -d:XML_DEP  -d:SECURITY_DEP

 net_4_0: -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
 -d:CONFIGURATION_2_0 -d:XML_DEP  -d:SECURITY_DEP  -d:CONFIGURATION_DEP


 Net 4.5 profile:

 net_4_5: -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0
 -d:NET_4_5 

[Mono-dev] Mono and ASP.NET vNext

2014-05-13 Thread Miguel de Icaza
Hello guys!

Microsoft has open sourced ASP.NET vNext:

http://github.com/aspnet/home

This is an entire new web stack that only needs the core of Mono (does not
even use System.Web.dll!).

So these are of course great news, because (a) The core Mono has been in
active development, and (b) that means that Mono's on the server can be
used without all those pesky limitations that have been plaguing us for
years.

So we ran into a couple of limitations in Mono: some classes that they need
are not implemented (I filed a bug, and a couple of Xamarin folks decided
to take on that on their copious spare time) and we have a couple of bugs
on FileSystemWatcher on OSX.

But this is a great time to:

   - Get involved with the github.com/aspnet project and submit
   contributions that will make the software run on Unix.

   - Look into technologies like Owin and Katana (sp?) and help us have a
   story that plugs into Unix HTTP servers (the equivalent of our bridge
   between Apache and mono: mod_mono, or our Fast CGI bridge to mono).

   - Take Mono's new profiling tools and performance counters for a spin
   and help us fine tune the runtime to run .NET code faster on Unix than you
   can on Windows.  While this is a tall order, my friend David Miller would
   expect nothing less from us.

Hugs and love,
Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread cocowalla
I've discovered that mono is using mscorlib from `\lib\mono\4.5`, rather than
`\lib\mono\4.0`.

Now, `xbuild` is in `\lib\mono\4.5`, but my project targets .NET 4.0. Any
ideas as to what is going on here?



--
View this message in context: 
http://mono.1490590.n4.nabble.com/The-assembly-mscorlib-dll-was-not-found-or-could-not-be-loaded-tp4662752p4662763.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] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread Andrés G. Aragoneses
On 13/05/14 11:28, cocowalla wrote:
 I've discovered that mono is using mscorlib from `\lib\mono\4.5`, rather than
 `\lib\mono\4.0`.
 
 Now, `xbuild` is in `\lib\mono\4.5`, but my project targets .NET 4.0. Any
 ideas as to what is going on here?
 

Seems there is a bug in the makefiles. If you ran configure with
--with-profile4_5=no then xbuild should end up in lib\mono\4.0 , not
lib\mono\4.5.


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


Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread cocowalla
The build machine isn't running a trimmed down mono - it's a Windows machine
that uses the official 3.2.3 binaries, which IIRC doesn't give you the
option to leave out 4.5 support.

The machine with the trimmed down mono is a Linux box.

Is there some kind of workaround for Windows so I can build for .NET 4.0?



--
View this message in context: 
http://mono.1490590.n4.nabble.com/The-assembly-mscorlib-dll-was-not-found-or-could-not-be-loaded-tp4662752p4662765.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] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread Robert Jordan

On 13.05.2014 11:28, cocowalla wrote:

I've discovered that mono is using mscorlib from `\lib\mono\4.5`, rather than
`\lib\mono\4.0`.

Now, `xbuild` is in `\lib\mono\4.5`, but my project targets .NET 4.0. Any
ideas as to what is going on here?



Try to preset a specific runtime version while running on the
slimmed down Mono:

mono --runtime=v4.0.30128 ...

or

mono --runtime=v4.0.20506 ...

Robert


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


Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread cocowalla
I should have said I was using `--runtime=v4.0` when trying to run it.

I tried the 2 difference versions you suggested, but get this for both:

System.IO.FileNotFoundException: Could not load file or assembly
'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'




--
View this message in context: 
http://mono.1490590.n4.nabble.com/The-assembly-mscorlib-dll-was-not-found-or-could-not-be-loaded-tp4662752p4662767.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] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread Robert Jordan

On 13.05.2014 14:56, cocowalla wrote:

I should have said I was using `--runtime=v4.0` when trying to run it.

I tried the 2 difference versions you suggested, but get this for both:

System.IO.FileNotFoundException: Could not load file or assembly
'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'



Does it exist? Try

gacutil -l System.Core

and paste the output.

Robert


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


Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread cocowalla
I get:

The following assemblies are installed into the GAC:
System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Number of items = 1

For completeness, here is the complete command I am using to trim down the
mono build:

CC=gcc -m64 ./autogen.sh --prefix=/opt/mono64 --with-profile4=yes
--with-profile4_5=no --disable-moonlight --disable-nls
--enable-minimal=aot,profiler,com --disable-libraries --disable-boehm
--with-mcs-docs=no




--
View this message in context: 
http://mono.1490590.n4.nabble.com/The-assembly-mscorlib-dll-was-not-found-or-could-not-be-loaded-tp4662752p4662769.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] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread cocowalla
I should add that System.Core does exist in /opt/mono64/lib/mono/4.0



--
View this message in context: 
http://mono.1490590.n4.nabble.com/The-assembly-mscorlib-dll-was-not-found-or-could-not-be-loaded-tp4662752p4662770.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] Changing basic file io?

2014-05-13 Thread Michael McGlothlin
If I wanted to replace the standard libraries for file io with my own is there 
a way to push my replacement in so that it'd fill that role without needing to 
rewrite every program, and third-party library, that uses file io? I guess 
there must be some way since Mono exists at all. I get annoyed when programs 
lose data or corrupt files so I have a transactional wrapper that makes 
snapshots and logs changes.


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


Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread cocowalla
OK, figured it out. I needed to set MONO_PATH to:

/opt/mono64/lib/mono/4.0:/opt/mono64/lib/mono/3.5:/opt/mono64/lib/mono/2.0:.

So I needed to tell it where to look for libraries; I had (wrongly) assumed
that would be automatic based on the location of the mono executable.



--
View this message in context: 
http://mono.1490590.n4.nabble.com/The-assembly-mscorlib-dll-was-not-found-or-could-not-be-loaded-tp4662752p4662772.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] arraylist.sort unstable ?

2014-05-13 Thread andreas graeper
i am learning collections / generics ..
and found an example defining a class Cmp that implements IComparer using
CaseInsensitiveComparer

ArrayList l = new ArrayList();
l.Add(a);
l.Add(A);

l.Sort(new Cmp()); lprint(l);
l.Sort(new CaseInsensitiveComparer()); lprint(l);

each time i sort with either of that comparers the order of a,A is
changed,
though the Compare(a,A) returns 0.

is this an error ?
using the same comparer class twice should return the same order ?!

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