caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: "Kontra, Gergely" <kgergely@mlabdial.hit.bme.hu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Yet Another Compilation Question: lablgtk for windows + cygwin-mingw
Date: Mon, 5 Aug 2002 16:40:38 +0200	[thread overview]
Message-ID: <20020805164038.A21811@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.21.0208051542080.11545-100000@mlabdial.hit.bme.hu>; from kgergely@mlabdial.hit.bme.hu on Mon, Aug 05, 2002 at 03:49:46PM +0200

> I'm keep trying compiling ocaml to be able to produce optimized code.
> When I try to configure lablgtk, it complains about not to find
> gtk-config. I know there is such an executable under linux, but I
> couldn't find this for the cygwin environment.
> 
> While reading the manual, I realized, that I cannot exactly know what is
> the difference between cygwin and mingw, because the mingw compilation
> needs cygwin. My idea is to provide fallbacks for some utility, which
> doesn't exists for mingw.

I can't help you with the GTK issues, but let me try to clarify the
Mingw/Cygwin issue.  Mingw, at least as we use it in OCaml, is just an
option on the Cygwin compilers and tools that instruct them to
generate executables that do not depend on the Cygwin DLLs, but use
standard Microsoft libraries instead.  However, it is still possible,
and indeed recommended, to use the full Cygwin development environment
to build those Cygwin-free executables.  Think of it as a
cross-compiler: from within the Cygwin environment, you generate
executables that can run without the Cygwin environment.

So, I think there is no need to "provide fallbacks for some
utilities", at least if these utilities are used only during the build
process: just install the full Cygwin environment and be done with it.

> And I don't understand why cygwin compiled
> code is faster, because such tiny utilities like grep, sed, awk runs
> _VERY_ slowly on my Duron.

Yes, file accesses are a bit slow under Cygwin, due to the Unix
emulation layer they have to cross.  The OCaml bytecode interpreter is
faster than in the native Win32 port, though, because it is compiled
by gcc and takes advantage of gcc-specific tricks.

> The distributed binary ocaml version is for MSVC, am I right?

Yes.

> Can I hack this version to use my mingw-gcc compiler?

No.  To install the Mingw version of OCaml, you need to compile OCaml
from sources.  

One last, general comment.  (Climbing on my soapbox.)  The GNU
compilers, OCaml, GTK. lablgtk, etc, are all software projects that
are developed primarily under Unix, and then ported to Windows.  While
each of these ports are done carefully and with considerable ingenuity,
Windows is not Unix and minor differences or inconsistencies remain in
each port.  These minor issues are usually workable when you use only
one port, but can become a real headache when you pile up port over
port over port.  What I am coming at is that unless you like to suffer
and are ready to solve these issues yourself, it doesn't make much
sense to develop an OCaml+lablgtk+GTK program under Windows.  

Hope this helps,

- Xavier Leroy
-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-08-05 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05 13:49 Kontra, Gergely
2002-08-05 14:40 ` Xavier Leroy [this message]
2002-08-05 17:05   ` fred
2002-08-06  8:59     ` Xavier Leroy
2002-08-06  9:52     ` Nicolas Cannasse
2002-08-08 14:07   ` Alan Schmitt

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=20020805164038.A21811@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=kgergely@mlabdial.hit.bme.hu \
    /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).