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
stack hangs while linking (lld) with ghc 8.4+ #4433
Comments
Hey @Keruspe - thanks for the report. I haven't been able to replicate the problem but I wonder if it's because I'm missing some important detail. The following worked for me with a fresh project on Debian Linux - does following the same steps fail for you? stack --resolver lts-11.22 new test
cd test
stack build
stack --resolver lts-12.21 build Any other specifics you can share that might be relevant? What Linux distro are you using? If your code is public I don't mind trying again running against your repo if you'd like to share a link. |
I'm running Exherbo.
|
I can't reproduce in a |
@Keruspe Would you run again with |
Here we go:
|
How long does it hang? You may want to try another linker — see https://stackoverflow.com/a/43243323 — and see whether it is a linker issue. |
It hangs forever, never seen it timeout or whatever (let it ran for 3h once) |
Looks the same with gold and lld. Fwiw:
|
And running a |
|
And if you don't do it in a subdir of It's looking like a platform issue, at the moment — given we can't reproduce, I'm not quite sure what other help we can give, until you can isolate further. |
No, lts-12 doesn't work at all on my machine. How can I find out why it's hanging? |
It could well be a cabal 2.2/ghc 8.4 issue. Try stackage nightly? |
Also try installing that ghc through your distro — there are lots of things to try, to isolate the issue. If it is with stack, we'll try to fix it — but right now that's far from obvious. |
Nightly has the same issue fwiw, will try another ghc to see how it behaves |
With stackage nightly and ghc 8.6.2 downloaded from fedora, it works |
Ok, so I nuked all my |
Cool, thanks for tracking down those details @Keruspe. |
Glad you've got it working — I'll see whether anybody else has any ideas for a fix. |
This appears to me to be an upstream problem with either GHC or the system linker. @Keruspe are you able to reproduce this frozen linking with a direct call to the |
Is there a 1.9.4 planned at some point? |
Not right now, no. Is that query related to this discussion? I didn't see any mention of changes to Stack. |
I don't know, just saw this issue be closed by a commit to stack |
Oh, that's my mistake, I put the wrong issue number in that commit. |
That said, I do believe this is an upstream issue that we are going to close, but still waiting for your response to the question above. |
Heh, since reporting this issue I switched my system ld to lld and now I cannot seem to be able to reproduce... |
Any update? |
Hangs when running ghc manually too. |
I'm not aware of Stack trying to do that. If this occurs with GHC directly as well, this sounds like behavior occurring in GHC, not Stack. |
Isn't stack responsible for generating e.g. |
No, that's created by the GHC configure script, Stack simply runs it. |
Oh, my bad then, that's definitely what needs fixing then |
Please open an issue upstream with GHC if you want to pursue this. Closing as upstream |
@snoyberg Would that be acceptable for stack to pass |
If GHC has the wrong default, I'd rather see it fixed in GHC, rather than having Stack override GHC's settings. I don't think Stack currently has the ability to let the user pass parameters to GHC's |
General summary/comments (optional)
I'm using stack 1.9.3 and have a project using lts-11.22.
I tried updating it to lts-12 (lts-12.0 and lts-12.21 ends up with the same problem) and stack just hangs when linking the StackSetupShim
Steps to reproduce
Update from lts-11.22 to lts-12.21
Run
stack build
Expected
Build success
Actual
hangs forever
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: