-
Notifications
You must be signed in to change notification settings - Fork 696
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
Configure packages on Windows no longer work with autoconf >= 2.70 #7494
Comments
Is there any workaround to help users until we fix it? using an older msys installation? downgrade autoconf? |
I suppose they can downgrade to They can also just set |
What tools set I'd avoid using |
imho So if you don't want to use it, then cabal must ensure it never passes a single non-posix path anywhere.. The problem with that is that any computed paths from the output of configure that end up in the sources of a Haskell program will be wrong. You can also avoid this specific error by passing it the build triples explicitly So imho, there's no solution without a singe fallout, and of everything at least |
Tried setting PATH_SEPARATOR in powershell,
but did not seem to work there... |
If you're referring to the error in commercialhaskell/stackage#6136
I think that's a different issue. In your case your Looking at your PATH it says you're using msys2 from 2015, which if that is the case you're using a beyond ancient msys2 which has a resource bug https://sourceware.org/legacy-ml/cygwin/2016-01/msg00098.html. Update your msys2. |
OK, let's do that. Any volunteers? What's the best way to set the env var? Globally, the sooner the better, at cabal-install startup? In the following wrapper only?
Or perhaps in any of the below as well?
|
I would say when making the call to |
Nobody volunteers, so let me take this. I assume, we are only interested in direct calls of literally a "configure" script and that we ignore the case inside https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Make.hs (I suspect nobody uses that and certainly not on Windows), which leaves us only with https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Simple.hs#L673 |
To be precise, it would be great to test the PR on Windows both with new autoconf and old autoconf (in case it breaks the old one). |
@jneira made a series of test with network and process, but setups vary, so last chance to contribute to this effort and perhaps find a breakage before PR is merged, if any of you would be so kind. |
I'll give it some tests this weekend (sorry mostly have time for non-work things in the weekend :)) , I'll also pull the branch into ghc and build the compiler with it. Thanks for doing this @Mikolaj! |
Set PATH_SEPARATOR=; when calling ./configure; fix #7494
@Mistuke: the PR is now on branch master (but not 3.6 yet). Thank you for the solution you suggested and do let me know if anything is missing. |
(cherry picked from commit 70f411d)
This reverts commit 70f411d. See haskell#7649.
…skell#7494"" This reverts commit 37ccc45.
Describe the bug
Ever since autoconf 2.70 all configure based packages are broken on Windows with
(This is why I hate configure based packages). This autoconf introduced a change
in how it finds auxilary tools/scripts [4].
This breaks packages like
network
andghc
itself [1][2].There's un upstream bug-report [3] but this is unlikely to be fixed.
A number of things go wrong here:
Cabal calls configure with Windows paths as arguments, e.g.:
But because the default PATH separator is
:
, so autoconf is interpeting this as:Both of which are incorrect.
cabal
should be passing a Unix path here asconfigure
is a unix tool. Passing a unix path won't entirely fix the issue however
because during the call a couple of ENV variables are passed to
configure
which containWindows paths such as:
So the easiest fix for both issues is that cabal sets the environment variable:
before the call to
sh
.To Reproduce
Steps to reproduce the behavior:
On a checked out version of
network
or any other configure based packageExpected behavior
For configure packages to work. We'll likely need a release of
cabal-install
for this.System information
cabal
, version 3.2.0.0Additional context
[1] https://gitlab.haskell.org/ghc/ghc/-/issues/19189
[2] haskell/network#502
[3] https://savannah.gnu.org/support/index.php?110448
[4] http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;f=NEWS;hb=97fbc5c184acc6fa591ad094eae86917f03459fa
The text was updated successfully, but these errors were encountered: