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

Peter Wang novalazy at gmail.com
Tue Aug 25 16:10:54 AEST 2015


On Tue, 25 Aug 2015 15:32:47 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> 
> Hi Peter,
> 
> On Tue, 25 Aug 2015, Peter Wang wrote:
> 
> > If anyone would care to try to reproduce the build on i686 or x86_64,
> > that would be great.
> 
> I'll have a go at reproducing it later this week.
> 
> > ---
> >
> > 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.
> 
> I wonder whether we shouldn't split this into README.MSYS and
> README.MSYS2 and just leave pointers to each from README.MinGW.

That might help.  All I wanted to know is this:

    download the MSYS2 installer
    run pacman -S mingw-w64-x86_64-gcc
    unpack mercury tarball
    ./configure --prefix=c:/mercury --host=x86_64-w64-mingw32  # important!
    make && make install

> In any case, you should also update README.MS-Windows so that it
> mentions MSYS2 as a possible build environment.

Ok.

> > @@ -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>).
> 
> You can still build a 64-bit version under the original MSYS shell, so
> long as you have the MinGW-64 compiler.  I suggest you replace the last
> paragraph you deleted there with:
> 
>      To build a verison of the Mercury compiler that generates 64-bit
>      exeutables using the MSYS shell, you will need to install the
>      MinGW-w64 version of GCC (available from <http://mingw-w64.org>) and
>      ensure that it occurs in your PATH before the MinGW GCC.

Ok.

> >     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.
> 
> IIRC, one of the problems is that if you don't do that when using MSYS2
> configure decides that the host type is 'x86_64-pc-msys'.  I think it be
> worth mentioning that.

Yeah, something like that.

Peter



More information about the reviews mailing list