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

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

Merged
merged 3 commits into from
Aug 7, 2021

Conversation

Mikolaj
Copy link
Member

@Mikolaj Mikolaj commented Aug 5, 2021

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
Copy link
Member

jneira commented Aug 5, 2021

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

@Mikolaj
Copy link
Member Author

Mikolaj commented Aug 5, 2021

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

@jneira
Copy link
Member

jneira commented Aug 5, 2021

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
Copy link
Member Author

Mikolaj commented Aug 5, 2021

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

@phadej
Copy link
Collaborator

phadej commented Aug 5, 2021

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


description: {

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

@fgaz fgaz Aug 5, 2021

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
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
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
Copy link
Member

jneira commented Aug 5, 2021

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

😮 i did not know it, pure gold, thanks!

@jneira
Copy link
Member

jneira commented Aug 5, 2021

  • 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
Copy link
Member

jneira commented Aug 6, 2021

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
Copy link
Member Author

Mikolaj commented Aug 6, 2021

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

@fgaz
Copy link
Member

fgaz commented Aug 6, 2021

What about the TODO?

@Mikolaj
Copy link
Member Author

Mikolaj commented Aug 6, 2021

@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
Copy link
Member

jneira commented Aug 6, 2021

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

@jneira
Copy link
Member

jneira commented Aug 6, 2021

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
Copy link
Member

jneira commented Aug 6, 2021

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

Copy link
Member

@jneira jneira left a comment

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
Copy link
Member Author

Mikolaj commented Aug 7, 2021

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
Copy link
Member Author

Mikolaj commented Aug 7, 2021

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
@Mikolaj
Copy link
Member Author

Mikolaj commented Aug 23, 2021

@Mergifyio backport 3.6

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2021

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