-
Notifications
You must be signed in to change notification settings - Fork 841
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
On Windows: Automatically run autoreconf -i when needed #4778
Comments
mpilgrem
added a commit
to mpilgrem/stack
that referenced
this issue
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 commercialhaskell#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.
mpilgrem
added a commit
to mpilgrem/stack
that referenced
this issue
Apr 29, 2019
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
added a commit
to mpilgrem/stack
that referenced
this issue
Apr 29, 2019
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.
snoyberg
added a commit
that referenced
this issue
May 4, 2019
Fix #4778: autorun `autoreconf` on Windows too
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this is a stack feature request (and not a bug). It may be a bug if #3598 was intended to work on Windows as it does on Unix-like operating systems.
In a clean clone of the
process
library from GitHub, on Windows 10 withstack --version
Version 2.0.0, Git revision dfbf85ad7e8af5b01cf7b51367290870ffc2c90e (7456 commits) x86_64 hpack-0.31.1
,stack build
fails with (extracts):Following up, I discovered #3598. I think that feature does not work on Windows because
autoreconf
is a shell script file, not an executable (I get the same error message even if theautoreconf
file is on the path).My feature request is to make #3598 work for Windows users of stack. That is, automatically run the
autoreconf -i
script when needed. That would require the stack MSYS2 to come withautoconf
andperl
(see below).I could build
process
on Windows using stack if I did the following:autoconf
andperl
to stack's MSYS2, usingstack exec pacman -- -S
. stack's version of MSYS2 does not come with them as standard.stack exec sh -- autoreconf -i
.stack build
.The text was updated successfully, but these errors were encountered: