Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Installer do not add 'msys\usr\bin' directory into PATH #268

Open
djlim7 opened this issue Feb 15, 2017 · 5 comments
Open

Installer do not add 'msys\usr\bin' directory into PATH #268

djlim7 opened this issue Feb 15, 2017 · 5 comments
Labels

Comments

@djlim7
Copy link

djlim7 commented Feb 15, 2017

By default, installer program adds some PATH environment variables, but MSYS binary folder's path is not included.

C:\Program Files\Haskell Platform\8.0.2\msys\usr\bin\

Some extensions (like ghc-mod) use MSYS to build. But because of PATH setting, installation fails. Please add the route into project.

@randen randen added the Windows label Feb 15, 2017
@randen
Copy link
Contributor

randen commented Feb 15, 2017

The HP does not include the MSYS folder's path by default since the odds are very high it would cause user problems at some later point (see below for details). So, we leave the step of including it in the PATH up to the user . I believe the release notes (https://www.haskell.org/platform/#windows) mentions a way to do this that doesn't affect the PATH directly.

The problem with simply adding the MSYS2 folder's path is that MSYS2 contains some executables with the exact same names as ones provided by Windows (e.g., dir, find, echo).

Including the directory to these Unix-like tools on the Windows PATH will cause problems, regardless of whether appended or prepended. If put early in the PATH, the Unix-tools will mask the Windows equivalents, and if placed later in the PATH, the opposite will happen. Some have called this type of problem: "PATH pollution."

The former failure (Windows-specific executables masked) will confuse the end user, and likely at a very different time from when the PATH was modified (e.g., weeks after installing the unix-like tools, the user cannot figure out why some other tool or batch file fails on the "echo" command). The latter failure will cause the build of configure-style packages, which we are trying to address here, to fail.

@gbaz
Copy link
Contributor

gbaz commented Feb 15, 2017

Agreed. We could update the website to include extra information that lets users know of the option, I suppose...

@djlim7
Copy link
Author

djlim7 commented Feb 18, 2017

I know what happens if installer automatically does, but the installer supports option to avoid all the PATHs. And installer adds PATHs of other Unix-like tools (installed with Haskell Platform), like gcc and g++. I opened this issue because MSYS was exceptional.

I think this problem can be solved by specifying installer's option.

@djlim7
Copy link
Author

djlim7 commented Jun 29, 2017

Please see #279 also.

@Mistuke
Copy link

Mistuke commented Dec 25, 2017

The gcc and g++ provided by GHC aren't msys2 (a.k.a newlib based) application. They're native ported applications so they're a lot safer to export.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants