[Mono-list] Latest mono for Cygwin

Rogelio Robles rogelio_robles@yahoo.com
Wed, 30 Jan 2002 15:28:21 -0800 (PST)


Here is my own experience and the conclusions that I
arrived. Please correct me if I'm wrong but since
today, finally! ;-), I was able to run the mono
runtime programs: mint, mono and monodis in my Linux
box using the mono class libraries against csc.exe or
mcs.exe generated binaries, I feel positive that I
have a working environment. I have just tested console
programs, no GTK+ based Windows.Forms yet.

The first mistake that I did was to assume that I can
build everything: c# compiler, class libraries and
runtime in cygwin. Wrong. Just the first two items.

The mono class library and the C# compiler (/mcs
sub-directory) IS meant to be built in cygwin, ONLY,
until today, once that the c# compiler is self hosting
it will replace the Microsoft .NET SDK compiler at
some point in time and everything will be compiled and
hosted on Linux.

Here I got a fresh cvs tree snapshot and I duplicated
it in both environments: cygwin and Linux.

So, go to your cygwin window in the /mcs sub-dir and
do a make. That's it. First is going to build the jay
parser generator, then generate the c# parser, then
the c# mono compiler mcs.exe, then the class libraries
assemblies putting all .DLLs in /mcs/class/lib, then
builds and runs some tests. Keep in mind this
directory, we’ll return later to have a mono only
environment.

Building the mono runtime (/mono sub-directory) in
cygwin currently is NOT supported by the build
scripts, ONLY is meant to be build in Linux, again my
own conclusion, and I did all of sort of things like
you to 'fix' my cygwin environment X-(

So, go to your linux box in the /mono sub-dir. Here is
assumed that you should have installed the pkg-config
and glib2 .RPMs (in my case) if youd dont have them
find the latest versions in www.rpmfind.net. After
that, do first ./configure, this assumes that your
default repository for the runtime binaries and .DLLs
is /usr/local/bin and /usr/local/lib.

After that. do ./make, then switch to root, and do a
./make install, this will install the runtime
binaries: mono, mint, monodis in /usr/local/bin, the
man pages, .H header files, and SOME libraries in
/usr/local/lib, it will try to install the mono class
libraries assemblies, but here is assuming the
specific directory tree layout of the mono team. In
order to use the mono class libraries what I did was
to ftp all the .DLL files in the cygwin environment
under /mcs/class/lib, as I told you some paragraphs
above, and put them in my linux box in /usr/local/lib.
You can switch back to your account but first make
sure that you have execute access turned on for all
libraries. The mono team should have
VMWare+Windows+Cygwin on a Linux box to have
everything in one box with some a samba mount point as
a bridge to move files freely around between cygwin
and Linux envs, not my case: two separated boxes.

At this point I had everything in place on Linux. I
ran $mono <program-name>.exe and in between some
runtime logging information displayed, I saw the
output of my program.

I’m able to run: mono, mint and monodis. I dissambled
my console program, the corlib.dll and it worked. Here
is where I’m. Next step GUI stuff.

Hope this helps.

Rogelio

--- Daniel Lewis <dihlewis@yahoo.co.uk> wrote:
> > I can't get it to build either, due to problems in
> glib. I kind
> > of gave up, concluding that everyone was too busy
> to help.
> 
> Hi David,
> 
> I don't know if you were having the same problems I
> was with glib, but if it
> helps I can go through what I did to get glib
> working. It seems Cygwin
> compilation is quite a recurrent topic on this list,
> so maybe it's a good idea
> if we all pool our knowledge of the area.
> 
> I did this from a clean install of the latest
> version of Cygwin (after
> accidently trashing my old copy :) Here's what I can
> remember doing:
> 
> 1. pkg-config
> 
> Download pkg-config.
> 
>   http://www.freedesktop.org/software/pkgconfig/
>  
> Untar and change the return type of strsignal on
> line 674 to const char:
> 
>   extern const char *strsignal (int sig);
> 
> Configure and compile:
> 
>   ./configure --prefix=/usr
>   make && make install
> 
> 2. Native glib
> 
> I downloaded the following files from the Win32 GIMP
> project:
> 
>  
>
http://www.gimp.org/~tml/gimp/win32//new-downloads.html
> 
>   glib-1.3.12-20020101.zip
>   glib-dev-1.3.12-20020101.zip
>   libiconv-1.7.zip
>   libiconv-dev-1.7.zip
>   libintl-0.10.40-20020101.zip
> 
> (Don't bother with the pkg-config there because we
> want a Cygwin compiled
> version that understands Unix filenames.)
> 
> Make a directory to put this distribution into.
> They're native libraries, so
> you probably want to keep them well out of /usr
> which is for all your Cygwin
> libraries, or you may end up clobbering stuff (like
> gettext). I made a new
> directory:
> 
>   mkdir /usr/native
>   find *.zip -exec unzip -d /usr/native {} \;
> 
> Now there are two autoconf files in this
> distribution, so I just copied these
> into my main aclocal directory:
> 
>   cp /usr/native/share/aclocal/*.m4
> /usr/share/aclocal/
>  
> (Maybe there's an environment variable for aclocal -
> that would be a better
> solution.)
> 
> There are also some pkg-config files that come with
> this distribution:
> 
>   /usr/native/lib/pkg-config/*.pc
> 
> If you look at these files, you'll see the 'prefix'
> variable is coded as
> /target. Either edit the files and change this to
> /usr/native, or else just
> make a symlink from /usr/native to /target.
> 
> 3. Set your paths
> 
> export PATH=$PATH:/usr/native/lib
> export PKG_CONFIG_PATH=/usr/native/lib/pkgconfig
> 
> That should be it... I can't remember whether these
> packages needed the
> MSVCRTD.DLL library or not.
> But it doesn't hurt to have a copy of that in your
> SYSTEM32 directory.
> 
> 4. Compile mono
> 
> This is about as far as I got. If you already got
> this far, or if you got any
> further than this I'd be happy to hear about it.
> 
> Thanks,
>   Dan.
> 
> 
> 
> --- David Dawkins <david_j_dawkins@hotmail.com>
> wrote:
> 
> > >From: Daniel Lewis <dihlewis@yahoo.co.uk>
> > >To: mono-list@ximian.com
> > >Subject: [Mono-list] Latest mono for Cygwin
> > >Date: Wed, 30 Jan 2002 15:59:48 +0000 (GMT)
> > >
> > >Hi
> > >
> > >I was wondering what the latest snapshot date is
> that anyone has got to 
> > >compile
> > >under Cygwin. I've been trying to compile the CVS
> but it breaks when it 
> > >enters
> > >the metadata directory. (socket-io: is it
> supposed to be using Cygwin 
> > >sockets
> > >or Winsock?)
> > >
> > >Any other advice would be much appreciated.
> > >
> > >Thanks,
> > >   Dan.
> > >
> > >
> >
> >__________________________________________________
> > >Do You Yahoo!?
> > >Everything you'll ever need on one web page
> > >from News and Sport to Email and Music Charts
> > >http://uk.my.yahoo.com
> > >
> > >_______________________________________________
> > >Mono-list maillist  -  Mono-list@ximian.com
> >
> >http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> > 
> > 
> > 
> >
>
_________________________________________________________________
> > Chat with friends online, try MSN Messenger:
> http://messenger.msn.com
> >  
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com