Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "\"Márk S. Zoltán\"" <zoltan.s.mark@dravanet.hu>
To: Caml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: Re: [Caml-list] Re: MinGW port w/o Cygwin?
Date: Sun, 23 Dec 2007 16:20:01 +0100	[thread overview]
Message-ID: <476E7CA1.6000501@dravanet.hu> (raw)
In-Reply-To: <90823c940712210606h24f7617eh4e20745cd3e4782a@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3242 bytes --]

Dmitry Bely wrote:
> On Dec 20, 2007 11:18 PM, Kuba Ober <ober.14@osu.edu> wrote:
>
>   
>> Tried it and sure enough - it works!!! (On an XP machine that never saw Cygwin
>> either).
>>
>> That's *extremely* good news to me.
>>
>> I guess that Ocaml maintainers should just drop that Cygwin requirement, and
>> tweak their build process to work "out of the box" with MSYS/MinGW.
>>     
>
> If MSYS become mandatory I strongly disagree. Cygwin is a common
> requirement for building any Ocaml distribution on Windows (even if
> you use Microsoft Visual Studio). I see absolutely no problem to
> install and use it. Why I should bother to install another Cygwin fork
> (MSYS) and handle name clashes etc.?
>
> - Dmitry Bely
>
>   

I am using my clandestine MSys + MinGW OCaml since about 3.0, and I have 
originally switched to MSys because the configuration scripts of a 
number of other apps and libraries did not handle the -mno-cygwin flag, 
or any other flag for that matter: the 'supply extra compiler flags' 
feature seemed to be thoroughly broken in all configure scripts, I 
wonder if anyone ever uses it. When it comes to building apps from 
tarballs, the best bet is to use Cygwin alone, if you can abide by 
having to carry cygwin1.dll around - I cannot. Next best is MSys, and 
the worst is Cygwin with -mno-cygwin, supported by very few apps. On the 
positive side, I have kept MSys and Cygwin side-by-side for years and 
never had any name clashes. If you want two variants of the same app, 
e.g. a Cygwin ocaml (for debugging, which does not work in the MinGW 
variant) and an MSys + MinGW ocaml (for release builds without a need 
for cygwin1.dll), AND you want the same home directory for both systems, 
THEN you need to make sure your .profile or .bashrc 'sed-its' the path 
to point to the correct app depending on the system being fired up; I 
did it and never ran into name clashes or anything similar.

I don't think the MinGW-over-Cygwin variant must actually be dropped, 
since a pure MSys + MinGW version would be relatively easy to maintain 
alongside it. As an illustration, pretty much all I ever needed to do is 
comment out a code snippet in ccomp.ml (to prevent a responsefile from 
being even used, see below) and then build ocaml on MSys according to 
the same procedure one would use for MinGW over Cygwin. With v3.10 this 
works like a charm (some much earlier versions required extra setup 
because the camlp4 Win32 build used to be slightly aberrant).

====================================

MSys howto:  edit utils\ccomp.ml by commenting-out the following code:

let quote_files lst =
  let s =
    String.concat " "
      (List.map (fun f -> if f = "" then f else Filename.quote f) lst) in
  (*if Sys.os_type = "Win32" && String.length s >= 256
  then build_diversion lst
  else*) s

Copy config\Makefile.mingw to config\Makefile and edit it to set your 
preferences (e.g. I always disable shared libs - maybe they wouldn't 
work with this method at all, I don't know). Copy config\m-nt.h to 
config\m.h and config\s-nt.h to config\s.h. I also usually copy the main 
Makefile.nt onto Makefile, such that I don't have to remember to type -f 
Makefile.nt on the make command line. Works without a hitch.


[-- Attachment #2: Type: text/html, Size: 3848 bytes --]

  reply	other threads:[~2007-12-23 15:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 14:30 Kuba Ober
2007-12-20 15:23 ` Zheng Li
2007-12-20 20:18   ` [Caml-list] " Kuba Ober
2007-12-21 14:06     ` Dmitry Bely
2007-12-23 15:20       ` "Márk S. Zoltán" [this message]
2007-12-23 16:33         ` Re : " Adrien
2007-12-24 12:50           ` Dmitry Bely
2007-12-26 17:59             ` Kuba Ober
2007-12-26 17:54           ` Kuba Ober
2008-01-06 15:14             ` Re : " Adrien
2008-01-08 14:25               ` Kuba Ober
2007-12-24 10:40         ` Richard Jones
2007-12-26 18:01           ` Kuba Ober
2007-12-26 17:45       ` Kuba Ober
2007-12-26 22:48         ` Dmitry Bely
2007-12-27 12:41           ` Kuba Ober

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=476E7CA1.6000501@dravanet.hu \
    --to=zoltan.s.mark@dravanet.hu \
    --cc=caml-list@yquem.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