caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien <camaradetux@gmail.com>
To: Caml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Trying to setup mingw OCaml 3.12.1 + fresh cygwin
Date: Fri, 12 Aug 2011 15:07:04 +0200	[thread overview]
Message-ID: <CAP5QFJnBCkh0CJwPF4g882mNcZgoKtd64w22oLDLLc36oJtemg@mail.gmail.com> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9C23F76F1@Remus.metastack.local>

On 12/08/2011, David Allsopp <dra-news@metastack.com> wrote:
> Matthieu Dubuget wrote:
>> From: David Allsopp <dra-news@metastack.com> wrote:
>> > Good to know that 64-bit MinGW is working - that said, I thought the
>> MinGW port was broken in 3.12.1 or is that not affected with the 64-bit
>> compiler? Could you share details on how you configured OCaml?
>>
>> This is not 64 bits. i686-w64-mingw32 is 32 bits.
>
> Ah, my bad - I mistakenly thought the mingw32 was the project and w64 the
> architecture!
>
> I'm probably being low, but is the main benefit of using mingw-w64-mingw32
> over the version shipped with Cygwin (-mno-cygwin) simply that the latter
> isn't working with 3.12.1 or is there another reason for using it?

Well, first and as far as I know, cygwin has had a package for the
*-w64-mingw32 for some time now. They are maintained by someone active
within the mingw-w64 project.

The reason to use one or another is to know which tools you are going
to use. Compiling from cygwin to windows without cygwin (what you call
-mno-cygwin) is actually cross-compilation!

Using mingw* from cmd.exe means you don't have a shell interpreter or
most of the posix tools.

Using it from msys (which is an ancient fork from cygwin which
requires a fork from gcc-2.96) means you have a mutant environment
which is trying to both please posix and windows. I'd call msys
"mostly unreliable crap". It's pretty light, it looks and feels native
but it's a weird mix and _you_ should absolutely never link against
the msys dll.

Cygwin simply lets you use more tools and have them working better
usually. Cygwin is also way slower (I still remember simple
./configure scripts taking 15 minutes to run, and networking has a
higher latency too).

Of course, you can also cross-compile from linux or any other posixy OS.


All of them have advantages and issues. One issue of msys is having
even more headaches when doing stuff on windows by the way.


As for -mno-cygwin, I saw mentions of it on IRC quite recently and
found out that it was on its way out. Actually that it was already
removed. See:
  "PING: Deprecation of -mno-cygwin"
  http://cygwin.com/ml/cygwin/2009-03/threads.html#00766

It has been deprecated since 2009 and your GCC documentation should
actually reflect that. I think it was only removed very recently which
means it won't disappear until the next release at least but it's
probably already subbject to bitrot.

As far as I know (haven't looked at that), the right way is simply to
cross-compile. Instead of passing -mno-cygwin as a CFLAG, use
--host=x86_64-w64-mingw32 when calling configure.

--

Adrien Nader

      reply	other threads:[~2011-08-12 13:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 14:35 Matthieu Dubuget
2011-08-08 19:25 ` Adrien
2011-08-10  8:25 ` David Allsopp
2011-08-10  9:42   ` Matthieu Dubuget
2011-08-10 10:55     ` Adrien
2011-08-12 11:55       ` David Allsopp
2011-08-12 12:00     ` David Allsopp
2011-08-12 13:07       ` Adrien [this message]

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=CAP5QFJnBCkh0CJwPF4g882mNcZgoKtd64w22oLDLLc36oJtemg@mail.gmail.com \
    --to=camaradetux@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).