Skip to content

Set PATH_SEPARATOR=; when calling ./configure; fix #7494 - #7510

Merged
Mikolaj merged 3 commits into
haskell:masterfrom
Mikolaj:master
Aug 7, 2021
Merged

Mikolaj merged 3 commits into
haskell:masterfrom
Mikolaj:master

Conversation

@Mikolaj

@Mikolaj Mikolaj commented Aug 5, 2021 •

Copy link
Copy Markdown
Member

No tests, because they depend on a particular version of autoconf and I think the current tests of autoconf would already fail with the new autoconf version on Windows CI (but either they are not run on Windows or autoconf on CI is old; they are run on Linux, because setting PATH_SEPARATOR breaks these tests and @jneira kindly reproduced the fail on Windows locally).

Edit: what I missed here and what led to regression in cabal 3.6 is that packages can carry their own generated autoconf files, from versions we have no control of (e.g., which did not run with "PATH_SEPARATOR=;" nor did predict such usage, but now we are using them with "PATH_SEPARATOR=;"). And I bet the story is even more complex.


Please include the following checklist in your PR:

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

@jneira

jneira commented Aug 5, 2021

Copy link
Copy Markdown
Member

so we should test it locally I suppose, will do asap

@Mikolaj

Mikolaj commented Aug 5, 2021

Copy link
Copy Markdown
Member Author

@jneira: thank you. Please try with the second commit to make sure my CPP works fine.

@jneira

jneira commented Aug 5, 2021

Copy link
Copy Markdown
Member

nice, I already reproduced the error in my windows 10 just in case.
do we know what other important packages other than network uses configure?

@Mikolaj

Mikolaj commented Aug 5, 2021

Copy link
Copy Markdown
Member Author

Perhaps old-time? Just guessing. No other mentions in the issue.

@phadej

phadej commented Aug 5, 2021 •

Copy link
Copy Markdown
Collaborator

Also time and `, if you reinstall them, i.e. don't use the versions bundled with GHC.

https://hackage-search.serokell.io/?q=build-type%3A.*Configure

Comment thread changelog.d/pr-7510 Outdated

description: {

- Set PATH_SEPARATOR=";" for ./configure on Windows; fix for new autoconf

@fgaz fgaz Aug 5, 2021 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- Set PATH_SEPARATOR=";" for ./configure on Windows; fix for new autoconf
- Set PATH_SEPARATOR=";" for ./configure on Windows; fix for autoconf >= 2.70

(it can also just go all in the synopsis with no extended description)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Heh, the details didn't fit in 80 lines, despite condensing wrt synposis. Let me go full hog in synopsis, after your encouragement.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, there's no hard limit on synopsis. It's just converted into changelog bullet points (or sub-points for description) after all

@jneira

jneira commented Aug 5, 2021

Copy link
Copy Markdown
Member

@jneira

jneira commented Aug 5, 2021 •

Copy link
Copy Markdown
Member
  • It works in my windows 10 with network:
atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ cabal --version
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library

atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ cabal build
Resolving dependencies...
Build profile: -w ghc-8.10.5 -O1
In order, the following will be built (use -v for more details):
 - network-3.1.2.2 (lib:network) (first run)
Configuring network-3.1.2.2...
configure: WARNING: unrecognized options: --with-compiler
configure: loading site script D:/ghcup/msys64/etc/config.site
configure: error: cannot find required auxiliary files: config.guess config.sub

atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ /d/bin/cabal.exe --version
cabal-install version 3.5
compiled using version 3.5.0.0 of the Cabal library

atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ /d/bin/cabal.exe build
Resolving dependencies...
Build profile: -w ghc-8.10.5 -O1
In order, the following will be built (use -v for more details):
 - network-3.1.2.2 (lib:network) (first run)
Configuring network-3.1.2.2...
configure: WARNING: unrecognized options: --with-compiler
configure: loading site script D:/ghcup/msys64/etc/config.site
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for gcc... D:\ghcup\ghc\8.10.5\lib\../mingw/bin\gcc.exe
....

I will try another pair of projects

@jneira

jneira commented Aug 6, 2021

Copy link
Copy Markdown
Member

I've tried with process and both versions of cabal works as intended. I think the cause is for process there are no config.guess and config.sub files.

@Mikolaj

Mikolaj commented Aug 6, 2021

Copy link
Copy Markdown
Member Author

@jneira: thank you so much. Would you and @fgaz review so that I can merge?

@fgaz

fgaz commented Aug 6, 2021

Copy link
Copy Markdown
Member

What about the TODO?

@Mikolaj

Mikolaj commented Aug 6, 2021

Copy link
Copy Markdown
Member Author

@fgaz: this TODO is a style thing, and I still don't quite feel the style of this codebase, so I'd need a guidance. What would be your recommendation? Keep the sole CPP (ATM it doesn't look like it could grow or multiply) or create a value in a Compat module and, if so, in which one?

@jneira

jneira commented Aug 6, 2021

Copy link
Copy Markdown
Member

I did not test it with an older autoconf version, I have to downgrade it manually to do it

@jneira

jneira commented Aug 6, 2021 •

Copy link
Copy Markdown
Member

I did not test it with an older autoconf version, I have to downgrade it manually to do it

atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ autoreconf --version
autoreconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ autoreconf -i

atrey@FNTSY MINGW64 /d/dev/ws/haskell/issues/network
$ /d/bin/cabal.exe build
Resolving dependencies...
Build profile: -w ghc-8.10.5 -O1
In order, the following will be built (use -v for more details):
 - network-3.1.2.2 (lib:network) (first run)
Configuring network-3.1.2.2...
configure: WARNING: unrecognized options: --with-compiler
configure: loading site script D:/ghcup/msys64/etc/config.site
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for gcc... D:\ghcup\ghc\8.10.5\lib\../mingw/bin\gcc.exe
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
....
[28 of 28] Compiling Network.Socket.ByteString.Lazy ( Network\Socket\ByteString\Lazy.hs, D:\dev\ws\haskell\issues\network\dist-newstyle\build\x86_64-windows\ghc-8.10.5\network-3.1.2.2\build\Network\Socket\ByteString\Lazy.o )

The build ends with some warnings in all cases so i guess they are fine

@jneira

jneira commented Aug 6, 2021

Copy link
Copy Markdown
Member

I've tried with process and both versions of cabal works as intended. I think the cause is for process there are no config.guess and config.sub files.

I tested time with the same results

@jneira jneira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, all tests are ok I my end

@Mikolaj

Mikolaj commented Aug 7, 2021

Copy link
Copy Markdown
Member Author

Yet another random fail from AppVeyor. I will rebase the branch and this will reset the tests and let's hope they pass.

@Mikolaj
Mikolaj merged commit a8d47c3 into haskell:master Aug 7, 2021
@Mikolaj

Mikolaj commented Aug 7, 2021

Copy link
Copy Markdown
Member Author

The CI finally finished successfully. Merged. @jneira: you rock. @emilypi: thank you for the review.

@Mikolaj Mikolaj mentioned this pull request Aug 13, 2021
3 tasks done
@Mikolaj

Mikolaj commented Aug 23, 2021

Copy link
Copy Markdown
Member Author

@Mergifyio backport 3.6

@mergify

mergify Bot commented Aug 23, 2021

Copy link
Copy Markdown
Contributor

Command backport 3.6: success

Backports have been created

Mikolaj added a commit that referenced this pull request Sep 15, 2021
Revert PR #7510 (which was "Set PATH_SEPARATOR=; when calling ./configure")
jneira added a commit that referenced this pull request Sep 19, 2021
Revert PR #7510 (which was "Set PATH_SEPARATOR=; when calling ./configure") (backport #7651)
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.

Configure packages on Windows no longer work with autoconf >= 2.70

5 participants