[Mono-dev] Ok, here is a cleaned up version of a MONO Cygwin tutorial.

Mark Lintner mlintner at sinenomine.net
Thu Sep 5 04:14:41 UTC 2013


I had posted a rough and buggy version of this before when I was in a hurry so it behooved me to clean it up a little and make it somewhat usable.



I cannot take credit for this as it is gleaned from other sites and help I have receive from other developers but it contains in one place things that in my mind are relevant and should be attended. A little bit I have found out on my own but I return that to forum as thanks for help received.  Please feel free to annotate or

append or edit as necessary to make this a better resource for those new or forgetful developers when it is necessary to setup cygwin and then build mono. It really is a handy thing to be able to use for a lot of reasons which become apparent when you need it and it is a good starting point for some developers.



The only difference between the old Cygwin setup for mono is the old one needed a special make and the new one uses the mingw tools so the configure line is new. I refer to that below.

When getting Cygwin get these packages. You will want to click the view menu at the right of the installer.  You

then want to enter each of these package names into the filter box. You will then select the latest version in the

list window.



Make sure you select the following packages when installing:
* autoconf
* automake
* bison
* gcc-core - I think you still need this
* mingw-gcc
* libtool
* make
* python

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

* gdb
* gettext
* intltool
* libiconv
* libtool
* pkg-config
* dos2unix
* git
* wget
* zip
* tar
* vim - sorry you gotta learn it. Linux has better editors but for Cygwin vim is it.
* patch



http://www.codeproject.com/Articles/19575/Building-Mono-on-Windows-the-final-battle

Cygwin must be update it changes mono changes slackers are left behind.

You must learn vim because you never want to edit files in Cygwin with notepad because it
will change the line endings and it will mess things up.

Heres one turorial
http://blog.interlinked.org/tutorials/vim_tutorial.html

Install cygwin from here:
http://cygwin.com/install.html

Let Cygwin go to C:/cygwin not program files or another drive.

when Cygwin install is complete open a Cygwin prompt:

It is on your taskbar or desktip and it is Cygwin.bat in the Cygwin directory.


Now as you are a novice put go here. It is a fine
place to put mono.
cd  /usr/src

you will get mono out of the git repository as follows:

git clone git://github.com/mono/mono.git

if you prefer a tar distribution. In the same directory

execute

wget the url to the tar file. For example

cd mono
wget http://download.mono-project.com/sources/mono/mono-3.2.1.tar.bz2

then

tar xvf mono-3.2.1.tar.bz2


Use the new configure:
shown at this link http://www.mono-project.com/Compiling_Mono_on_Windows


$./autogen.sh --host=i686-pc-mingw32 --prefix=/cygdrive/c/path to directory you want to install in somewhere on your pc

or prefix=/usr/local or /usr/opt   if you want to install in the Cygwin environment.

still in the mono directory you can type

So right here you have a decision to make. Do you have an existing mono implementation in your path right now?
If the answer is yes then

make

make install

and you are done.

If on the other hand this is the first you will do something different. This is well documented on the mono site
but for completeness I will add it here.

execute
make get-monolite-latest
make EXTERNAL_MCS="${PWD}/mcs/class/lib/monolite/gmcs.exe"

Now in either case you are done. It takes awhile so dont worry.

It should be that simple.

If its not then reach out for help on the forum. Probably someone will have answers for you. You can search the internet and find bits
and pieces and sometimes it will be just what you need and you learn while doing it.

Remember all the line-endings in the cygwin environment are unix format and all your pc editors use dos file endings just one place
in the entire setup with the wrong file endings will blow up in a bizarre way which is very tricky to figure out.

if you want to know more about mono on Cygwin with the old version, these are all good links

http://www.mono-project.com/Compiling_Mono_on_Windows - recently updated

http://www.codeproject.com/Articles/19575/Building-Mono-on-Windows-the-final-battle

http://shana.worldofcoding.com/en/mono_cygwin_tutorial.html



