From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 754BC7ED9B for ; Mon, 19 May 2014 11:22:45 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jonathan.protzenko@gmail.com) identity=pra; client-ip=74.125.82.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jonathan.protzenko@gmail.com"; x-sender="jonathan.protzenko@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jonathan.protzenko@gmail.com designates 74.125.82.170 as permitted sender) identity=mailfrom; client-ip=74.125.82.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jonathan.protzenko@gmail.com"; x-sender="jonathan.protzenko@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f170.google.com) identity=helo; client-ip=74.125.82.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jonathan.protzenko@gmail.com"; x-sender="postmaster@mail-we0-f170.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQBAAHNeVNKfVKqlGdsb2JhbABZFoJPcoNBwR4BgQ8WDgEBAQEHCwsJEiqCHgcBAQUjHQEbHAIDDAYFCw0CAgUWCwICCQMCAQIBEREBBQEOAQ0TCAEBhUWCYwEDEQEECKERjBGBRYMNmEUKGScNZIVLEQEFDIEejS0Wgl+BSwEDmVqBPY9sQYRp X-IPAS-Result: AiQBAAHNeVNKfVKqlGdsb2JhbABZFoJPcoNBwR4BgQ8WDgEBAQEHCwsJEiqCHgcBAQUjHQEbHAIDDAYFCw0CAgUWCwICCQMCAQIBEREBBQEOAQ0TCAEBhUWCYwEDEQEECKERjBGBRYMNmEUKGScNZIVLEQEFDIEejS0Wgl+BSwEDmVqBPY9sQYRp X-IronPort-AV: E=Sophos;i="4.98,866,1392159600"; d="scan'208";a="62552009" Received: from mail-we0-f170.google.com ([74.125.82.170]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 May 2014 11:22:30 +0200 Received: by mail-we0-f170.google.com with SMTP id u57so5268444wes.29 for ; Mon, 19 May 2014 02:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=p1CInC+2SrsEWasm3T4/avF4ceGwwBxQbQ/WblzT4oQ=; b=hJHPvxZaeWjGeYBnFNYzT8Zv3MY2LlqF+0bSWSDIN2/YD2Ej3UI+E9APy6vqA/Ui3G 1UPm6TpAFG8xiA/50s6Z8jIw7GmJmjWkS882JeIrCCEwoT9PgRJRK7kToID+8wd1zVKd ZoXEebzZo2yZHc2jSAf9N9PC0WplIxxI0V5zQTrd4j2fglZtx8nZDn1U72DyVi9hAo3R 3n6x17ychDivmeN8enofllEQ8a5t64W5t4TYJYQsuJwuFdPg9MzHEfgFoIzpBRAfN2H6 GkR/ewWDe4PQRVwrG0TtolRVn0hdDIPGiOyTzFH2WKh06OdOGHkGe5NY8FORkTqquTIy eoyA== X-Received: by 10.194.88.106 with SMTP id bf10mr28842807wjb.26.1400491350198; Mon, 19 May 2014 02:22:30 -0700 (PDT) Received: from ?IPv6:2001:660:3013:3:f6ce:46ff:fe2d:a9ae? ([2001:660:3013:3:f6ce:46ff:fe2d:a9ae]) by mx.google.com with ESMTPSA id hr4sm13377894wjb.28.2014.05.19.02.22.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 May 2014 02:22:29 -0700 (PDT) Message-ID: <5379CD53.6070202@gmail.com> Date: Mon, 19 May 2014 11:22:27 +0200 From: Jonathan Protzenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Thunderbird/32.0a1 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Self contained Windows executable? Shameless plug: there's a blog post at gagallium's which recaps the various versions of OCaml on windows . tl;dr : - the "ocaml" package from the cygwin distribution is a cygwin program which generates cygwin executables -- these depend on cygwin1.dll to run - the installer from http://protz.github.com/ocaml-installer/ is a native windows program, which generates native windows program -- these do not need anything specific to execute. The second option does also require cygwin, however, as most of the ecosystem (e.g. ocamlbuild) assumes a unix-like environment. Cheers, ~ jonathan On Mon 19 May 2014 11:10:48 AM CEST, David Allsopp wrote: > 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 >