-
Notifications
You must be signed in to change notification settings - Fork 697
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
cabal-install-3.6 fails to install network-3.1.2.2 in windows #7649
Comments
are very much |
Is this solved, then? If not, how exactly do I reproduce? I don't see any direct instruction for that. Edit: never mind, I'm on Linux and this is probably Windows. |
I tested it in a misys2 bash console and same error with |
I think I am using 3.6 official release but I will confirm
the problem maybe is the unique
not yet |
I've seen
Huh, I'm not sure any more. [Edited: removed all the rest of my musings, because they didn't make sense. Read #7494 instead.] [Edit2: after reading #7494, I agree there should be no colons, but only semicolons in PATH. So cabal is giving wrong PATH to configure or the following not always holds: "When cabal is called the msys2-runtime converts the environment block to contain windows paths since Cabal is a Windows program and expect a Windows style environmental block."] [Edit3: perhaps it depends on whether cabal is called from Windows console or msys/cygwin terminal or whether the cabal binary is more or less native Windows binary (if that's possible)?] |
3.7 is shown cause I was trying to build a recent commit of cabal but using an older version of cabal itself |
Oh, right, my bad. |
@Mistuke: does the log tell you anything? What can be going wrong? |
My guess is that we don't overwrite And if you test in PowerShell the problem doesn't arise. Can @jneira try to build in PowerShell? |
I am afraid the log from the description was from a powershell session 😕 |
Ok, i am afraid there had been some confusion that I could have avoided posting the full logs with versions of tooling:
with
|
It does, but the problem is that the So Cabal has Windows Path -> sh (converts everything) It looks like we have two seemingly incompatible requirements. 2.70 requires different handling for The problem seems to be that the packaged It looks like @phadej was right, we need a more complicated fix due to packaged configure scripts. There are likely 3 options:
But the last time I tried 3 the error became even more cryptic
with an empty files list. Can be worth trying again though. I am also worried that paths exported end up in configure output. So we can try just modifying the path to configure scripts to unix paths and see if that works if not I think 2 is likely the only option left. |
@Mistuke: thank you for the hints. So it fails for you too, consistently, when @emilypi, @gbaz, @fgaz: we have a situation. My PR bombed out and cabal 3.6.1 is a dud on Windows. I think we should announce the workaround is to install network (and possibly others) from github instead of Hackage. Perhaps a workaround until we can create and release 3.6.2 is to beg Kazu to release @Mistuke: how to approach 3? By chance, do you have any patches lying around? Edit: BTW, am I right that a Windows bootstrap test would catch that? Build master, wipe store, build master again using the just obtained |
Yes, But this I think is a second order effect. Another change in autoconf 2.70 is that the standard macros don't look for nearly as many programs as they did before. So in 2.70 there's no search for programs such as
Unfortunately it looks like
Cabal isn't a configure based package is it? so it wouldn't catch it. Though a simple test can be made which uses configure, and searches for a standard program like |
It looks like converting the top level path is enough: Cabal currently does
but if it does
Configure seems to throw a
message but that's not fatal and everything seems to work right. But we need a more extensive way of testing this time... But it looks like most of those configure packages don't work on Windows? |
Those listed by the serokell.io invocation above that @phadej constructed? I'd guess at least hpack, time and a few others work on Windows.
But it depends on network, so that would be caught, right? And possibly other problems. For a good measure, we could force a rebuild of packages that GHC provides, like time, to be sure. |
Ah, hmm. It would work, but be very slow. I wouldn't do it on every build. For normal builds I'd just have a collection of |
The problem is, how do you test changing behavior of the macros and files like |
Good point. |
@jneira do you think you could put together a PR adding tests for just running the configure scripts for network generated from both older and newer autoconf versions? I.e. the successful and failing ones for network, for starters? :-) |
I dont know the cabal test suite in deep but i could try it. Sorry for not testing all cases, i should have tested the pr version against the conf files included in the hackage version of network. In all my tests i did a It worked with the new cabal using conf files generated with autoconf 2.69 in my machine. But i did not test the new cabal against the existing conf files generated in linux and included in the package 🤦. I think i will do that test with the pr version, just in case. @Mistuke does that test fits the actual diagnostic of the bug? (@gbaz has suggested that maybe the autoreconf version used to generate the conf files for the distributed package is different from 2.69, to investigate, finding out what autoreconf version is being used in the linux machine used to upload the package network to hackage) |
i am afraid all packages with configure step are affected, i've tried time and process and both fail with the same error :-( |
I have debugged the same issue a few months ago in the GHC build. The relevant ticket/comment is https://gitlab.haskell.org/ghc/ghc/-/issues/19189#note_332168 It led me to remove the use of I have opened this issue upstream at the time (https://savannah.gnu.org/support/?110448) which got the following responses by email:
Edit: I had missed that @Mistuke explained all this in #7494 |
Hey guys,
I am on Windows 11 all installed with defaults.
I am using powershell. Thanks! |
"I am on Windows 11 all installed with defaults." -- what does this mean? how did you install cabal? with ghcup? did you install the necessary mingw/msys tooling along with it? how did you install that? |
@madjestic 3.6 is a rather old release. Could you try the latest one? (E.g. |
ghcup, all defaults as recommended, msys2, stack, hls. |
I will try that, thanks! |
Hey guys, I've tried ghc 9.4.7 and cabal 3.10.1.0, the error message is the same. |
Thanks for the experiment. Does compiling C programs that use |
I will explain how I am doing that: I've got ghcup installed as recommended on the website, ugraded and updated. I start the Powershell, navigate to the haskell project (a clean test project with network added into the project's cabal as the only dependency besides base), run I am not aware of how I am supposed to use Regards, |
@madjestic: actually, I'm quite clueless regarding Windows --- I was just following your error message. I'm also trying to understand how broken your toolchain is and what may be responsible for that. @hasufell: is |
I can only humbly suggest that my toolchain is probably as vanilla as most windows 11 users will experience. I kept it very simple and nearly everything is a default, I was not trying being clever or customize my environment beyond adding SDL2 dll to the path and cabal/config. |
That's what I'm worried about. :D |
My experience is that building |
Yes, we:
That means you don't need an msys2 shell, because cabal knows about those directories. If the cabal config doesn't include this, it will fail. |
@madjestic: can you reconcile these bits of info? Are msys2 paths in your cabal config? |
I will take a look and let you know asap, thanks! |
Hey guys, Am I missing something there? |
those paths look correct. perhaps you can download and build network individually, running cabal at a high verbosity, so that we could see the error logs, which may be more informative? |
|
Not so sure. If it was the exec handling and git handling, not sure how that might have affected build? |
Indeed. My comment was before I started investigating deeply the fix for my ticket. This is NOT related to #9519. |
with cabal-3.4.0.0
Could it be related with #7510 (which i tested myself 🤦)?
The text was updated successfully, but these errors were encountered: