2011-04-26 05:16:50 -07:00
|
|
|
Release notes on the MS Windows ports of OCaml
|
|
|
|
----------------------------------------------
|
2001-02-06 07:24:00 -08:00
|
|
|
|
2011-04-26 05:16:50 -07:00
|
|
|
There are no less than four ports of OCaml for MS Windows available:
|
2002-07-22 01:19:50 -07:00
|
|
|
- a native Win32 port, built with the Microsoft development tools;
|
2011-12-12 03:38:06 -08:00
|
|
|
- a native Win32 port, built with the 32-bit version of the gcc
|
|
|
|
compiler from the mingw-w64 project, packaged in Cygwin
|
|
|
|
(under the name mingw64-i686);
|
2001-02-06 07:24:00 -08:00
|
|
|
- a port consisting of the Unix sources compiled under the Cygwin
|
2006-10-18 02:29:21 -07:00
|
|
|
Unix-like environment for Windows;
|
2010-01-22 04:48:24 -08:00
|
|
|
- a native Win64 port (64-bit Windows), built with the Microsoft
|
2006-10-18 02:29:21 -07:00
|
|
|
development tools.
|
2001-02-06 07:24:00 -08:00
|
|
|
|
2002-06-07 07:17:34 -07:00
|
|
|
Here is a summary of the main differences between these ports:
|
2001-02-06 07:24:00 -08:00
|
|
|
|
2002-07-22 01:19:50 -07:00
|
|
|
Native MS Native MinGW Cygwin
|
2006-10-18 02:29:21 -07:00
|
|
|
|
|
|
|
64 bits? Win32 or Win64 Win32 only Win32 only
|
|
|
|
|
2002-06-07 07:17:34 -07:00
|
|
|
Third-party software required
|
2002-07-22 01:19:50 -07:00
|
|
|
- for base bytecode system none none none
|
2003-09-29 02:42:07 -07:00
|
|
|
- for ocamlc -custom MSVC Cygwin Cygwin
|
|
|
|
- for native-code generation MSVC+MASM Cygwin Cygwin
|
2001-02-06 07:24:00 -08:00
|
|
|
|
2002-07-22 01:19:50 -07:00
|
|
|
Speed of bytecode interpreter 70% 100% 100%
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2008-07-29 01:31:41 -07:00
|
|
|
Replay debugger yes (**) yes (**) yes
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2002-07-22 01:19:50 -07:00
|
|
|
The Unix library partial partial full
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2003-09-29 02:42:07 -07:00
|
|
|
The Threads library yes yes yes
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2002-07-22 01:19:50 -07:00
|
|
|
The Graphics library yes yes no
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
Restrictions on generated executables? none none yes (*)
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
(*) Cygwin-generated .exe files refer to a DLL that is distributed under
|
|
|
|
the GPL. Thus, these .exe files can only be distributed under a license
|
2003-09-29 02:42:07 -07:00
|
|
|
that is compatible with the GPL. Executables generated by MSVC or by
|
2002-06-20 09:08:46 -07:00
|
|
|
MinGW have no such restrictions.
|
2001-02-06 07:24:00 -08:00
|
|
|
|
2011-07-20 02:17:07 -07:00
|
|
|
(**) The debugger is supported but the "replay" functions are not enabled.
|
2008-07-29 01:31:41 -07:00
|
|
|
Other functions are available (step, goto, run...).
|
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
The remainder of this document gives more information on each port.
|
2001-02-06 07:24:00 -08:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
The native Win32 port built with Microsoft Windows SDK
|
|
|
|
------------------------------------------------------
|
1996-02-25 10:00:26 -08:00
|
|
|
|
|
|
|
REQUIREMENTS:
|
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
This port runs under MS Windows 7 (32 and 64 bits), Vista, XP, and 2000.
|
1996-02-25 10:00:26 -08:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
|
|
|
|
runs without any additional tools.
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
The native-code compiler (ocamlopt) requires the Microsoft Windows SDK
|
|
|
|
(item [1]) and the flexdll tool (item [2]).
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2012-02-10 08:15:24 -08:00
|
|
|
Statically linking OCaml bytecode with C code (ocamlc -custom) also requires
|
2010-08-02 07:37:22 -07:00
|
|
|
items [1] and [2].
|
2010-04-19 08:36:16 -07:00
|
|
|
|
1996-02-25 10:00:26 -08:00
|
|
|
|
|
|
|
INSTALLATION:
|
|
|
|
|
1999-11-26 00:57:14 -08:00
|
|
|
The binary distribution is a self-installing executable archive.
|
|
|
|
Just run it and it should install OCaml automatically.
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2006-09-20 04:14:37 -07:00
|
|
|
THIRD-PARTY SOFTWARE:
|
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
[1] Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1.
|
|
|
|
Can be downloaded for free from
|
|
|
|
http://www.microsoft.com/downloads/en/default.aspx
|
|
|
|
under the name "Microsoft Windows 7 SDK".
|
2006-09-20 04:14:37 -07:00
|
|
|
|
2013-05-17 05:04:30 -07:00
|
|
|
[2] flexdll version 0.31 or later.
|
2008-03-26 10:54:10 -07:00
|
|
|
Can be downloaded from http://alain.frisch.fr/flexdll.html
|
|
|
|
|
1996-02-25 10:00:26 -08:00
|
|
|
RECOMPILATION FROM THE SOURCES:
|
|
|
|
|
|
|
|
The command-line tools can be recompiled from the Unix source
|
2010-08-02 07:37:22 -07:00
|
|
|
distribution (ocaml-X.YY.Z.tar.gz), which also contains the files modified
|
1996-02-25 10:00:26 -08:00
|
|
|
for Windows.
|
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
You will need the following software components to perform the recompilation:
|
2010-08-02 07:37:22 -07:00
|
|
|
- Windows NT, 2000, XP, Vista, or 7 (32 or 64 bits).
|
2013-09-09 02:32:00 -07:00
|
|
|
- Items [1] and [2] from the list of recommended software above.
|
2006-09-20 04:14:37 -07:00
|
|
|
- The Cygwin port of GNU tools, available from http://www.cygwin.com/
|
2012-02-03 08:03:43 -08:00
|
|
|
Install at least the following packages (and their dependencies):
|
2013-09-04 08:12:37 -07:00
|
|
|
diffutils, dos2unix, gcc-core, make, ncurses.
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
First, you need to set up your cygwin environment for using the MS
|
|
|
|
tools. The following assumes that you have installed [1], [2], and [3]
|
|
|
|
in their default directories. If this is not the case, you will need
|
|
|
|
to adjust the paths accordingly.
|
|
|
|
|
|
|
|
Open a Windows Command Prompt and enter the following command:
|
|
|
|
set PFPATH=C:\Program Files
|
|
|
|
If you are compiling on the 64-bit version of Windows 7, enter the
|
|
|
|
following instead:
|
|
|
|
set PFPATH=C:\Program Files (x86)
|
|
|
|
|
|
|
|
Then enter the following commands:
|
|
|
|
cd "%PFPATH%\Microsoft Visual Studio 9.0\VC\bin"
|
2012-02-03 08:03:43 -08:00
|
|
|
set FLEXDLLDIR=%PFPATH%\flexdll
|
2010-08-02 07:37:22 -07:00
|
|
|
vcvars32
|
|
|
|
echo VCPATH="`cygpath -p '%Path%'`" >C:\cygwin\tmp\msenv
|
|
|
|
echo LIBPATH="%LIBPATH%" >>C:\cygwin\tmp\msenv
|
2013-09-09 02:32:00 -07:00
|
|
|
echo INCLUDE="%INCLUDE%;%FLEXDLLDIR%" >>C:\cygwin\tmp\msenv
|
2012-02-03 08:03:43 -08:00
|
|
|
echo FLPATH="`cygpath '%FLEXDLLDIR%'`" >>C:\cygwin\tmp\msenv
|
|
|
|
echo PATH="$VCPATH:$FLPATH:$PATH" >>C:\cygwin\tmp\msenv
|
2010-08-02 07:37:22 -07:00
|
|
|
echo export PATH LIB LIBPATH INCLUDE >>C:\cygwin\tmp\msenv
|
|
|
|
echo export OCAMLBUILD_FIND=/usr/bin/find >>C:\cygwin\tmp\msenv
|
|
|
|
|
|
|
|
Open a Cygwin shell and enter the following commands:
|
|
|
|
tr -d '\r' </tmp/msenv >.msenv32
|
|
|
|
echo '. $HOME/.msenv32' >>.bashrc
|
|
|
|
|
|
|
|
Now, close the Command Prompt and the shell and you're set up for
|
|
|
|
using the MS tools under Cygwin.
|
|
|
|
|
|
|
|
|
|
|
|
To recompile OCaml, start a new Cygwin shell and change to the top-level
|
2002-06-07 07:17:34 -07:00
|
|
|
directory of the OCaml distribution. Then, do
|
|
|
|
|
2002-07-23 07:12:03 -07:00
|
|
|
cp config/m-nt.h config/m.h
|
|
|
|
cp config/s-nt.h config/s.h
|
|
|
|
cp config/Makefile.msvc config/Makefile
|
1999-10-19 09:37:30 -07:00
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
Then, edit config/Makefile as needed, following the comments in this file.
|
2013-09-09 02:32:00 -07:00
|
|
|
Normally, the only variable that need to be changed is
|
2002-07-23 07:12:03 -07:00
|
|
|
PREFIX where to install everything
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2007-02-07 02:31:36 -08:00
|
|
|
Finally, use "make -f Makefile.nt" to build the system, e.g.
|
2002-06-07 07:17:34 -07:00
|
|
|
|
|
|
|
make -f Makefile.nt world
|
|
|
|
make -f Makefile.nt bootstrap
|
|
|
|
make -f Makefile.nt opt
|
2006-09-20 04:14:37 -07:00
|
|
|
make -f Makefile.nt opt.opt
|
2002-06-07 07:17:34 -07:00
|
|
|
make -f Makefile.nt install
|
|
|
|
|
|
|
|
NOTES:
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
* The VC++ compiler does not implement "computed gotos", and therefore
|
2002-07-22 01:19:50 -07:00
|
|
|
generates inefficient code for byterun/interp.c. Consequently, the
|
|
|
|
performance of bytecode programs is about 2/3 of that obtained under
|
2002-06-07 07:17:34 -07:00
|
|
|
Unix/GCC or Cygwin or Mingw on similar hardware.
|
1996-10-25 06:38:55 -07:00
|
|
|
|
2001-12-03 02:13:26 -08:00
|
|
|
* Libraries available in this port: "num", "str", "threads", "graphics",
|
2013-09-09 02:32:00 -07:00
|
|
|
and large parts of "unix".
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2008-08-01 06:57:32 -07:00
|
|
|
* The replay debugger is partially supported (no reverse execution).
|
1996-02-25 10:00:26 -08:00
|
|
|
|
|
|
|
CREDITS:
|
|
|
|
|
2011-04-26 05:16:50 -07:00
|
|
|
The initial port of Caml Special Light (the ancestor of OCaml) to
|
|
|
|
Windows NT was done by Kevin Gallo at Microsoft Research, who kindly
|
2012-02-10 08:15:24 -08:00
|
|
|
contributed his changes to the OCaml project.
|
1996-02-25 10:00:26 -08:00
|
|
|
|
2002-06-07 07:17:34 -07:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
The native Win32 port built with Mingw
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
REQUIREMENTS:
|
|
|
|
|
2012-07-26 12:21:54 -07:00
|
|
|
This port runs under MS Windows Seven, Vista, XP, and 2000.
|
2002-06-07 07:17:34 -07:00
|
|
|
|
|
|
|
The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
|
|
|
|
runs without any additional tools.
|
|
|
|
|
|
|
|
The native-code compiler (ocamlopt), as well as static linking of
|
2012-02-10 08:15:24 -08:00
|
|
|
OCaml bytecode with C code (ocamlc -custom), require
|
2003-09-29 02:42:07 -07:00
|
|
|
the Cygwin development tools, available at
|
2006-09-20 04:14:37 -07:00
|
|
|
http://www.cygwin.com/
|
2008-03-26 10:54:10 -07:00
|
|
|
and the flexdll tool, available at
|
|
|
|
http://alain.frisch.fr/flexdll.html
|
2006-09-20 04:14:37 -07:00
|
|
|
You will need to install at least the following Cygwin packages (use
|
|
|
|
the Setup tool from Cygwin):
|
2005-10-13 05:58:20 -07:00
|
|
|
|
2011-12-12 03:38:06 -08:00
|
|
|
mingw64-i686-binutils
|
|
|
|
mingw64-i686-gcc
|
2012-07-26 12:21:54 -07:00
|
|
|
mingw64-i686-gcc-core
|
2011-12-12 03:38:06 -08:00
|
|
|
mingw64-i686-runtime
|
|
|
|
|
|
|
|
|
2012-07-26 12:21:54 -07:00
|
|
|
NOTES:
|
|
|
|
|
|
|
|
- Do not use the Cygwin version of flexdll for this port.
|
|
|
|
|
2011-12-12 03:38:06 -08:00
|
|
|
- There is another 32-bit gcc compiler, from the MinGW.org
|
|
|
|
project, packaged in Cygwin under the name mingw-gcc.
|
|
|
|
It is not currently supported by flexdll and OCaml.
|
|
|
|
|
|
|
|
- The standard gcc compiler shipped with Cygwin used to
|
|
|
|
support a "-mno-cygwin" option, which turned the compiler
|
|
|
|
into a mingw compiler. This option was used
|
|
|
|
by previous versions of flexdll and OCaml, but it is no
|
|
|
|
longer available in recent version, hence the switch
|
|
|
|
to another toolchain packaged in Cygwin.
|
|
|
|
|
|
|
|
- The standalone mingw toolchain from the MinGW-w64 project
|
|
|
|
(http://mingw-w64.sourceforge.net/) is not supported.
|
|
|
|
Please use the version packaged in Cygwin instead.
|
2002-06-07 07:17:34 -07:00
|
|
|
|
|
|
|
INSTALLATION:
|
|
|
|
|
2004-07-13 05:19:15 -07:00
|
|
|
The binary distribution is a self-installing executable archive.
|
|
|
|
Just run it and it should install OCaml automatically.
|
|
|
|
|
2002-06-07 07:17:34 -07:00
|
|
|
|
|
|
|
RECOMPILATION FROM THE SOURCES:
|
|
|
|
|
|
|
|
You will need the following software components to perform the recompilation:
|
2012-07-26 12:21:54 -07:00
|
|
|
- Windows NT, 2000, XP, Vista, or Seven.
|
|
|
|
- Cygwin: http://cygwin.com/
|
|
|
|
Install at least the following packages (and their dependencies, as
|
|
|
|
computed by Cygwin's setup.exe):
|
2011-12-12 03:38:06 -08:00
|
|
|
mingw64-i686-binutils
|
|
|
|
mingw64-i686-gcc
|
2012-07-26 12:21:54 -07:00
|
|
|
mingw64-i686-gcc-core
|
2011-12-12 03:38:06 -08:00
|
|
|
mingw64-i686-runtime
|
|
|
|
diffutils
|
|
|
|
make
|
|
|
|
ncurses
|
2012-07-26 12:21:54 -07:00
|
|
|
- The flexdll tool (see above). Do not forget to add the flexdll directory
|
|
|
|
to your PATH
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2011-12-12 03:38:06 -08:00
|
|
|
The standalone mingw toolchain from the MinGW-w64 project
|
|
|
|
(http://mingw-w64.sourceforge.net/) is not supported. Please use the
|
|
|
|
version packaged in Cygwin instead.
|
2004-02-14 09:03:35 -08:00
|
|
|
|
2012-07-26 12:21:54 -07:00
|
|
|
Start a new Cygwin shell and unpack the source distribution
|
2010-08-02 07:37:22 -07:00
|
|
|
(ocaml-X.YY.Z.tar.gz) with "tar xzf". Change to the top-level
|
2002-06-07 07:17:34 -07:00
|
|
|
directory of the OCaml distribution. Then, do
|
|
|
|
|
2002-07-23 07:12:03 -07:00
|
|
|
cp config/m-nt.h config/m.h
|
|
|
|
cp config/s-nt.h config/s.h
|
|
|
|
cp config/Makefile.mingw config/Makefile
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
Then, edit config/Makefile as needed, following the comments in this file.
|
2013-09-09 02:32:00 -07:00
|
|
|
Normally, the only variable that need to be changed is
|
2002-07-23 07:12:03 -07:00
|
|
|
PREFIX where to install everything
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2010-01-22 04:48:24 -08:00
|
|
|
Finally, use "make -f Makefile.nt" to build the system, e.g.
|
2002-06-07 07:17:34 -07:00
|
|
|
|
|
|
|
make -f Makefile.nt world
|
|
|
|
make -f Makefile.nt bootstrap
|
|
|
|
make -f Makefile.nt opt
|
|
|
|
make -f Makefile.nt opt.opt
|
2002-06-20 09:08:46 -07:00
|
|
|
make -f Makefile.nt install
|
2002-06-07 07:17:34 -07:00
|
|
|
|
|
|
|
|
|
|
|
NOTES:
|
|
|
|
|
|
|
|
* Libraries available in this port: "num", "str", "threads", "graphics",
|
2013-09-09 02:32:00 -07:00
|
|
|
and large parts of "unix".
|
2002-06-07 07:17:34 -07:00
|
|
|
|
2008-08-01 06:57:32 -07:00
|
|
|
* The replay debugger is partially supported (no reverse execution).
|
2002-06-20 09:08:46 -07:00
|
|
|
|
2014-08-22 06:45:02 -07:00
|
|
|
* The default Makefile.mingw passes -static-libgcc to the linker.
|
|
|
|
For more information on this topic:
|
|
|
|
|
|
|
|
http://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Link-Options.html#Link-Options
|
|
|
|
http://caml.inria.fr/mantis/view.php?id=6411
|
|
|
|
|
2002-06-20 09:08:46 -07:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2011-04-26 05:16:50 -07:00
|
|
|
The Cygwin port of OCaml
|
|
|
|
------------------------
|
2002-06-20 09:08:46 -07:00
|
|
|
|
|
|
|
REQUIREMENTS:
|
|
|
|
|
|
|
|
This port requires the Cygwin environment from Cygnus/RedHat, which
|
|
|
|
is freely available at:
|
2006-09-20 04:14:37 -07:00
|
|
|
http://www.cygwin.com/
|
2002-06-20 09:08:46 -07:00
|
|
|
|
2008-03-26 10:54:10 -07:00
|
|
|
It also requires the flexdll tool, available at:
|
|
|
|
http://alain.frisch.fr/flexdll.html
|
|
|
|
|
2002-07-26 04:30:57 -07:00
|
|
|
This port runs under all versions of MS Windows supported by Cygwin.
|
2002-06-20 09:08:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
INSTALLATION:
|
|
|
|
|
2006-09-20 04:14:37 -07:00
|
|
|
We do not distribute binaries for this port, but they can be found
|
|
|
|
in the Cygwin distribution (use the Setup tool from Cygwin and select
|
|
|
|
the OCaml packages). Alternatively, recompile from the source distribution.
|
2002-06-20 09:08:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
RECOMPILATION FROM THE SOURCES:
|
|
|
|
|
2012-07-26 12:21:54 -07:00
|
|
|
Before starting, make sure that the gcc version installed by cygwin
|
|
|
|
is not 4.5.3 (it has a bug that affects OCaml). If needed, use cygwin's
|
|
|
|
setup.exe to downgrade to 4.3.4.
|
|
|
|
|
|
|
|
You will need to recompile (and install) flexdll from source with
|
|
|
|
Cygwin's C compiler because the official binary version of flexdll
|
|
|
|
doesn't handle Cygwin's symbolic links and sometimes fails to
|
|
|
|
launch the C compiler.
|
|
|
|
|
|
|
|
In order to recompile flexdll, you first need to configure, compile,
|
|
|
|
and install OCaml without flexdll support (configure with options
|
2013-11-21 08:23:28 -08:00
|
|
|
-no-shared-libs), then modify the flexdll Makefile to change
|
2013-09-09 02:32:00 -07:00
|
|
|
line 51 from:
|
2012-07-26 12:21:54 -07:00
|
|
|
LINKFLAGS = -ccopt "-link version_res.o"
|
|
|
|
to:
|
|
|
|
LINKFLAGS = -cclib version_res.o
|
|
|
|
|
|
|
|
Then "make CHAINS=cygwin" and add the flexdll directory to your PATH.
|
|
|
|
Make sure to add it before "/usr/bin" or you will get cygwin's flexlink.
|
|
|
|
|
|
|
|
Then, in OCaml's source directory, type:
|
|
|
|
make clean
|
|
|
|
make distclean
|
|
|
|
and follow the instructions for Unix machines given in the file INSTALL.
|
2002-06-20 09:08:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
NOTES:
|
|
|
|
|
2012-07-26 12:21:54 -07:00
|
|
|
- There is a problem with cygwin's port of gcc version 4.5.3. You should
|
|
|
|
use cygwin's setup program to downgrade to 4.3.4 before compiling OCaml.
|
|
|
|
- The replay debugger is fully supported.
|
|
|
|
- When upgrading from 3.12.0 to 3.12.1, you will need to remove
|
|
|
|
/usr/local/bin/ocamlmktop.exe before typing "make install".
|
2013-09-09 02:32:00 -07:00
|
|
|
- In order to use the "graph" library, you will need to use Cygwin's
|
|
|
|
setup.exe to install the xinit, and libX11-devel packages before compiling
|
|
|
|
OCaml.
|
2002-06-20 09:08:46 -07:00
|
|
|
|
2006-10-18 02:29:21 -07:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
The native Win64 port built with Microsoft Windows SDK
|
|
|
|
------------------------------------------------------
|
2006-10-18 02:29:21 -07:00
|
|
|
|
|
|
|
REQUIREMENTS:
|
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
This port runs under MS Windows XP 64, Windows Server 64, and
|
|
|
|
Windows 7 64 on Intel64/AMD64 machines.
|
2006-10-18 02:29:21 -07:00
|
|
|
|
|
|
|
The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
|
|
|
|
runs without any additional tools.
|
|
|
|
|
2012-02-10 08:15:24 -08:00
|
|
|
Statically linking OCaml bytecode with C code (ocamlc -custom) requires the
|
2006-10-18 02:29:21 -07:00
|
|
|
Microsoft Platform SDK compiler (item [1] in the section
|
2008-03-26 10:54:10 -07:00
|
|
|
"third-party software" below) and the flexdll tool (item [2]).
|
2006-10-18 02:29:21 -07:00
|
|
|
|
|
|
|
The native-code compiler (ocamlopt) requires the Microsoft compiler
|
2008-03-26 10:54:10 -07:00
|
|
|
and the Microsoft assembler MASM64 (item [1]) and the flexdll tool (item [2]).
|
2006-10-18 02:29:21 -07:00
|
|
|
|
|
|
|
INSTALLATION:
|
|
|
|
|
|
|
|
There is no binary distribution yet. Please compile from sources as
|
|
|
|
described below.
|
|
|
|
|
|
|
|
|
|
|
|
THIRD-PARTY SOFTWARE:
|
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
[1] Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1.
|
|
|
|
Can be downloaded for free from
|
|
|
|
http://www.microsoft.com/downloads/en/default.aspx
|
|
|
|
under the name "Microsoft Windows 7 SDK".
|
2006-10-18 02:29:21 -07:00
|
|
|
|
2013-05-17 05:04:30 -07:00
|
|
|
[2] flexdll version 0.31 or later.
|
2008-03-26 10:54:10 -07:00
|
|
|
Can be downloaded from http://alain.frisch.fr/flexdll.html
|
|
|
|
|
|
|
|
|
2006-10-18 02:29:21 -07:00
|
|
|
RECOMPILATION FROM THE SOURCES:
|
|
|
|
|
|
|
|
The command-line tools can be recompiled from the Unix source
|
|
|
|
distribution (ocaml-X.YZ.tar.gz), which also contains the files modified
|
|
|
|
for Windows.
|
|
|
|
|
|
|
|
You will need the following software components to perform the recompilation:
|
2010-08-02 07:37:22 -07:00
|
|
|
- Windows XP 64, Windows Server 64, or Windows 7 64.
|
|
|
|
- Items [1] and [2] from the list of recommended software above.
|
2006-10-18 02:29:21 -07:00
|
|
|
- The Cygwin port of GNU tools, available from http://www.cygwin.com/
|
2008-08-01 06:57:32 -07:00
|
|
|
Install at least the following packages: diffutils, make, ncurses.
|
2006-10-18 02:29:21 -07:00
|
|
|
|
2010-08-02 07:37:22 -07:00
|
|
|
First, you need to set up your cygwin environment for using the MS
|
|
|
|
tools. The following assumes that you have installed [1] and [2]
|
|
|
|
in their default directories. If this is not the case, you will need
|
|
|
|
to adjust the paths accordingly.
|
|
|
|
|
|
|
|
Open a Windows Command Prompt and enter the following commands:
|
|
|
|
set PFPATH=C:\Program Files (x86)
|
|
|
|
cd "%PFPATH%\Microsoft Visual Studio 9.0\VC\bin"
|
|
|
|
vcvars64
|
|
|
|
echo VCPATH="`cygpath -p '%Path%'`" >C:\cygwin\tmp\msenv
|
|
|
|
echo LIBPATH="%LIBPATH%" >>C:\cygwin\tmp\msenv
|
|
|
|
echo FLPATH="`cygpath '%PFPATH%\flexdll'`" >>C:\cygwin\tmp\msenv
|
2013-09-04 08:12:37 -07:00
|
|
|
echo PATH="$VCPATH:$FLPATH:$PATH" >>C:\cygwin\tmp\msenv
|
2010-08-02 07:37:22 -07:00
|
|
|
echo export PATH LIB LIBPATH INCLUDE >>C:\cygwin\tmp\msenv
|
|
|
|
echo export OCAMLBUILD_FIND=/usr/bin/find >>C:\cygwin\tmp\msenv
|
|
|
|
|
|
|
|
Open a Cygwin shell and enter the following commands:
|
|
|
|
tr -d '\r' </tmp/msenv >.msenv64
|
|
|
|
echo '. $HOME/.msenv64' >>.bashrc
|
|
|
|
|
|
|
|
Now, close the Command Prompt and the shell and you're set up for
|
|
|
|
using the MS tools under Cygwin.
|
|
|
|
|
|
|
|
|
|
|
|
To recompile OCaml, start a new Cygwin shell and change to the top-level
|
2006-10-18 02:29:21 -07:00
|
|
|
directory of the OCaml distribution. Then, do
|
|
|
|
|
|
|
|
cp config/m-nt.h config/m.h
|
|
|
|
cp config/s-nt.h config/s.h
|
|
|
|
cp config/Makefile.msvc64 config/Makefile
|
|
|
|
|
|
|
|
Then, edit config/Makefile as needed, following the comments in this file.
|
|
|
|
Normally, the only variable that need to be changed is
|
|
|
|
PREFIX where to install everything
|
|
|
|
|
2010-01-22 04:48:24 -08:00
|
|
|
Finally, use "make -f Makefile.nt" to build the system, e.g.
|
2006-10-18 02:29:21 -07:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
NOTES:
|
|
|
|
|
|
|
|
* Libraries available in this port: "num", "str", "threads", "graphics",
|
2010-01-22 04:48:24 -08:00
|
|
|
and large parts of "unix".
|
2006-10-18 02:29:21 -07:00
|
|
|
|
2008-08-01 06:57:32 -07:00
|
|
|
* The replay debugger is partially supported (no reverse execution).
|
2006-10-18 02:29:21 -07:00
|
|
|
|
2008-08-01 06:57:32 -07:00
|
|
|
* The graphical browser ocamlbrowser is not supported.
|