From: David Allsopp <dra-news@metastack.com>
To: "OCaml List (caml-list@yquem.inria.fr)" <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Self contained Windows executable?
Date: Mon, 19 May 2014 09:10:48 +0000 [thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9E8EF031D@Remus.metastack.local> (raw)
In-Reply-To: <CAOEA5rZWJ+HfwkCGnLPbwwz7GVHZ6R7_ioZfyabFyNOuNnPhrg@mail.gmail.com>
Andre Tampubolon wrote:
> Hi David,
> I think I built ocaml correctly using MinGW, as stated in README.win32
> cp config/m-nt.h config/m.h
> cp config/s-nt.h config/s.h
> cp config/Makefile.msvc config/Makefile
> Followed by:
> make -f Makefile.nt world
> make -f Makefile.nt bootstrap
> make -f Makefile.nt opt
> make -f Makefile.nt opt.opt
> make -f Makefile.nt install
Yes, that is the correct procedure!
> If ocamlopt is invoked outside Cygwin Bash Shell, it will give this error:
> C:\Users\CSL-NB-064\Codes\OCaml>ocamlopt cholesky.ml -o cholesky.exe
> 'i686-w64-mingw32-as' is not recognized as an internal or external command,
> operable program or batch file.
> File "cholesky.ml", line 1:
> Error: Assembler error, input left in file C:\Users\CSL-NB~1\AppData\Local\Temp\camlasmfac3bb.s
If running from cmd, you need to put Cygwin's bin dir into your PATH (you can do this by symlinking the required executables from your OCaml installation's bin directory, but it's non-trivial - I can give you the details if you're really interested)
> Of course ocamlopt works fine in Cygwin. The executables compiled with it need Cygwin DLLs , though.
"Of course" doesn't make sense here! If you do have a Cygwin installation of OCaml knocking around, that will certainly confuse things. Ways to tell:
On my system:
$ which ocaml
/cygdrive/c/Dev/OCaml/bin/ocaml
(i.e. the path should be where you've installed MinGW OCaml and not /usr/bin/ocaml of something similar)
$ ocamlopt -config | fgrep native_c
native_c_compiler: i686-w64-mingw32-gcc -O -mms-bitfields -Wall -Wno-unused
native_c_libraries: -lws2_32
(i.e. the compiler should be i686-w64-mingw32-gcc rather than plain gcc which is what the Cygwin port uses)
Neither the executables produced by ocamlopt, nor the OCaml tools themselves (ocamlc.exe, ocamlopt.exe, etc.) should depend on Cygwin DLLs for either the MinGW or MSVC ports.
David
next prev parent reply other threads:[~2014-05-19 9:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 7:42 Andre Tampubolon
2014-05-19 7:55 ` David Allsopp
2014-05-19 7:56 ` Adrien Nader
[not found] ` <E51C5B015DBD1348A1D85763337FB6D9E8EEFDA5@Remus.metastack.local>
[not found] ` <CAOEA5rZWJ+HfwkCGnLPbwwz7GVHZ6R7_ioZfyabFyNOuNnPhrg@mail.gmail.com>
2014-05-19 9:10 ` David Allsopp [this message]
2014-05-19 9:22 ` Jonathan Protzenko
2014-05-19 9:28 ` Adrien Nader
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=E51C5B015DBD1348A1D85763337FB6D9E8EF031D@Remus.metastack.local \
--to=dra-news@metastack.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