-
Notifications
You must be signed in to change notification settings - Fork 845
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
Network as a dependency fails to build with GHC 8.4.1 #3944
Comments
It's unclear from this issue if you're using the same resolver in the two different builds, which could fully explain the difference. |
I am using
The final line fails, all other lines work. You can see a trace at https://ci.appveyor.com/project/ndmitchell/bug-network-ghc84/build/1.0.17. |
I'm also seeing this, with 64-bit GHC 8.4.2 and nightly-2018-04-25 on appveyor (https://ci.appveyor.com/project/simonmichael/hledger/build/master-408). |
Also seeing this on AppVeyor with nightly-2018-05-01 https://ci.appveyor.com/project/lierdakil/pandoc-crossref/build/1.0.286 |
Still happening on nightly-2018-05-23 https://ci.appveyor.com/project/lierdakil/pandoc-crossref/build/1.0.288 |
As a side comment: this kind of attitude is not what I would expect when working on an open source project. Anyone is of course free to contribute and investigate the issue, including of course you yourself. Comments like this have a great way of preventing contributors from wanting to get involved. That said, my initial read of this issue is that it's non-critical, as the original description shows that there's at least one way that the builds succeed, so people can continue using the tool. If I'm missing some reason why this is more critical than I thought, let me know. But at least I, and I'm sure most everyone else involved in open source maintenance, has to prioritize their time investments. My strong recommendation: if this concerns you, ask concretely for advice on how to proceed with debugging this issue, I'd be more than happy to share any information I can. |
Sorry if I offended you, this was not my intention at all. As an opensource maintainer myself, I find such comment relatively benign, at least considering how these things could go wrong. At least that prompted a response, eh? Again, sorry.
Well, as far as I can tell, any package with a transitive dependency on
I'm short on time, lack easy access to Windows, and not at all familiar with Stack's code base, but sure, I could give it a shot. Don't really know where to even start though, so any pointers are appreciated. I think @ndmitchell mentioned something about different |
I've compared the logs (from https://ci.appveyor.com/project/ndmitchell/bug-network-ghc84/build/1.0.17) of the successful and non-successful builds, and this is what I see for the seemingly relevant subset of lines:
In other words, beyond the different directories (which is to be expected), I don't see anything else going on. My recommended next step would be to investigate what differences in environment may exist. One flag which may be useful is |
I opened up this PR (ndmitchell/bug-network-ghc84#1) to get an AppVeyor build running (https://ci.appveyor.com/project/ndmitchell/bug-network-ghc84/build/1.0.18). |
FWIW, I consider this pretty important (currently anything downstream of network that I maintain is no longer tested on Windows), and if I was doing commercial development on Windows I'd be absolutely freaking out (I stopped doing that 5 months ago, so we narrowly avoided a freak out). I have debugged as much as I could, and got stuck. I managed to figure out that stack uses a different sed in the two locations. I think that's the root cause, but because I'm so many levels of abstraction away from the problem, it's hard to be sure. The place where I discovered the information about sed was in haskell/network#313 (comment). I did add |
@ndmitchell From that report, I don't see evidence that two different versions of Also, AFAIK, |
Any chance you can confirm if running the build command a second time succeeds? I was able to reproduce this on my Windows machine once, but not more. Also, can you confirm that the command |
Here's the last bit of info I have. I've updated my fork of the
My guesses at what's going on so far, which may be wrong:
I'm also not entirely certain that my intercept program is working as expected, as I'm getting new build failures. But it's at least demonstrating that, presumably, all the different build types are calling the same |
@snoyberg I had very little success making it happen locally, but my development environment is the Haskell equivalent of the XKCD cartoon https://xkcd.com/1987/. At one point I thought I had it narrowed down to 32 bit vs 64 bit, but then I blinked and it changed. My guesses were mostly based on using https://www.appveyor.com/docs/how-to/rdp-to-build-worker/ to get RDP to the appveyor instance, which is a poor mans approximation of local reproduction. |
I tried to automate this, but failed so far. Instead, I was able to manually log into an AppVeyor machine and upgrade GHC 8.2.2's global Cabal to 2.2.0.1. With that installed, I got the same build failure as with GHC 8.4. Point being: the breakage is due to differences in Cabal, not GHC. Doesn't help fix this immediately, but does slightly narrow down where the problem comes from. |
And then I was able to reproduce the issue again using EDIT Instead of a bunch of individual comments, I'll keep updating here. Running Broken directory paths:
However, it worked with C:\Users\appveyor\AppData\Local\Temp\network-2.7.0.0 Theory: it's either an arbitrary length issue, or it doesn't like a path segment consisting of the number I tried building in c:\2\network-2.7.0.0, and the error message changes!
Great news, things are starting very slowly to make sense. I can also reproduce this on my local machine, so AppVeyor is no longer needed. Next step is to figure out what changed in Cabal to suddenly trigger this. |
I've been able to minimize this to a repro against just Cabal, which I've filed here: haskell/cabal#5386. |
It seems unlikely that Cabal will make a point release for this problem, and that GHC 8.4.4 will be released with that change. Given that, it's a good idea to figure out a workaround in Stack. Here's the only one I can think of, and it's crazy: In the temporary directory logic, add a check if the system's temporary directory has one of these |
This is a workaround for haskell/cabal#5386 and #3944
... or perhaps we can just fix this with docs instead. See: |
Way to go @snoyberg. |
Since the AppVeyor config change of setting |
* AppVeyor workaround for TMP issue commercialhaskell/stack#3944 * Bump resolver to nightly-2018-12-12. This has the primary benefit of moving to GHC 8.6.3 and should fix AppVeyor. * Add clock 0.8 as an extra-dep. * Adapt expected output to aeson 1.4.3.0.
Using an Appveyor machine, with the script from https://github.com/ndmitchell/bug-network-ghc84/blob/master/appveyor.yml, I get failures as per https://ci.appveyor.com/project/ndmitchell/bug-network-ghc84, when I try and install
network
using the latest GHC 8.4 nightly.This issue has been discussed at haskell/network#313 but I believe this is a
stack
bug because:stack unpack network && cd network-* && stack init && stack build
works.stack build network
fails.I believe these things are meant to be equivalent (full steps and command lines are given at https://github.com/ndmitchell/bug-network-ghc84/blob/master/appveyor.yml - the final line of the
test_script
section fails).The actual error seems to be:
When running
configure
, which results in a blanknetwork.buildinfo
, which should have theCALLCONV
macro set so the build succeeds.The text was updated successfully, but these errors were encountered: