Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4778: autorun autoreconf on Windows too #4781

Merged

Conversation

mpilgrem
Copy link
Member

@mpilgrem mpilgrem commented Apr 28, 2019

In module Stack.Setup, pacman is used to add the perl and autoconf packages to stack's MSYS2.

In module Stack.Build.Execute, the code uses command sh autoreconf -i for Windows, instead of just autoreconf -i.

The implementation involves two hacks:

  1. pacman and sh autoreconf -i seem to clear and not restore ANSI capability on native Windows terminals. A hack restores the ANSI capability (using the same hack that was once used for git clone - fix Fix #3992 Windows 10: Work around upstream git clone issue #4121).
  2. MSYS2's current perl package (5.28.1-2) is broken. So the perl installed by stack is downgraded to 5.28.0-1, which works. This will need to be revisited once perl is fixed on MSYS2.

This has been tested on Windows 10 (only) by deleting stack's MSYS2 (so that stack reinstalls it) and by then building the process package (which makes use of configure) using stack.

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md None, I think.
  • The documentation has been updated, if necessary. Not necessary, I think.

Please also shortly describe how you tested your change. Bonus points for added tests!

src/Stack/Setup.hs Outdated Show resolved Hide resolved
@mpilgrem mpilgrem force-pushed the 4778-autoreconf-windows branch 2 times, most recently from a405be6 to 5c4194a Compare April 29, 2019 23:17
src/Stack/Build/Execute.hs Outdated Show resolved Hide resolved
In module `Stack.Build.Execute`, the code uses command `sh autoreconf -i` for Windows, instead of just `autoreconf -i`. A comprehensive help message is added if `sh autoreconf -i` throws an exception on Windows.

The implementation involves a hack: `sh autoreconf -i` seems to clear and not restore ANSI capability on native Windows terminals. A hack restores the ANSI capability (using the same hack that was once used for `git clone` - fix commercialhaskell#4121).

This has been tested on Windows 10 (only) by deleting stack's MSYS2 (so that stack reinstalls it) and by then building the `process` package (which makes use of `configure`) using stack.
@mpilgrem mpilgrem force-pushed the 4778-autoreconf-windows branch from 5c4194a to 873b65d Compare May 3, 2019 21:40
Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snoyberg snoyberg merged commit e8fa66f into commercialhaskell:master May 4, 2019
@mpilgrem mpilgrem deleted the 4778-autoreconf-windows branch May 4, 2019 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants