-
-
Notifications
You must be signed in to change notification settings - Fork 388
HLS 2.3.0.0 release possibly borked on Windows - libstdc++-6.dll
not found
#3822
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
Comments
(Just passing by) if impl(ghc >= 9.4)
build-depends: system-cxx-std-lib == 1.0
elif os(darwin) || os(freebsd)
extra-libraries: c++
elif os(openbsd)
extra-libraries: c++ c++abi pthread
elif os(windows)
-- GHC's Windows toolchain is based on clang/libc++ in GHC 9.4 and later
if impl(ghc < 9.3)
extra-libraries: stdc++
else
extra-libraries: c++ c++abi
elif arch(wasm32)
cxx-options: -fno-exceptions
extra-libraries: c++ c++abi
else
extra-libraries: stdc++ If a package violates this (e. g., declares |
cc @wz1000 |
I have the exact same issue (Windows 10 but otherwise same environment) and have the same output logs, with the exception that I had hls 2.2.0.0 set as default without 2.3.0.0 installed, and when I opened a Haskell project in VSCode it prompted me to install 2.3.0.0, which I did, and after installing it has been crashing on start up with the same output as the screenshot above. Edit: I uninstalled 2.3.0.0 and tried to reproduce the error to see what the HLS logs are if I said no to installing 2.3.0.0 and this is what I got
which prompts me to install 2.3.0.0 and when I say no
|
Even
from @Bodigrim's comment is not necessarily true. The toolchain GHC bindists for windows ship, ship by default for UCRT, not MSVCRT from 9.4 onwards anymore. However this does not mean GHC 9.4+ can't be built against MSVCRT anymore. The whole assumption that GHC and the toolchain are bundled is deeply flawed imo. Yes, we do ship a specific toolchain with GHC in our windows binary distributions, but making the universal assumption that everyone depends on this is some tight coupling I'd rather we don't do. Also you can use UCRT but with the Gnu toolchain. MSYS2 classifies those environments as UCRT64 (ucr64 + ghc) and CLANG64 (ucrt64 + llvm). There is system-cxx-std-lib in recent GHCs trying to work around this to some degree. |
I tried to find the misbeaving package that imports stdc++ unconditionally, as @Bodigrim suggests. I downloaded the install plans for the release from https://github.com/haskell/haskell-language-server/releases/download/2.3.0.0/plan_json.tar and used a simple script to download all the cabal files involved.
... but grepping for stdc++ does not return anything 🤔 PS: perhaps we should upload the build-infos too! |
we could just ship the |
|
@andreabedini Which binaries are affected? This can be checked with |
Here's a summary of the problem
On GHC 9.0 and 9.2, As a result, the Possible sollutions are:
1 or 2 seem the easiest to do. We should also modify CI to ensure that we can control which version of |
@Bodigrim Good point. It turns out that plan uses the pre-installed text, so text's cabal file is not specified in the plan.
Doesn't what I wrote above plus this imply that the problem could be with the ghc bindist?
And, if I am not mistaken, text depends on
Therefore stdc++ should be part of the GHC bindist? I am confused. |
@andreabedini the haskell-language-server-9.4.7 binary seems to work for me, the 9.2 and 9.0 binaries are the ones that seem broken. Is this not the case for you? |
@wz1000 I am on linux :) I was only trying to troubleshoot. I picked x86_64-mingw64-ghc-9.4.7 from the information in the OP. |
Happy to help with debugging this on windows.
|
…, especially on older GHCs. See #3822.
…, especially on older GHCs. See #3822.
Fixed by e79a030 |
I've had two people in the FP Discord haskell-tooling channel having issues with HLS 2.3.0.0 on Windows. After some troubleshooting we see there's an issue involving
libstdc++-6.dll
not being found.Your environment
Which OS do you use?
Windows 11
Which version of GHC do you use and how did you install it?
9.4.7
How is your project built (alternative: link to the project)?
(Not relevant)
Which LSP client (editor/plugin) do you use?
VSCode+vscode-haskell
Which version of HLS do you use and how did you install it?
2.3.0.0 with
ghcup install hls 2.3.0.0
Have you configured HLS in any way (especially: a
hie.yaml
file)?No
Steps to reproduce
Simply run
haskell-language-server-wrapper-2.3.0.0.exe
in a cmd window (powershell crashes silently, cmd shows an actual error).Expected behaviour
Debug output is displayed.
Actual behaviour
We get the following error window popping up:
Additional information
This manifests in VSCode by displaying "The Haskell (PF) server crashed 5 times in the last 3 minutes. The server will not be restarted." The output pane shows:
(Sorry for the screenshot, this is what I have from the conversation.)
I suspect #3820 might be related (possibly they had 2.2.0.0 set, which is why running
haskell-language-server-wrapper
didn't reveal the issue).The text was updated successfully, but these errors were encountered: