caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: art <ayerkes@gmvnetwork.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Initial port of ocaml for mingw (long)
Date: Tue, 25 Sep 2001 15:24:34 -0500	[thread overview]
Message-ID: <3BB0E802.67F66824@gmvnetwork.com> (raw)

CaptnJamesKirk@aol.com said:

> I could not get it to build completely, see the notes below. Due to the 
> number of cygwin tools needed, this will probably have to be a binary 
> distribution to use with mingw, not a source distribution to build with 

mingw.
>

Actually, my thought was to build with cygwin itself at least in the
short term.  The important thing (to me) is the ability to write nice
software and distribute it without the cygwin dll.  It's a bonus too
that ocaml.exe works properly without it too, but the main thing was
the ability to run ocamlopt and get an exe out that you can pass
around easily.  I built with cygwin's gcc (-mno-cygwin), tho.  I think
that it may not be realistic to build ocaml otherwise given that it
uses unix tools to create the prims list, however it can easily be
used without cygwin.

I should've made it more clear that you need cygwin gcc as yet to build.
The important point was that it's possible to get it away from
dependence
on cygwin1.dll...  

> In a message dated 9/24/2001 6:47:33 PM Central Daylight Time, 
> ayerkes@gmvnetwork.com writes:
> >  Assumptions:
> >   (You *must* have the CAMLLIB env variable set to a dos path
> >    containing your caml libraries.  You have to have libcamlrun.a
> >    in this directory in order for things to work.  You may wish
> >    to premake this directory and copy files as necessary)
> 
> Ok, I did this. I was able to build through libcamlrun.a (see below), and I 
> copied it to the appropriate directory, but not much else worked.
> 

Good to know it got that far with the mingw compiler by itself.

> >  
> >  Building: 
> >  
> >  With the files ocaml-3.02.tar.gz, ocaml-mingw-diffs and
> >  ocaml-boot-mingw.tgz in a directory, do the following:
> >  (sorry for breaking the build process)
> >  
> >  gzip -d < ocaml-3.02.tar.gz | tar xvf -
> 
> Or just "tar zxvf ocaml-3.02.tar.gz".
> 
> gzip and tar are part of the cygwin distro. I created a separate bin 
> directory, put it in my path, and copied several things from cygwin to it. 
> These included cygwin1.dll (of course), make (for some reason the make that 
> comes with mingw has problems), tar, gzip & gunzip, ar, awk & gawk, bash 
> (renamed to sh), patch, and lots of text-utils and file-utils. The main 
> cygwin bin directory was not in my path, so that only the mingw gcc, as 
> (assembler), and libraries were used. I can make a complete list of the 

tools 
> needed from cygwin, if I can get it all to work.
> 

Hmm...  

>
> >  cd ocaml-3.02
> >  patch -p 0 < ../ocaml-mingw-diffs
> >  gzip -d < ../ocaml-boot-mingw.tgz | tar xvf -
> >  make
> >  : The build breaks here (access.c) ... builds ok next time
> 
> Umm, not for me. Actually the first break involved building libcamlrun.a, 
> when the linker couldn't find libpdcurses.a (which isn't part of mingw). In 
> fact, pdcurses isn't part of my cygwin distro either, but I copied the 
> regular ncurses library file to the mingw lib directory and renamed it 
> libpdcurses.a and that seemed to work. The next break was nowhere near 
> access.c, and had to do with finding pervasives.cmi. I tried "make world" 
> instead of just "make" and it built through pervasives.cmi but stopped at 
> bytecode/emitcode.ml with the error "Unbound value opEQ".
> 

Sorry, I should've mentioned that I used a small public domain curses
that
was different from the mingw one.  I meant to change that back but
didn't.
(sorry)

> I tried several different things, but could never get it beyond this point. 
> ocamlrun.exe, libocamlrun.a and ocamlyacc.exe were built, but nothing else.
> 
> >  
> >  Hopefully, this is a step in the right direction for a MinGW port.
> >  In any case, it relives the user of ocaml toplevel environments
> >  from having to have cygwin, in addition to allowing one to create
> >  executables that are free from cygwin.
> >  
> >  To complete the cycle, someone who is a bit better with mingw than
> >  I will have to change the compile line in bytelink.ml and asmlink.ml
> >  to reflect mingw,
> 
> I don't think this part will be necessary, since the mingw compiler and 
> assembler are gcc and as, just like cygwin, but I'm not completely sure.
> 

It at least needs a little I'm sure...  Even if just to get rid of the
-mno-cygwin part.  

> /John
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: 

http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr  Archives: 

http://caml.inria.fr
>
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-09-25 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-25 20:24 art [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-26 13:06 CaptnJamesKirk
2001-09-25 19:34 CaptnJamesKirk
2001-09-24 23:40 art

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BB0E802.67F66824@gmvnetwork.com \
    --to=ayerkes@gmvnetwork.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).