[m-rev.] for review: Update README.MinGW regarding MSYS2 and x86_64.

Peter Wang novalazy at gmail.com
Tue Aug 25 14:40:23 AEST 2015


If anyone would care to try to reproduce the build on i686 or x86_64,
that would be great.
---

README.MinGW:
	Use "MinGW-w64" spelling for the project.

	Link to MSYS2 installer and describe how to install gcc in it.

	Make the required configure option for x86_64 more prominent.

	Move optional Java/C#/Erlang steps.
---
 README.MinGW | 68 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/README.MinGW b/README.MinGW
index 2d194f9..e524076 100644
--- a/README.MinGW
+++ b/README.MinGW
@@ -24,16 +24,14 @@ to use Mercury once it is installed.
 
 -----------------------------------------------------------------------------
 
-BUILDING A MINGW OR MINGW64 COMPILER UNDER MSYS
+BUILDING A MINGW OR MINGW-W64 COMPILER UNDER MSYS
 
 To build the source distribution under MSYS follow these steps:
 
-1.  Download and install MinGW and MSYS
-    (available from <http://www.mingw.org>).
+1a. Download and install MinGW and MSYS from <http://www.mingw.org>
 
-    The simplest installation method for MinGW and MSYS is to download and
-    run the MinGW GUI installer.  In order to build and install Mercury you
-    will require at least the following components:
+    In order to build and install Mercury you will require at least the
+    following components:
 
     - MinGW Compiler Suite (C compiler)
     - MSYS Basic System
@@ -42,63 +40,65 @@ To build the source distribution under MSYS follow these steps:
     Details of alternative MinGW and MSYS installation methods may be found
     on the MinGW website.
 
-    To build a version of Mercury that generates 64-bit executables you will
-    require the MinGW64 version of GCC (available from
-    <http://mingw-w64.sourceforge.net>).
+1b. Alternatively, download and install MSYS2 from <https://msys2.github.io>
 
-    To build the Erlang grade with MinGW and MSYS you will require the Windows
-    version of the Erlang/OTP distribution to be installed on your system.
-    The Erlang compiler (erlc) and runtime (erl) needs to be in the MSYS
-    PATH, for example do the following in the MSYS shell (with the version
-    number modified if necessary):
+    You can use the MinGW-w64 version of GCC to build a copy of Mercury that
+    generates 32-bit or 64-bit executables.  In the MSYS2 shell run either of:
 
-        export PATH=/c/Program\ Files/erl5.8.2/bin/:$PATH
+        pacman -S mingw-w64-i686-gcc
 
-    See README.Erlang for further details.
+        pacman -S mingw-w64-x86_64-gcc
 
-    To build the java grade with MinGW and MSYS you will require the Windows
-    version of the JDK to be installed on your system.
+2.  Optional: To build the java grade with MinGW and MSYS you will require
+    the Windows version of the JDK to be installed on your system.
     The Java compiler (javac), Java archive tool (jar), and Java runtime (java)
-    needs to be in the MSYS PATH, for example do the following in the MSYS
-    shell (with the version number modified if necessary):
+    needs to be in the MSYS PATH, for example do the following in the shell:
 
         export PATH=/c/Program\ Files/Java/jdk1.6.0_23/bin/:$PATH 
 
     See README.Java for further details.
 
-    To build the C# grade with MinGW, MSYS and .NET, you will need Visual C#
-    compiler installed on your system.
+    Optional: To build the C# grade with MinGW, MSYS and .NET, you will need
+    Visual C# compiler installed on your system.
     The C# compiler (csc.exe) needs to be in the MSYS PATH, for example do the
-    following in the MSYS shell (with the version number modified if
-    necessary):
+    following in the shell:
 
         export PATH=/c/WINDOWS/Microsoft.NET/Framework/v4.0.30319/:$PATH
     
     See README.CSharp for further details.
 
-2.  Unpack the source distribution with a command like:
+    Optional: To build the Erlang grade with MinGW and MSYS you will require
+    the Windows version of the Erlang/OTP distribution to be installed on
+    your system.  The Erlang compiler (erlc) and runtime (erl) needs to be in
+    the MSYS PATH, for example do the following in the shell:
+
+        export PATH=/c/Program\ Files/erl5.8.2/bin/:$PATH
+
+    See README.Erlang for further details.
+
+3.  Unpack the source distribution with a command like:
     
         tar -xvzf mercury-compiler-<VERSION>.tar.gz
 
-3.  cd into the new directory and run configure:
+4.  cd into the new directory and run configure:
 
         ./configure --prefix=c:/mercury
 
+    or
+
+        ./configure --prefix=c:/mercury --host=x86_64-w64-mingw32
+
     It is important to specify the installation prefix as a full windows
     path with a drive letter (except use `/' instead of `\').  
     Do not use a path like `/mercury', because that
     will be interpreted differently by the MSYS shell than by the generated
     executables, resulting in a broken installation.  
 
-    If you are building a Mercury compiler that targets MinGW64 then you
-    must also invoke configure with the following option:
-
-       --host=x86_64-w64-mingw32
-
-    This will cause mmake to use the MinGW64 tool chain.  Ensure that the
-    MinGW64 tools are in your PATH before running configure.
+    If you are building a Mercury compiler that targets MinGW-w64 x86-64 then
+    you must also invoke configure with the --host option above, otherwise it
+    will fail to build boehm_gc or libatomic_ops.
 
-4.  run: `make' and then `make install'.
+5.  run: `make' and then `make install'.
 
 Add /c/mercury/bin (or whatever path you installed Mercury to) to the MSYS
 PATH (you cannot add `c:/mercury/bin' to the MSYS PATH because `:' is used to
-- 
2.1.2




More information about the reviews mailing list