________________________________
From: mono-devel-list-bounces at lists.ximian.com [mono-devel-list-bounces at lists.ximian.com] on behalf of mlgo [mlintner at sinenomine.net]
Sent: Wednesday, September 04, 2013 6:14 PM
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] mono from git will not build on cygwin 32


The Mono site has been recently updated.



________________________________
From: londondev [via Mono] [ml-node+[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>]
Sent: Wednesday, September 04, 2013 5:32 PM
To: Mark Lintner
Subject: Re: mono from git will not build on cygwin 32

That tutorial should go up on the mono site.  I've spent 4 days now getting nowhere with compiling mono for the first time.  I wanted to spend an hour fixing a bug... :(


On 4 September 2013 22:37, mlgo <[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>> wrote:

The only difference between the old Cygwin setup for mono is the old one needed a special make and the new one uses the mingw tools so the configure line is new. I refer to that below.



When getting Cygwin get these packages



Make sure you select the following packages when installing:

* autoconf
* automake
* bison
* gcc-core
* mingw-gcc
* libtool
* make
* python


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



  *   gdb
  *   gettext
  *   intltool
  *   libiconv
  *   libtool

  *   pkg-config

http://www.codeproject.com/Articles/19575/Building-Mono-on-Windows-the-final-battle



Make sure you are using a recent cygwin version.

Select some handy utils for later use:



* wget
* zip


Also you want

* git

* patch
* openssh or PuTTY
* vim


You will have to learn vim because you never want to edit files in Cygwin with notepad because it

will change the line endings and it will mess things up.






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

Let Cygwin go to C:/cygwin not program files or another drive.

There are a couple of other good tutorials and they all recommend getting a special make. I think the make in Cygwin is good now so I choose that.

http://shana.worldofcoding.com/en/mono_cygwin_tutorial.html

the current make is good now from Cygwin.

when it is complete:
open a Cygwin prompt:
(it is on your taskbar or desktip and it is Cygwin.bat in the Cygwin directory.

cd  /usr/src
git clone git://github.com/mono/mono.git<http://github.com/mono/mono.git>

cd mono

Use the new configure:

$  ./autogen.sh --host=i686-pc-mingw32 --profile=/cygdrive/c/path to directory you want to install in



or profile=/usr/local or /usr/opt   if you want to install in the Cygwin environment.

still in the mono directory you can type

make

make install

It should be that simple

if you want to know more about mono on Cygwin with the old version, these are all good links
http://www.mono-project.com/Compiling_Mono_on_Windows
http://www.codeproject.com/Articles/19575/Building-Mono-on-Windows-the-final-battle
http://shana.worldofcoding.com/en/mono_cygwin_tutorial.html

________________________________
From: londondev [via Mono] [ml-node+[hidden email]<http://user/SendEmail.jtp?type=node&node=4660760&i=0>]
Sent: Wednesday, September 04, 2013 2:48 AM
To: Mark Lintner
Subject: Re: mono from git will not build on cygwin 32

I haven't been able to make Cygwin compile at all. Make just prints a blank line and stops. Is that what you're seeing?

Do you have any documentation on your old Cygwin environment that works?



Bryan Crotaz
Silver Curve

On 4 Sep 2013, at 05:45, Zoltan Varga <[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>> wrote:

Hi,

  Try running with make V=1, that will print more information.

           Zoltan


On Wed, Sep 4, 2013 at 6:05 AM, mlgo <[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>> wrote:
I updated Cygwin and now it no longer supports compilation of mono with gcc.
There is no way to backlevel it. I found Zoltan's suggestion to use this
configure statement:

"Hi,

  mono master can be built on windows using the mingw cross-compiler gcc,
i.e. install the mingw-gcc package, and configure using:

./autogen.sh --host=i686-pc-mingw32
                  Zoltan"


I'm using mono from git. Cygwin has all the recommended packages and I did
not install the gcc-g++ but installed all mingw packages.  The build now
always stops here. I have reinstalled Cygwin several times and pulled a new
mono each time. I'm wondering now since there is a 64 bit Cygwin and a I
have 64 bit machine should I be configuring with mingw64 or something.
However I had the old Cygwin environment down to a science and now I'm
crippled again. Has anybody seen this yet. This seems like something
configure is failing to generate properly to map ming types to mono types.
Zoltan will know what to do about this if anybody. It doesn't seem like it
could be a bug in ming.

al':
process.c:912:3: warning: passing argument 1 of 'EnumProcesses' from
incompatibl
e pointer type [enabled by default]
In file included from ../../mono/io-layer/io-layer.h:34:0,
                 from ../../mono/metadata/domain-internals.h:15,
                 from ../../mono/metadata/metadata-internals.h:8,
                 from ../../mono/metadata/class-internals.h:10,
                 from ../../mono/metadata/object-internals.h:8,
                 from process.c:16:
/usr/i686-pc-mingw32/sys-root/mingw/include/psapi.h:108:13: note: expected
'DWOR
D *' but argument is of type 'guint32 *'
Makefile:2221: recipe for target `libmonoruntime_la-process.lo' failed
make[3]: *** [libmonoruntime_la-process.lo] Error 1
make[3]: Leaving directory `/usr/src/mono/mono/metadata'
Makefile:429: recipe for target `all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/mono/mono'
Makefile:510: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mono'
Makefile:437: recipe for target `all' failed
make: *** [all] Error 2



--
View this message in context: http://mono.1490590.n4.nabble.com/mono-from-git-will-not-build-on-cygwin-32-tp4660749.html
Sent from the Mono - Dev mailing list archive at Nabble.com<http://Nabble.com>.
_______________________________________________
Mono-devel-list mailing list
[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>
http://lists.ximian.com/mailman/listinfo/mono-devel-list

_______________________________________________
Mono-devel-list mailing list
[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>
http://lists.ximian.com/mailman/listinfo/mono-devel-list

_______________________________________________
Mono-devel-list mailing list
[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>
http://lists.ximian.com/mailman/listinfo/mono-devel-list


________________________________
If you reply to this email, your message will be added to the discussion below:
http://mono.1490590.n4.nabble.com/mono-from-git-will-not-build-on-cygwin-32-tp4660749p4660751.html
To unsubscribe from mono from git will not build on cygwin 32, click here.
NAML<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________
View this message in context: RE: mono from git will not build on cygwin 32<http://mono.1490590.n4.nabble.com/mono-from-git-will-not-build-on-cygwin-32-tp4660749p4660760.html>

Sent from the Mono - Dev mailing list archive<http://mono.1490590.n4.nabble.com/Mono-Dev-f1517221.html> at Nabble.com.

_______________________________________________
Mono-devel-list mailing list
[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>
http://lists.ximian.com/mailman/listinfo/mono-devel-list




--
Bryan Crotaz
Managing Director
Silver Curve

_______________________________________________
Mono-devel-list mailing list
[hidden email]<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>
http://lists.ximian.com/mailman/listinfo/mono-devel-list


________________________________
If you reply to this email, your message will be added to the discussion below:
http://mono.1490590.n4.nabble.com/mono-from-git-will-not-build-on-cygwin-32-tp4660749p4660761.html
To unsubscribe from mono from git will not build on cygwin 32, click here<https://connect.emailsrvr.com/owa/UrlBlockedError.aspx>.
NAML<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

________________________________
View this message in context: RE: mono from git will not build on cygwin 32<http://mono.1490590.n4.nabble.com/mono-from-git-will-not-build-on-cygwin-32-tp4660749p4660772.html>
Sent from the Mono - Dev mailing list archive<http://mono.1490590.n4.nabble.com/Mono-Dev-f1517221.html> at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130905/222eed41/attachment-0001.html>


More information about the Mono-devel-list mailing list