caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Ocaml on windows
       [not found] <20130626113838.0643281793@sympa.inria.fr>
@ 2013-06-26 12:02 ` r.3
  2013-06-26 17:45   ` Bikal Gurung
  0 siblings, 1 reply; 18+ messages in thread
From: r.3 @ 2013-06-26 12:02 UTC (permalink / raw)
  To: caml-list

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

Hello, 
I personnaly used mxe to cross compile from linux to windows (gtk2, cairo, camlimages) 
Mxe is a set of hundreds of C libraries cross-compiled, plus a few ocaml libraries. 
community is nice for support of C libraries, but would not be able to help you on ocaml packages. 

what C and ocaml libraries does your project depend on ? What build system do you use (ocamlbuild, Makefile, ...) 
This might be easy to use mxe, depending on your answers. 

Best regards, 
William 



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-26 12:02 ` [Caml-list] Ocaml on windows r.3
@ 2013-06-26 17:45   ` Bikal Gurung
  2013-06-26 17:55     ` David Allsopp
  2013-06-26 19:54     ` Alain Frisch
  0 siblings, 2 replies; 18+ messages in thread
From: Bikal Gurung @ 2013-06-26 17:45 UTC (permalink / raw)
  To: r.3; +Cc: caml-list

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

I am looking to develop a desktop application which will be distributed to
customers, so for now I think I will need ocaml libs like wxwidget,
batteries, sql lite db library, sockets, networking etc.

Is anyone using omake on windows? Does it have a dependency on Cygwin like
ocamlbuild?

B.

Bikal Gurung
Enterprise Integration Architect
bikal.gurung@lemaetech.co.uk
Mobile: +44 (0) 777 556 4109
London, UK


On 26 June 2013 13:02, <r.3@libertysurf.fr> wrote:

>  Hello,
> I personnaly used mxe to cross compile from linux to windows (gtk2, cairo,
> camlimages)
> Mxe is a set of hundreds of C libraries cross-compiled, plus a few ocaml
> libraries.
> community is nice for support of C libraries, but would not be able to
> help you on ocaml packages.
>
> what C and ocaml libraries does your project depend on ? What build system
> do you use (ocamlbuild, Makefile, ...)
> This might be easy to use mxe, depending on your answers.
>
> Best regards,
> William
>
>
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [Caml-list] Ocaml on windows
  2013-06-26 17:45   ` Bikal Gurung
@ 2013-06-26 17:55     ` David Allsopp
  2013-06-26 18:07       ` Bikal Gurung
  2013-06-26 18:12       ` Adrien Nader
  2013-06-26 19:54     ` Alain Frisch
  1 sibling, 2 replies; 18+ messages in thread
From: David Allsopp @ 2013-06-26 17:55 UTC (permalink / raw)
  To: caml-list

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

That makes Malcolm Matalka's comment even more pertinent - is there a reason for ruling out F#? I think you'll have a much easier time doing Windows GUIs with that than with OCaml (and I'd go so far as to say the result will look better, assuming that you have no interest in cross-platform support).


David

From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On Behalf Of Bikal Gurung
Sent: 26 June 2013 18:45
To: r.3@libertysurf.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Ocaml on windows

I am looking to develop a desktop application which will be distributed to customers, so for now I think I will need ocaml libs like wxwidget, batteries, sql lite db library, sockets, networking etc.

Is anyone using omake on windows? Does it have a dependency on Cygwin like ocamlbuild?

B.

Bikal Gurung
Enterprise Integration Architect
bikal.gurung@lemaetech.co.uk<mailto:bikal.gurung@lemaetech.co.uk>
Mobile: +44 (0) 777 556 4109
London, UK

On 26 June 2013 13:02, <r.3@libertysurf.fr<mailto:r.3@libertysurf.fr>> wrote:
Hello,
I personnaly used mxe to cross compile from linux to windows (gtk2, cairo, camlimages)
Mxe is a set of hundreds of C libraries cross-compiled, plus a few ocaml libraries.
community is nice for support of C libraries, but would not be able to help you on ocaml packages.

what C and ocaml libraries does your project depend on ? What build system do you use (ocamlbuild, Makefile, ...)
This might be easy to use mxe, depending on your answers.

Best regards,
William



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-26 17:55     ` David Allsopp
@ 2013-06-26 18:07       ` Bikal Gurung
  2013-06-26 18:28         ` Wojciech Meyer
  2013-06-26 18:12       ` Adrien Nader
  1 sibling, 1 reply; 18+ messages in thread
From: Bikal Gurung @ 2013-06-26 18:07 UTC (permalink / raw)
  To: David Allsopp; +Cc: caml-list

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

David,

Indeed. F# is a good alternative if ocaml option doesn't pan out.

Bikal Gurung
Enterprise Integration Architect
bikal.gurung@lemaetech.co.uk
Mobile: +44 (0) 777 556 4109
London, UK


On 26 June 2013 18:55, David Allsopp <dra-news@metastack.com> wrote:

>  That makes Malcolm Matalka’s comment even more pertinent – is there a
> reason for ruling out F#? I think you’ll have a much easier time doing
> Windows GUIs with that than with OCaml (and I’d go so far as to say the
> result will look better, assuming that you have no interest in
> cross-platform support).****
>
> ** **
>
> ** **
>
> David****
>
> ** **
>
> *From:* caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] *On
> Behalf Of *Bikal Gurung
> *Sent:* 26 June 2013 18:45
> *To:* r.3@libertysurf.fr
> *Cc:* caml-list@inria.fr
> *Subject:* Re: [Caml-list] Ocaml on windows****
>
> ** **
>
> I am looking to develop a desktop application which will be distributed to
> customers, so for now I think I will need ocaml libs like wxwidget,
> batteries, sql lite db library, sockets, networking etc. ****
>
>  ****
>
> Is anyone using omake on windows? Does it have a dependency on Cygwin like
> ocamlbuild?****
>
>  ****
>
> B. ****
>
>
> ****
>
> Bikal Gurung****
>
> Enterprise Integration Architect****
>
> bikal.gurung@lemaetech.co.uk****
>
> Mobile: +44 (0) 777 556 4109****
>
> London, UK****
>
> ** **
>
> On 26 June 2013 13:02, <r.3@libertysurf.fr> wrote:****
>
> Hello,
> I personnaly used mxe to cross compile from linux to windows (gtk2, cairo,
> camlimages)
> Mxe is a set of hundreds of C libraries cross-compiled, plus a few ocaml
> libraries.
> community is nice for support of C libraries, but would not be able to
> help you on ocaml packages.
>
> what C and ocaml libraries does your project depend on ? What build system
> do you use (ocamlbuild, Makefile, ...)
> This might be easy to use mxe, depending on your answers.
>
> Best regards,
> William
>
> ****
>
> ** **
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-26 17:55     ` David Allsopp
  2013-06-26 18:07       ` Bikal Gurung
@ 2013-06-26 18:12       ` Adrien Nader
  1 sibling, 0 replies; 18+ messages in thread
From: Adrien Nader @ 2013-06-26 18:12 UTC (permalink / raw)
  To: David Allsopp; +Cc: caml-list

On Wed, Jun 26, 2013, David Allsopp wrote:
> That makes Malcolm Matalka's comment even more pertinent - is there a reason for ruling out F#? I think you'll have a much easier time doing Windows GUIs with that than with OCaml (and I'd go so far as to say the result will look better, assuming that you have no interest in cross-platform support).
> 

Actually, GTK+ looks almost native on Windows 8.

Not that anything has changed in GTK+... :-) 

-- 
Adrien Nader

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-26 18:07       ` Bikal Gurung
@ 2013-06-26 18:28         ` Wojciech Meyer
  0 siblings, 0 replies; 18+ messages in thread
From: Wojciech Meyer @ 2013-06-26 18:28 UTC (permalink / raw)
  To: Bikal Gurung; +Cc: David Allsopp, caml-list

Hello Bikal,

I think all the advices saying you should at least look at F# are
good. You still can do multi-platform programming, as in CamlPDF for
instance [1].

Hope it helps,

Wojciech

[1] http://www.coherentpdf.com/ocaml-libraries.html

Bikal Gurung <bikal.gurung@lemaetech.co.uk> writes:

> David,
>  
> Indeed. F# is a good alternative if ocaml option doesn't pan out.
>
> Bikal Gurung
> Enterprise Integration Architect
> bikal.gurung@lemaetech.co.uk
> Mobile: +44 (0) 777 556 4109
> London, UK
>
>
> On 26 June 2013 18:55, David Allsopp <dra-news@metastack.com> wrote:
>
>
>         That makes Malcolm Matalka’s comment even more pertinent – is
>     there a reason for ruling out F#? I think you’ll have a much
>     easier time doing Windows GUIs with that than with OCaml (and I’d
>     go so far as to say the result will look better, assuming that you
>     have no interest in cross-platform support).
>
>      
>
>      
>
>     David
>
>      
>
>
>
>         From: caml-list-request@inria.fr
>     [mailto:caml-list-request@inria.fr] On Behalf Of Bikal Gurung
>     Sent: 26 June 2013 18:45
>     To: r.3@libertysurf.fr
>     Cc: caml-list@inria.fr
>     Subject: Re: [Caml-list] Ocaml on windows
>
>      
>
>
>         I am looking to develop a desktop application which will be
>     distributed to customers, so for now I think I will need ocaml
>     libs like wxwidget, batteries, sql lite db library, sockets,
>     networking etc.
>
>          
>
>         Is anyone using omake on windows? Does it have a dependency on
>     Cygwin like ocamlbuild?
>
>          
>
>         B.
>
>
>
>
>
>         Bikal Gurung
>
>         Enterprise Integration Architect
>
>         bikal.gurung@lemaetech.co.uk
>
>         Mobile: +44 (0) 777 556 4109
>
>         London, UK
>
>      
>
>         On 26 June 2013 13:02, <r.3@libertysurf.fr> wrote:
>
>
>         Hello,
>     I personnaly used mxe to cross compile from linux to windows
>     (gtk2, cairo, camlimages)
>     Mxe is a set of hundreds of C libraries cross-compiled, plus a few
>     ocaml libraries.
>     community is nice for support of C libraries, but would not be
>     able to help you on ocaml packages.
>
>     what C and ocaml libraries does your project depend on ? What
>     build system do you use (ocamlbuild, Makefile, ...)
>     This might be easy to use mxe, depending on your answers.
>
>     Best regards,
>     William
>
>
>      
>
>

--
Wojciech

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-26 17:45   ` Bikal Gurung
  2013-06-26 17:55     ` David Allsopp
@ 2013-06-26 19:54     ` Alain Frisch
  1 sibling, 0 replies; 18+ messages in thread
From: Alain Frisch @ 2013-06-26 19:54 UTC (permalink / raw)
  To: Bikal Gurung; +Cc: r.3, caml-list

On 6/26/2013 7:45 PM, Bikal Gurung wrote:
> I am looking to develop a desktop application which will be distributed
> to customers, so for now I think I will need ocaml libs like wxwidget,
> batteries, sql lite db library, sockets, networking etc.
> Is anyone using omake on windows? Does it have a dependency on Cygwin
> like ocamlbuild?

LexiFi uses omake on Windows and Linux.  It does not depend on Cygwin 
itself, if you are careful enough to not use any Cygwin tool in the 
build rules, of course.  omake actually implements a decent scripting 
language (with built-in versions of some useful tools).

FWIW, we use a tool ( http://www.lexifi.com/csml ) to interact easily 
with the .Net framework, allowing our application to access .Net 
components.  For instance, our Windows GUI is based on .Net Windows 
Forms and we use the .Net driver from Oracle.  (For PostgreSQL, we use 
Markus' ocaml bindings to the native libpq library.)


Alain

> B.
>
> Bikal Gurung
> Enterprise Integration Architect
> bikal.gurung@lemaetech.co.uk <mailto:bikal.gurung@lemaetech.co.uk>
> Mobile: +44 (0) 777 556 4109
> London, UK
>
>
> On 26 June 2013 13:02, <r.3@libertysurf.fr <mailto:r.3@libertysurf.fr>>
> wrote:
>
>     Hello,
>     I personnaly used mxe to cross compile from linux to windows (gtk2,
>     cairo, camlimages)
>     Mxe is a set of hundreds of C libraries cross-compiled, plus a few
>     ocaml libraries.
>     community is nice for support of C libraries, but would not be able
>     to help you on ocaml packages.
>
>     what C and ocaml libraries does your project depend on ? What build
>     system do you use (ocamlbuild, Makefile, ...)
>     This might be easy to use mxe, depending on your answers.
>
>     Best regards,
>     William
>
>
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [Caml-list] Ocaml on windows
  2013-06-26 18:17       ` Adrien Nader
@ 2013-06-26 19:55         ` David Allsopp
  0 siblings, 0 replies; 18+ messages in thread
From: David Allsopp @ 2013-06-26 19:55 UTC (permalink / raw)
  To: OCaml List (caml-list@inria.fr)

Adrien Nader wrote:
> On Tue, Jun 25, 2013, David Allsopp wrote:
> > Bikal Gurung wrote:
> > > Hi David,
> > >
> > > Thank you for your response. I have installed the official windows
> > > port of ocaml at http://protz.github.io/ocaml-installer/ . However, it
> mentions that MinGW/Msys is no longer supported.
> > > I rather use Mingw/Msys as well.
> >
> > I meant I use the MinGW port of the compiler rather than the MSVC port -
> I compile it using the mingw-w64 compilers provided with Cygwin. I only
> use Cygwin to compile OCaml and related libraries (again, principally for
> historical reasons, I develop using a normal command shell with GnuWin32
> to provide Unix commands). Building using Cygwin (i.e. the supported way)
> has the benefit that when you get stuck, others are likely to (be able to)
> help! :o) Do you have a particular to want to use MSYS rather than Cygwin?
> 
> By the way, wtch out for GnuWin32. It advertises a very broad support but
> it's getting old and most importantly, it lies on several things.
> For instance, fork() is implemented as:
>   int fork(void) {
>     return -1;
>   }

Oh, yes - I know it's limited! But when working from cmd, it's still slightly better than the alternatives at the moment. It's rare that something doesn't work to the point where I need to open a Cygwin terminal (regularly using make, sed, grep, m4, etc. without problem)

> > > It seems ocamlbuild requires cygwin to work, has this been your
> > > experience too? If I build the latest ocaml from trunk - 4.02dev+fp
> > > will ocaml and other tools/utilities still work on pure MingWg/Msys
> environment?
> >
> > Yes. Because I use GnuWin32 (which has its bin folder in my PATH) I
> prefer not to put C:\cygwin\bin in my PATH but symlink through the
> required utilities in C:\Dev\OCaml\bin (C:\Dev\OCaml is my installation
> root for OCaml) - my OCaml installation requires bash.exe (for
> ocamlbuild), cpp.exe (for ocamlnet) and i686-w64-mingw32-ar.exe + i686-
> w64-mingw32-as.exe + i686-w64-mingw32-dlltool.exe + i686-w64-mingw32-
> gcc.exe + i686-w64-mingw32-ranlib.exe for ocamlopt.
> 
> Do you mean you use gnuwin32's bash.exe for ocamlbuild?

No - that's done using Cygwin's. I actually don't have GnuWin32's bash (or sh) installed.


David


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-26 18:29     ` Adrien Nader
@ 2013-06-26 18:46       ` Wojciech Meyer
  0 siblings, 0 replies; 18+ messages in thread
From: Wojciech Meyer @ 2013-06-26 18:46 UTC (permalink / raw)
  To: Adrien Nader; +Cc: Gerd Stolpmann, Bikal Gurung, caml-list

Hi Adrien,

I'd raise a general mantis ticket "OCamlBuild has to work on Windows"
for ocamlbuild, to cover this work, we might do at some point. (although
don't hold your breath at the moment, this is a substantial
development).

Wojciech


Adrien Nader <adrien@notk.org> writes:

> On Mon, Jun 24, 2013, Gerd Stolpmann wrote:
>> Am 24.06.2013 19:21:05 schrieb(en) Adrien Nader:
>> >On Mon, Jun 24, 2013, Bikal Gurung wrote:
>> >> Hi,
>> >>
>> >> I am looking to use ocaml to implement a project for my
>> >employer. However, the
>> >> environment is Windows OS. I am using cygwin and so far it seems
>> >to work but
>> >> curious on experiences others have on using ocaml on windows -
>> >both as a
>> >> development and deployment platform. Also has anyone tried using
>> >opam on
>> >> windows? Does it work?
>> >>
>> >
>> >I believe opam on windows is pretty far away.
>> >
>> >The issues can be summarized in a few words: source-based package
>> >manager for ocaml on pure windows.
>> >For this to fully work, you need a perfect toolchain where everything
>> >works wonderfully.
>>
>> I can quickly report what I did to get GODI working on Windows. It
>> is of course not "pure Windows": You need Cygwin for doing builds,
>> but that's "only" because almost all build utilities are Unix-ish,
>> and it would be very hard to build anything without having some
>> shell and the usual file utilities at hand. (AFAIK the only build
>> utility that works in a pure Windows environment is omake.)
>>
>> So GODI assumes a mixed Windows environment, and this is in deed
>> doable. ocaml and all compiled code run on native Windows here, and
>> for executing build scripts there is Cygwin. This solves the utility
>> question, but you get in return some new problems, like the
>> different calling conventions. All GODI core utilities have e.g.
>> built-in support for translating Cygwin paths forth and back, so
>> they can operate on Cygwin paths although they are native Windows
>> programs. Another problem are the strange Windows rules for
>> splitting a command-line into words. As generic fallback when there
>> are too many "bad characters" in the command line I simply generate
>> a temporary script that is then executed with bash. There are
>> probably more such tricks I currently do not remember.
>>
>> So this mixed mode is actually doable, and works so well that many
>> GODI packages can be built on Windows without any special porting
>> effort. If you look at WODI, the special adaption of GODI for
>> Windows, you will mostly find additional C libraries (because you
>> cannot link against the libraries coming with Cygwin).
>>
>> We could go further and replace Cygwin completely only if we had a
>> substitute for the shell utilities. That's the core of the problem,
>> and it's a hard one, because many scripts assume 100% POSIX
>> behavior, and e.g. using Windows command-line conventions is out of
>> question.
>
> Yup, agreed, mixed is doable as WODI has proven.
> The most annoying constraint is probably that it slows down builds a lot
> and it makes frequent updates very painful (that makes source-based
> package managers far less attractive on windows [ note that on linux, I
> use and enjoy godi ]).
>
> That said, I've used ocaml on pure windows (besides bash for
> ocamlbuild). I was running everything from cmd.exe and it worked well.
> I had also built libraries which rely on oasis and it had gone well too.
> I believe that with a sufficiently full-featured build system, pure
> windows is doable and that's something which is probably fairly close.
>
> --
> Adrien Nader

--
Wojciech

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-24 20:16   ` AW: " Gerd Stolpmann
@ 2013-06-26 18:29     ` Adrien Nader
  2013-06-26 18:46       ` Wojciech Meyer
  0 siblings, 1 reply; 18+ messages in thread
From: Adrien Nader @ 2013-06-26 18:29 UTC (permalink / raw)
  To: Gerd Stolpmann; +Cc: Bikal Gurung, caml-list

On Mon, Jun 24, 2013, Gerd Stolpmann wrote:
> Am 24.06.2013 19:21:05 schrieb(en) Adrien Nader:
> >On Mon, Jun 24, 2013, Bikal Gurung wrote:
> >> Hi,
> >>
> >> I am looking to use ocaml to implement a project for my
> >employer. However, the
> >> environment is Windows OS. I am using cygwin and so far it seems
> >to work but
> >> curious on experiences others have on using ocaml on windows -
> >both as a
> >> development and deployment platform. Also has anyone tried using
> >opam on
> >> windows? Does it work?
> >>
> >
> >I believe opam on windows is pretty far away.
> >
> >The issues can be summarized in a few words: source-based package
> >manager for ocaml on pure windows.
> >For this to fully work, you need a perfect toolchain where everything
> >works wonderfully.
> 
> I can quickly report what I did to get GODI working on Windows. It
> is of course not "pure Windows": You need Cygwin for doing builds,
> but that's "only" because almost all build utilities are Unix-ish,
> and it would be very hard to build anything without having some
> shell and the usual file utilities at hand. (AFAIK the only build
> utility that works in a pure Windows environment is omake.)
> 
> So GODI assumes a mixed Windows environment, and this is in deed
> doable. ocaml and all compiled code run on native Windows here, and
> for executing build scripts there is Cygwin. This solves the utility
> question, but you get in return some new problems, like the
> different calling conventions. All GODI core utilities have e.g.
> built-in support for translating Cygwin paths forth and back, so
> they can operate on Cygwin paths although they are native Windows
> programs. Another problem are the strange Windows rules for
> splitting a command-line into words. As generic fallback when there
> are too many "bad characters" in the command line I simply generate
> a temporary script that is then executed with bash. There are
> probably more such tricks I currently do not remember.
> 
> So this mixed mode is actually doable, and works so well that many
> GODI packages can be built on Windows without any special porting
> effort. If you look at WODI, the special adaption of GODI for
> Windows, you will mostly find additional C libraries (because you
> cannot link against the libraries coming with Cygwin).
> 
> We could go further and replace Cygwin completely only if we had a
> substitute for the shell utilities. That's the core of the problem,
> and it's a hard one, because many scripts assume 100% POSIX
> behavior, and e.g. using Windows command-line conventions is out of
> question.

Yup, agreed, mixed is doable as WODI has proven.
The most annoying constraint is probably that it slows down builds a lot
and it makes frequent updates very painful (that makes source-based
package managers far less attractive on windows [ note that on linux, I
use and enjoy godi ]).

That said, I've used ocaml on pure windows (besides bash for
ocamlbuild). I was running everything from cmd.exe and it worked well.
I had also built libraries which rely on oasis and it had gone well too.
I believe that with a sufficiently full-featured build system, pure
windows is doable and that's something which is probably fairly close.

-- 
Adrien Nader

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-25  8:40     ` David Allsopp
@ 2013-06-26 18:17       ` Adrien Nader
  2013-06-26 19:55         ` David Allsopp
  0 siblings, 1 reply; 18+ messages in thread
From: Adrien Nader @ 2013-06-26 18:17 UTC (permalink / raw)
  To: David Allsopp; +Cc: OCaml List (caml-list@inria.fr)

Hi,

On Tue, Jun 25, 2013, David Allsopp wrote:
> Bikal Gurung wrote:
> > Hi David,
> >
> > Thank you for your response. I have installed the official windows port of ocaml at
> > http://protz.github.io/ocaml-installer/ . However, it mentions that MinGW/Msys is no longer supported.
> > I rather use Mingw/Msys as well.
> 
> I meant I use the MinGW port of the compiler rather than the MSVC port - I compile it using the mingw-w64 compilers provided with Cygwin. I only use Cygwin to compile OCaml and related libraries (again, principally for historical reasons, I develop using a normal command shell with GnuWin32 to provide Unix commands). Building using Cygwin (i.e. the supported way) has the benefit that when you get stuck, others are likely to (be able to) help! :o) Do you have a particular to want to use MSYS rather than Cygwin?

By the way, wtch out for GnuWin32. It advertises a very broad support
but it's getting old and most importantly, it lies on several things.
For instance, fork() is implemented as:
  int fork(void) {
    return -1;
  }

> > It seems ocamlbuild requires cygwin to work, has this been your experience too? If I build the latest
> > ocaml from trunk - 4.02dev+fp will ocaml and other tools/utilities still work on pure MingWg/Msys
> > environment?
> 
> Yes. Because I use GnuWin32 (which has its bin folder in my PATH) I prefer not to put C:\cygwin\bin in my PATH but symlink through the required utilities in C:\Dev\OCaml\bin (C:\Dev\OCaml is my installation root for OCaml) - my OCaml installation requires bash.exe (for ocamlbuild), cpp.exe (for ocamlnet) and i686-w64-mingw32-ar.exe + i686-w64-mingw32-as.exe + i686-w64-mingw32-dlltool.exe + i686-w64-mingw32-gcc.exe + i686-w64-mingw32-ranlib.exe for ocamlopt.

Do you mean you use gnuwin32's bash.exe for ocamlbuild?

I hadn't thought about doing that but it could be a pretty good match.
It's probably faster to spawn than cygwin or msys' bash and probably has
way less dependencies.

-- 
Adrien Nader

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [Caml-list] Ocaml on windows
  2013-06-24 10:01   ` Bikal Gurung
  2013-06-24 10:11     ` Jonathan Protzenko
@ 2013-06-25  8:40     ` David Allsopp
  2013-06-26 18:17       ` Adrien Nader
  1 sibling, 1 reply; 18+ messages in thread
From: David Allsopp @ 2013-06-25  8:40 UTC (permalink / raw)
  To: OCaml List (caml-list@inria.fr)

Bikal Gurung wrote:
> Hi David,
>
> Thank you for your response. I have installed the official windows port of ocaml at
> http://protz.github.io/ocaml-installer/ . However, it mentions that MinGW/Msys is no longer supported.
> I rather use Mingw/Msys as well.

I meant I use the MinGW port of the compiler rather than the MSVC port - I compile it using the mingw-w64 compilers provided with Cygwin. I only use Cygwin to compile OCaml and related libraries (again, principally for historical reasons, I develop using a normal command shell with GnuWin32 to provide Unix commands). Building using Cygwin (i.e. the supported way) has the benefit that when you get stuck, others are likely to (be able to) help! :o) Do you have a particular to want to use MSYS rather than Cygwin?

> It seems ocamlbuild requires cygwin to work, has this been your experience too? If I build the latest
> ocaml from trunk - 4.02dev+fp will ocaml and other tools/utilities still work on pure MingWg/Msys
> environment?

Yes. Because I use GnuWin32 (which has its bin folder in my PATH) I prefer not to put C:\cygwin\bin in my PATH but symlink through the required utilities in C:\Dev\OCaml\bin (C:\Dev\OCaml is my installation root for OCaml) - my OCaml installation requires bash.exe (for ocamlbuild), cpp.exe (for ocamlnet) and i686-w64-mingw32-ar.exe + i686-w64-mingw32-as.exe + i686-w64-mingw32-dlltool.exe + i686-w64-mingw32-gcc.exe + i686-w64-mingw32-ranlib.exe for ocamlopt.

> With regards to ocaml libraries, have you tried the Jane Street packages? Core, core_kernel ? 

No - I'd got the impression that their library was very Unix-oriented (though I think core_kernel may now address that?) Again, it's mainly laziness - I've been using OCaml for long enough that I already have my own core library so while switching to a supported one may be great, nothing's broken (yet!). The libraries I do use are: findlib, extlib, calendar, pcre, csv, batteries, pgocaml, camlzip, ssl, cryptokit, ocamlnet, json-wheel, json-static, spiderCaml, ocamlsha, ocamldap with natively compiled C libraries (for openssl, zlib, etc.) where appropriate.


David

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-24  9:07 Bikal Gurung
       [not found] ` <E51C5B015DBD1348A1D85763337FB6D9CC8677FE@Remus.metastack.local>
@ 2013-06-24 17:21 ` Adrien Nader
  2013-06-24 20:16   ` AW: " Gerd Stolpmann
  1 sibling, 1 reply; 18+ messages in thread
From: Adrien Nader @ 2013-06-24 17:21 UTC (permalink / raw)
  To: Bikal Gurung; +Cc: caml-list

On Mon, Jun 24, 2013, Bikal Gurung wrote:
> Hi,
> 
> I am looking to use ocaml to implement a project for my employer. However, the
> environment is Windows OS. I am using cygwin and so far it seems to work but
> curious on experiences others have on using ocaml on windows - both as a
> development and deployment platform. Also has anyone tried using opam on
> windows? Does it work?
> 

I believe opam on windows is pretty far away.

The issues can be summarized in a few words: source-based package
manager for ocaml on pure windows.
For this to fully work, you need a perfect toolchain where everything
works wonderfully.

-- 
Adrien Nader

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-24 10:11     ` Jonathan Protzenko
  2013-06-24 12:10       ` Malcolm Matalka
@ 2013-06-24 17:18       ` Adrien Nader
  1 sibling, 0 replies; 18+ messages in thread
From: Adrien Nader @ 2013-06-24 17:18 UTC (permalink / raw)
  To: Jonathan Protzenko; +Cc: Bikal Gurung, caml-list, David Allsopp

Hi,

On Mon, Jun 24, 2013, Jonathan Protzenko wrote:
> On Mon 24 Jun 2013 12:01:06 PM CEST, Bikal Gurung wrote:
> > Hi David,
> >
> > Thank you for your response. I have installed the official windows
> > port of ocaml at http://protz.github.io/ocaml-installer/ . However, it
> > mentions that MinGW/Msys is no longer supported. I rather use
> > Mingw/Msys as well.
> There are quite a few things that make working with msys painful, which 
> is the reason why I switched the installer to cygwin. The installer 
> still is a 32-bit native windows program, and still generates 32-bit 
> native windows programs. It's just that cygwin is an easy way to get a 
> toolchain and a unix-like development environment, which ocaml kind of 
> needs in order to work right (without it, you only get bytecode 
> compilation).
> - The main problem is that OCaml is, by default, configured to search 
> executables from the toolchain with the i686-pc-mingw-whatever prefix, 
> that is, the one that the mingw-w64 compilers have, when installed 
> through cygwin.
> - The second biggest problem is with flexdll which, IIRC, hardcodes the 
> use of the mingw-w64 compilers (32-bit compilers from the mingw-w64 
> project). Msys, on the other hand, uses the mingw compilers (the 
> original mingw project), and the location of the libraries / 
> executables is slightly different, or maybe flexdll doesn't auto-detect 
> the right locations for crt2.o and friends, meaning it's painful as you 
> have to manually export FLEXLINKFLAGS. At some point, it became almost 
> impossible to have that combination working. I think flexdll started to 
> hardcode the i686-pc-mingw prefix at some point, and there's no 
> ready-made, easy to install mingw-w64/msys bundle available, as far as 
> I know.

Well, msys doesn't really require one toolchain or another: you can have
mingw-w64 (either i686-w64-mingw32 or x86_64-w64-mingw32) with msys
afaik.
However msys comes from mingw.org which is the "main" site for
i686-pc-mingw32 so that doesn't make things very balanced.

Note that there is a very recent "MSYS2" project which is updated in
pretty much every respect (newer GCC, forked from a newer Cygwin which
has 64b support, ...). It's very very recent and might become a variant
of cygwin but so far there are differences in the behaviour wanted from
it compared to cygwin which means that having the two of them merged
will involve some work and discussions.

> - OCamlbuild relies on bash being available in the path to run its 
> external commands ; an easy way to have this is to have a cygwin 
> development environment. This is a know issue that no one has stepped 
> up to fix on windows.

Cygwin, or msys.

However with msys you need bash and coreutils (ocamlbuild uses "cp" in a
few places for instance, but that's trivial to fix) and all the deps
(regex, termcap, and several others).
An "easy" way to install msys would probably be mingw-get from
mingw.org, which for its default repos would use the toolchain from
mingw.org too (fun stuff).

Btw, the issue is that windows' exec*() functions take an array of
strings, then merges all these strings and had that new string to the
process on startup. This means that in order to have the arguments split
as you had hoped them to be, you need to apply some rules (which I don't
have at hand right now).

Generally speaking, I'd like to have some more code in mingw-w64 to
alleviate the need for bash.

> - Finally, the quoting conventions, IIRC, are subtly different between 
> mingw/msys and cygwin, and OCaml is tailored to cygwin.

Can you elaborate on that? I've used msys for ocaml in the past and
haven't had issues.

-- 
Adrien Nader

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-24 10:11     ` Jonathan Protzenko
@ 2013-06-24 12:10       ` Malcolm Matalka
  2013-06-24 17:18       ` Adrien Nader
  1 sibling, 0 replies; 18+ messages in thread
From: Malcolm Matalka @ 2013-06-24 12:10 UTC (permalink / raw)
  To: Jonathan Protzenko; +Cc: caml-list, Bikal Gurung, David Allsopp

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

Out of curiosity: why not opt for F#?
On Jun 24, 2013 12:11 PM, "Jonathan Protzenko" <jonathan.protzenko@gmail.com>
wrote:

> On Mon 24 Jun 2013 12:01:06 PM CEST, Bikal Gurung wrote:
> > Hi David,
> >
> > Thank you for your response. I have installed the official windows
> > port of ocaml at http://protz.github.io/ocaml-installer/ . However, it
> > mentions that MinGW/Msys is no longer supported. I rather use
> > Mingw/Msys as well.
> There are quite a few things that make working with msys painful, which
> is the reason why I switched the installer to cygwin. The installer
> still is a 32-bit native windows program, and still generates 32-bit
> native windows programs. It's just that cygwin is an easy way to get a
> toolchain and a unix-like development environment, which ocaml kind of
> needs in order to work right (without it, you only get bytecode
> compilation).
> - The main problem is that OCaml is, by default, configured to search
> executables from the toolchain with the i686-pc-mingw-whatever prefix,
> that is, the one that the mingw-w64 compilers have, when installed
> through cygwin.
> - The second biggest problem is with flexdll which, IIRC, hardcodes the
> use of the mingw-w64 compilers (32-bit compilers from the mingw-w64
> project). Msys, on the other hand, uses the mingw compilers (the
> original mingw project), and the location of the libraries /
> executables is slightly different, or maybe flexdll doesn't auto-detect
> the right locations for crt2.o and friends, meaning it's painful as you
> have to manually export FLEXLINKFLAGS. At some point, it became almost
> impossible to have that combination working. I think flexdll started to
> hardcode the i686-pc-mingw prefix at some point, and there's no
> ready-made, easy to install mingw-w64/msys bundle available, as far as
> I know.
> - OCamlbuild relies on bash being available in the path to run its
> external commands ; an easy way to have this is to have a cygwin
> development environment. This is a know issue that no one has stepped
> up to fix on windows.
> - Finally, the quoting conventions, IIRC, are subtly different between
> mingw/msys and cygwin, and OCaml is tailored to cygwin.
>
> For all these reasons, cygwin sounds like a better choice for you
> working environment on windows. But I believe msys is still possible.
> If there's something that prevents you from having it work properly, I
> think we (the team) would be happy to know about it.
>
> Cheers,
>
> jonathan
> >
> > It seems ocamlbuild requires cygwin to work, has this been your
> > experience too? If I build the latest ocaml from trunk - 4.02dev+fp
> > will ocaml and other tools/utilities still work on pure MingWg/Msys
> > environment?
> >
> > With regards to ocaml libraries, have you tried the Jane Street
> > packages? Core, core_kernel ?
> >
> > Bikal Gurung
> >
> >
> > On 24 June 2013 10:27, David Allsopp <dra-news@metastack.com
> > <mailto:dra-news@metastack.com>> wrote:
> >
> >     Bikal Gurung wrote:
> >     > I am looking to use ocaml to implement a project for my
> >     employer. However,
> >     > the environment is Windows OS. I am using cygwin and so far it
> >     seems to
> >     > work but curious on experiences others have on using ocaml on
> >     windows -
> >     > both as a development and deployment platform. Also has anyone
> >     tried using
> >     > opam on windows? Does it work?
> >
> >     I've used the MinGW Windows port of OCaml for nearly a decade.
> >     Deployment of programs is the same as deploying anything else on
> >     Windows - deploying using executables built with ocamlopt is of
> >     course trivial as they have no dependencies beyond any libraries
> >     you choose to use.
> >
> >     Partly because of how long I've used OCaml, I still build it from
> >     sources - but there are now several options including the packaged
> >     Windows installer, GODI/WODI, etc. Although Windows OCaml users
> >     are a minority, there are quite a few developers actively
> >     contributing (the recent 64-bit MinGW port was
> >     community-initiated, I think).
> >
> >     Last time I looked, Windows support for opam appeared to be a todo
> >     list item, but I haven't looked in a while (laziness... I already
> >     have parallel build scripts of my own, so a package manager is
> >     lower down my priority list)
> >
> >     HTH,
> >
> >
> >     David
> >
> >
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
  2013-06-24 10:01   ` Bikal Gurung
@ 2013-06-24 10:11     ` Jonathan Protzenko
  2013-06-24 12:10       ` Malcolm Matalka
  2013-06-24 17:18       ` Adrien Nader
  2013-06-25  8:40     ` David Allsopp
  1 sibling, 2 replies; 18+ messages in thread
From: Jonathan Protzenko @ 2013-06-24 10:11 UTC (permalink / raw)
  To: Bikal Gurung; +Cc: caml-list, David Allsopp

On Mon 24 Jun 2013 12:01:06 PM CEST, Bikal Gurung wrote:
> Hi David,
>
> Thank you for your response. I have installed the official windows
> port of ocaml at http://protz.github.io/ocaml-installer/ . However, it
> mentions that MinGW/Msys is no longer supported. I rather use
> Mingw/Msys as well.
There are quite a few things that make working with msys painful, which 
is the reason why I switched the installer to cygwin. The installer 
still is a 32-bit native windows program, and still generates 32-bit 
native windows programs. It's just that cygwin is an easy way to get a 
toolchain and a unix-like development environment, which ocaml kind of 
needs in order to work right (without it, you only get bytecode 
compilation).
- The main problem is that OCaml is, by default, configured to search 
executables from the toolchain with the i686-pc-mingw-whatever prefix, 
that is, the one that the mingw-w64 compilers have, when installed 
through cygwin.
- The second biggest problem is with flexdll which, IIRC, hardcodes the 
use of the mingw-w64 compilers (32-bit compilers from the mingw-w64 
project). Msys, on the other hand, uses the mingw compilers (the 
original mingw project), and the location of the libraries / 
executables is slightly different, or maybe flexdll doesn't auto-detect 
the right locations for crt2.o and friends, meaning it's painful as you 
have to manually export FLEXLINKFLAGS. At some point, it became almost 
impossible to have that combination working. I think flexdll started to 
hardcode the i686-pc-mingw prefix at some point, and there's no 
ready-made, easy to install mingw-w64/msys bundle available, as far as 
I know.
- OCamlbuild relies on bash being available in the path to run its 
external commands ; an easy way to have this is to have a cygwin 
development environment. This is a know issue that no one has stepped 
up to fix on windows.
- Finally, the quoting conventions, IIRC, are subtly different between 
mingw/msys and cygwin, and OCaml is tailored to cygwin.

For all these reasons, cygwin sounds like a better choice for you 
working environment on windows. But I believe msys is still possible. 
If there's something that prevents you from having it work properly, I 
think we (the team) would be happy to know about it.

Cheers,

jonathan
>
> It seems ocamlbuild requires cygwin to work, has this been your
> experience too? If I build the latest ocaml from trunk - 4.02dev+fp
> will ocaml and other tools/utilities still work on pure MingWg/Msys
> environment?
>
> With regards to ocaml libraries, have you tried the Jane Street
> packages? Core, core_kernel ?
>
> Bikal Gurung
>
>
> On 24 June 2013 10:27, David Allsopp <dra-news@metastack.com
> <mailto:dra-news@metastack.com>> wrote:
>
>     Bikal Gurung wrote:
>     > I am looking to use ocaml to implement a project for my
>     employer. However,
>     > the environment is Windows OS. I am using cygwin and so far it
>     seems to
>     > work but curious on experiences others have on using ocaml on
>     windows -
>     > both as a development and deployment platform. Also has anyone
>     tried using
>     > opam on windows? Does it work?
>
>     I've used the MinGW Windows port of OCaml for nearly a decade.
>     Deployment of programs is the same as deploying anything else on
>     Windows - deploying using executables built with ocamlopt is of
>     course trivial as they have no dependencies beyond any libraries
>     you choose to use.
>
>     Partly because of how long I've used OCaml, I still build it from
>     sources - but there are now several options including the packaged
>     Windows installer, GODI/WODI, etc. Although Windows OCaml users
>     are a minority, there are quite a few developers actively
>     contributing (the recent 64-bit MinGW port was
>     community-initiated, I think).
>
>     Last time I looked, Windows support for opam appeared to be a todo
>     list item, but I haven't looked in a while (laziness... I already
>     have parallel build scripts of my own, so a package manager is
>     lower down my priority list)
>
>     HTH,
>
>
>     David
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] Ocaml on windows
       [not found] ` <E51C5B015DBD1348A1D85763337FB6D9CC8677FE@Remus.metastack.local>
