Windows

Phyx lonetiger at gmail.com
Mon Mar 26 10:25:23 UTC 2018


On Mon, Mar 26, 2018 at 11:08 AM, Simon Peyton Jones via ghc-devs <
ghc-devs at haskell.org> wrote:

> One other thing. The instructions at
>
> https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows
>
> say to set PATH thus
>
>
>
> export PATH=/mingw64/bin:\$PATH
>
>
>
> But
>
>    - in the installation tree I got from msys, *there IS no
>    c:/mingw64/bin*.
>    - I have a root directory c:/msys64.
>
>
These are correct, the instructions are written from the point of view of a
msys2 environment and not the Windows one.
So /mingw64 refers to an msys2 path not a windows path. In windows the /
would indeed be interpreted to %HOMEDRIVE%/mingw64
but in msys2 this refers to what the msy2 filesystem has been mounted to.
This is usually C:\msys64.

Tamar at Yelow ~/ghc2> cygpath -w /mingw64/bin/
E:\msys64\mingw64\bin\

the msys2 tool cygpath converts between the two usually on demand. but you
can query it for paths.
What the instructions intended was for you to modify your msys2
environment, not your Windows one, as generally putting
Cygwin derived programs on your global windows path is not advisable.


>
>    -
>    - Most binaries (eg *bash*, *find*) seem to be in c:/mingw64/usr/bin
>
> Yes, any binary that is a posix port, e.g. depends on newlib crt instead
of the Microsoft runtime goes into the usual /usr/bin folder. This would
include core-utils,
make etc.


>
>    -
>    - But there is also c:/msys64/mingw64/bin, which (perhaps as a result
>    of the pacman step) has lots more stuf like *ar*, *cc*, etc.
>
> This folder is meant to contain native ports, e.g. programs that have been
"ported" to work on Windows using a standard windows runtime. These have no
dependencies on
newlib/Cygwin. This is the distinctions between these two folders.


>    -
>
>
>
> All very confusing.  For now I have put both c:/msys64/usr/bin and
> c:/msys64/mingw64/bin in my path.   That seems to work, but is clearly not
> what the instructions say.
>

The instruction could be somewhat clearer here, but they are intended to
only affect your msys2 installation, and never your global Windows system.


>
>
> Thanks
>
>
>
> Simon
>
>
>
> *From:* ghc-devs <ghc-devs-bounces at haskell.org> *On Behalf Of *Shao, Cheng
> *Sent:* 26 March 2018 10:59
> *To:* ghc-devs at haskell.org
> *Subject:* Re: Windows
>
>
>
> Hi Simon,
>
>
>
> If the build environment is managed by an MSYS2 installation, then the
> MinGW64 shell startup script automatically sets up "MSYSTEM" for you. It
> can be launched like "C:\msys64\msys2_shell.cmd -mingw64 -mintty".
>
>
>
> On Mon, Mar 26, 2018 at 5:46 PM, Simon Peyton Jones via ghc-devs <
> ghc-devs at haskell.org> wrote:
>
> Making it part of the error message would be v helpful.
>
> I have added a section to "Troubleshooting" on
> https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows
>
> But it should really be part of the instructions higher up to sa
>         export MSYSTEM=MINGW64
>
> Might someone do that?  I wasn't quite sure where
>
> Simon
>
>
> |  -----Original Message-----
> |  From: ghc-devs <ghc-devs-bounces at haskell.org> On Behalf Of Ben Gamari
> |  Sent: 24 March 2018 16:42
> |  To: Gabor Greif <ggreif at gmail.com>; lonetiger at gmail.com
> |  Cc: ghc-devs at haskell.org
> |  Subject: Re: Windows
> |
> |  Gabor Greif <ggreif at gmail.com> writes:
> |
> |  > Just an idea...
> |  >
> |  > could this hint be part of the `configure` error message?
> |  >
> |  Indeed. See D4526.
> |
> |  Cheers,
> |
> |  - Ben
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180326/5239af62/attachment.html>


More information about the ghc-devs mailing list