caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Christophe TROESTLER <Christophe.Troestler+ocaml@umh.ac.be>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] windows ocaml
Date: Tue, 19 Jun 2007 19:25:26 +1000	[thread overview]
Message-ID: <1182245126.32282.17.camel@rosella.wigram> (raw)
In-Reply-To: <20070619.092806.212251413.Christophe.Troestler+ocaml@umh.ac.be>

On Tue, 2007-06-19 at 09:28 +0200, Christophe TROESTLER wrote:
> On Tue, 19 Jun 2007, skaller <skaller@users.sourceforge.net> wrote:
> > 
> > on Windows. This is with 3.09 native build.
> 
> Here is what I get for 3.10, MSVC.
> 
> > 1. ocamlc makes a bytecode file without an extension, which
> > cannot be executed. Ocamlopt adds '.exe'. This is inconsistent.
> 
> ocamlc without -o produces camlprog.exe

We're using -o I believe ..

	ocamlopt -o fred

produces fred.exe not merely fred AFAIK (not on Windows now).
This is inconsistent, it broke our build script when we switched
from ocamlopt to ocamlc.

> > 2. ocamlc makes a bytecode file which, when you add .exe
> > to the end can't exec ocamlrun .. even though it is in the PATH.
> > ocamlrun filename works fine.
> 
>   ocamlc -o a.exe a.ml
> 
> produces a prefectly runnable executable (just typing 'a.exe').

That worked for us too .. if, and only if, the current directory
contained ocamlrun.exe. I have no idea why, but there's no question
that 3.09 bytecode is NOT looking in the PATH, because

	ocamlrun filename

actually works (where filename is the bytecode file).

> > For transparency, the generated bytecode must use the same filename
> > (.exe must be added) and the bytecode must actually run.
>    ^^^^^^^^^^^^^^^^^^
> Isn't it your own choice when you use the -o flag?

If that were the case the native code compiler should
also not add .exe .. but it does (I think -- not on Windows 
at the moment).

> > It looks like the bytecode is binding the wrong ocamlrun location,
> 
> Maybe you have several ones installed??

There are two, the other one is in Cygwin though, so it 
shouldn't be involved. Besides 'ocamlrun' as the command
found in the PATH actually works.

BTW: we're only messing around with bytecode because either
Ocamlopt is broken by a stack overflow compiling a dypgen
generated grammar (ml file), or dypgen is broken by 
stack overflow when compiling generating it.

It all works on Linux, but fails
one way or the other on OSX (ppc), Cygwin, Windows native
port, mingw (Cywgin -mnocygwin), and I think OSC (x86).

The bytecode compilers generating bytecode seem to handle
it on those platforms we've actually managed to get
it running on.

It's possible some of the problems will go away after
Garrigue's quadratic reducing patch to polymorphic variants,
since the only real 'bigness' in the dypgen generated file is lots 
of polymorphic variants, and several functions per constructor ..
mostly chained together in a large 'let' binding.

Still, can't see why any of that would trash an 8Meg stack.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


      reply	other threads:[~2007-06-19  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19  5:50 skaller
2007-06-19  7:28 ` [Caml-list] " Christophe TROESTLER
2007-06-19  9:25   ` skaller [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=1182245126.32282.17.camel@rosella.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=Christophe.Troestler+ocaml@umh.ac.be \
    --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).