@ 2013-06-24 10:01   ` Bikal Gurung
  2013-06-24 10:11     ` Jonathan Protzenko
  2013-06-25  8:40     ` David Allsopp
  0 siblings, 2 replies; 18+ messages in thread
From: Bikal Gurung @ 2013-06-24 10:01 UTC (permalink / raw)
  To: David Allsopp; +Cc: caml-list

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

Hi David,

Thank you for your response. I have installed the official windows port of
ocaml at http://protz.github.io/ocaml-installer/ . However, it mentions
that MinGW/Msys is no longer supported. I rather use Mingw/Msys as well.

It seems ocamlbuild requires cygwin to work, has this been your experience
too? If I build the latest ocaml from trunk - 4.02dev+fp will ocaml and
other tools/utilities still work on pure MingWg/Msys environment?

With regards to ocaml libraries, have you tried the Jane Street packages?
Core, core_kernel ?

Bikal Gurung


On 24 June 2013 10:27, David Allsopp <dra-news@metastack.com> wrote:

> Bikal Gurung wrote:
> > I am looking to use ocaml to implement a project for my employer.
> However,
> > the environment is Windows OS. I am using cygwin and so far it seems to
> > work but curious on experiences others have on using ocaml on windows -
> > both as a development and deployment platform. Also has anyone tried
> using
> > opam on windows? Does it work?
>
> I've used the MinGW Windows port of OCaml for nearly a decade. Deployment
> of programs is the same as deploying anything else on Windows - deploying
> using executables built with ocamlopt is of course trivial as they have no
> dependencies beyond any libraries you choose to use.
>
> Partly because of how long I've used OCaml, I still build it from sources
> - but there are now several options including the packaged Windows
> installer, GODI/WODI, etc. Although Windows OCaml users are a minority,
> there are quite a few developers actively contributing (the recent 64-bit
> MinGW port was community-initiated, I think).
>
> Last time I looked, Windows support for opam appeared to be a todo list
> item, but I haven't looked in a while (laziness... I already have parallel
> build scripts of my own, so a package manager is lower down my priority
> list)
>
> HTH,
>
>
> David
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Caml-list] Ocaml on windows
@ 2013-06-24  9:07 Bikal Gurung
       [not found] ` <E51C5B015DBD1348A1D85763337FB6D9CC8677FE@Remus.metastack.local>
  2013-06-24 17:21 ` Adrien Nader
  0 siblings, 2 replies; 18+ messages in thread
From: Bikal Gurung @ 2013-06-24  9:07 UTC (permalink / raw)
  To: caml-list

Hi,

I am looking to use ocaml to implement a project for my employer. However, the
environment is Windows OS. I am using cygwin and so far it seems to work but
curious on experiences others have on using ocaml on windows - both as a
development and deployment platform. Also has anyone tried using opam on
windows? Does it work?

Bikal

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-06-26 19:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20130626113838.0643281793@sympa.inria.fr>
2013-06-26 12:02 ` [Caml-list] Ocaml on windows r.3
2013-06-26 17:45   ` Bikal Gurung
2013-06-26 17:55     ` David Allsopp
2013-06-26 18:07       ` Bikal Gurung
2013-06-26 18:28         ` Wojciech Meyer
2013-06-26 18:12       ` Adrien Nader
2013-06-26 19:54     ` Alain Frisch
2013-06-24  9:07 Bikal Gurung
     [not found] ` <E51C5B015DBD1348A1D85763337FB6D9CC8677FE@Remus.metastack.local>
2013-06-24 10:01   ` Bikal Gurung
2013-06-24 10:11     ` Jonathan Protzenko
2013-06-24 12:10       ` Malcolm Matalka
2013-06-24 17:18       ` Adrien Nader
2013-06-25  8:40     ` David Allsopp
2013-06-26 18:17       ` Adrien Nader
2013-06-26 19:55         ` David Allsopp
2013-06-24 17:21 ` Adrien Nader
2013-06-24 20:16   ` AW: " Gerd Stolpmann
2013-06-26 18:29     ` Adrien Nader
2013-06-26 18:46       ` Wojciech Meyer

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).