-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
HLS can't find dylib file in ~/.stack/programs/etc... #2815
Comments
Hello, thank you for your bug report! I am wondering, why are you deleting I guess this issue is rather about relocatable, dynamically linked HLS executables. |
Yeah, it appears you just built a dynamically linked HLS and then deleted all the dynamic libraries it links against. So yeah. |
About once a week I get an error (I forget its content and didn't note it Anyway, when troubleshooting this error, the only thing that seems to work consistently is In case it's relevant, to troubleshoot the issue, before doing
|
This is the error Jason was seeing I believe:
I also occasionally receive that. |
Got the error again, here it is
actually, this might be a new error 🤔 |
Try a setup that installs hls with ghcup and configures stack to use the ghcup installed GHC such as the setup in this repro: https://github.com/codygman/EvalTest/tree/minimal-repro Also, maybe related to #2857 and all of these types of issues might be helped by #2903. |
I had tried that and was still getting this problem, though at this point I don't recall how :( Anyway, I'm closing this since the latest hls solves this I believe |
Is this a
stack
problem? Should I post there instead?The tldr is that the problem seems to be that HLS can't find
/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/base-4.14.3.0/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib
, or any of the fallback files. I installed everything manually because HLS needs a dynamically linked binary towork with Template Haskell. See https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#static-binaries
Your environment
Which OS do you use:
Which LSP client (editor/plugin) do you use:
Describe your project (alternative: link to the project):
I think the only relevant thing is we use Template Haskell
Steps to reproduce
rm -rf ~/.stack
(previously listed below install HLS but I believe this should go first)wget -qO- https://get.haskellstack.org/ | sh
./configure && make install
/usr/local/bin
stack install haskell-language-server --stack-yaml=stack-8.10.7.yaml
per [https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#static-binaries](the docs). I needed dynamically linked HLS binary because we have Template Haskell in our codebase.rm -rf ~/.stack
if it existscd
to a haskell codebase that makes use of template haskellstack build
to generate~/.stack
Expected behaviour
HLS works
Actual behaviour
HLS crashes
Include debug information
Output from lsp-haskell::stderr
Found "[redacted]/[redacted]/ins/ins-leads-generator-component/hie.yaml" for "[redacted]/[redacted]/ins/ins-leads-generator-component/a" Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.6.1.1, Git revision 3084651 (2660 commits) x86_64 ghc-8.10.7 Current directory: [redacted]/[redacted]/ins/ins-leads-generator-component Operating system: darwin Arguments: ["--lsp","-d","-l","/var/folders/_y/7c6jcbcj2xs3xrrk2rnd99b80000gs/T/hls.log"] Cradle directory: [redacted]/[redacted]/ins/ins-leads-generator-component Cradle type: StackTool versions found on the $PATH
cabal: 3.6.2.0
stack: 2.7.5
ghc: 8.10.7
Consulting the cradle to get project GHC version...
Project GHC version: 8.10.7
haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"]
Launching haskell-language-server exe at:[redacted]/.local/bin/haskell-language-server
dyld[92263]: Library not loaded: @rpath/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib
Referenced from: [redacted]/.local/bin/haskell-language-server
Reason: tried: '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/base-4.14.3.0/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/containers-0.6.5.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/filepath-1.4.2.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/ghc-8.10.7/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/integer-gmp-1.0.3.0/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/rts/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/text-1.2.4.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/snapshots/x86_64-osx/eeddf135f4088ed43ec17b8b78528016ab57208ffc93672f58556205c25f4c4b/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/Projects/haskell-language-server/.stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/Projects/haskell-language-server/.stack-work/install/x86_64-osx/eeddf135f4088ed43ec17b8b78528016ab57208ffc93672f58556205c25f4c4b/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/base-4.14.3.0/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/containers-0.6.5.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/filepath-1.4.2.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/ghc-8.10.7/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/integer-gmp-1.0.3.0/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/rts/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/text-1.2.4.1/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/.stack/snapshots/x86_64-osx/eeddf135f4088ed43ec17b8b78528016ab57208ffc93672f58556205c25f4c4b/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/Projects/haskell-language-server/.stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '[redacted]/Projects/haskell-language-server/.stack-work/install/x86_64-osx/eeddf135f4088ed43ec17b8b78528016ab57208ffc93672f58556205c25f4c4b/8.10.7/lib/x86_64-osx-ghc-8.10.7/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '/usr/local/lib/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file), '/usr/lib/libHSprettyprinter-1.7.1-8zx93U4AMQACycDDx2d9mj-ghc8.10.7.dylib' (no such file)
Process lsp-haskell stderr finished
The text was updated successfully, but these errors were encountered: