-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Server cannot find hls-qualify-improted-names-plugin .so file (missing from ghcup install?) #4142
Comments
Hi! Thank you for your bug report! Locally, I do have that path and the tar ball https://downloads.haskell.org/~ghcup/unofficial-bindists/haskell-language-server/2.7.0.0/haskell-language-server-2.7.0.0-x86_64-linux-ubuntu22.04.tar.xz also contains this shared library. Perhaps installation was interrupted for some reason? Have you tried reinstalling this HLS version via |
I am getting the same issue on neovim too, when using the 2.7.0 version of HLS downloaded by Mason. here are the logs if you are interested, reinstalling did not help. |
Are you on the same platform? |
Yeah sorry I shouldve specified all those details earlier: |
Very unsettling! cc @hasufell, perhaps you have an idea what's up? |
I can't reproduce. I tried in a linuxmintd/mint21.3-amd64 docker container with default and vanilla channel. Everything works. The file is there. |
idk what else to tell you, I did a |
Is the file there? If so, what does |
no file does not exist, /home/andrey/.local/share/nvim/mason/packages/haskell-language-server/lib/haskell-language-server-2.7.0.0/bin//haskell-language-server-9.4.8 does exist, its trying to find some shared object (so) file and I have no idea what path its trying to find that file at. Some .so file called libHShaskell-language-server-2.7.0.0-l-hls-qualify-imported-names-plugin-6c99426d851435d186c607a3a593b9558e1a11f29351f1465cf1211047315fc0-ghc9.4.8.so |
Search for the file in the install directory |
Sorry for the long-delayed response. I tried $ ls .ghcup/hls/2.7.0.0/lib/haskell-language-server-2.7.0.0/lib/9.4.8/ | grep qual
libHStype-equality-1-4c4c74459b9beac3450b8c89d5e44e349246b3380947be50f84b6d23d84c2245-ghc9.4.8.so Here's the ghcup log from my latest attempt: I tried downloading the .tar.xz file from the link @fendor mentioned myself and extracting it, and when I do so I get a bunch of error messages like:
which suggests that something's wrong with that archive. |
... are you kidding me, tar?
|
Okay, on further investiagation, the problem isn't tar, it's ecryptfs. File names longer than 143 characters are not supported on ecryptfs (see e.g. https://bugs.launchpad.net/ecryptfs/+bug/344878). The hls plugins are just barely long enough to trigger that issue (the qualify-imported-names one is 150 characters long, and not the only one with that issue). It's really annoying that ghcup doesn't report any kind of error when it can't unpack a file; it would have saved a bunch of time if it had pointed out that 'file name too long' error message when it was trying to install hls. |
We use What is the easiest way to reproduce this? |
Probably the easiest way is something like:
Honestly given that ecryptfs hasn't been actively supported in over five years, it's probably best to just let it die; I've managed to disable it by following the instructions here: https://askubuntu.com/a/862599 and that lets ghcup successfully unpack the .so files. |
(That said, do these filenames really need to be this long? "libHShaskell-language-server-2.7.0.0-l-hls-qualify-imported-names-plugin" mentions HLS twice, both expanded and abbreviated, there's a 512-bit hash spelled out as 64 hex digits, and "-ghc9.2.8" or whatever is implied by the directory structure.) |
I'm not gonna support ecryptfs. I'm only interested in why unpacking doesn't error properly. |
Another thing that may assist you is that it seems like docker has a filename limit of 242 characters (rather than 255 on most linuxes), so making a tarball with a 250-character name and trying to get ghcup to unpack it in a docker container may help? |
Closed as we can't do much about it here. This is an error with bindists and ecryptfs isn't supported. |
Another |
I guess we could get rid of the hash in the SO filename. For the purpose of the bindist, it really is irrelevant. So we either use cabal v1 to build the bindist or summon some patchelf dragons. |
It's probably true that Just for the record, since @fendor mentions "this is an error with bindists", I figured I'd give a compile-from-source a try, but that fails too (but at least with
|
I worked around the problem by symlinking |
You can use |
Your environment
Which OS do you use?
Ubuntu 22.04
Which version of GHC do you use and how did you install it?
9.4.8 from ghcup
How is your project built (alternative: link to the project)?
cabal
Which LSP client (editor/plugin) do you use?
VS Code Haskell extension
Which version of HLS do you use and how did you install it?
v2.7.0.0 via ghcup
Have you configured HLS in any way (especially: a
hie.yaml
file)?No
What's wrong?
Trying to run HLS gives an error that it cannot find a shared library
libHShaskell-language-server-2.7.0.0-l-hls-qualify-imported-names-plugin-(...)-ghc9.4.8.so
. And indeed if I look in~/.ghcup/hls/2.7.0.0/lib/haskell-language-server-2.7.0.0/lib/9.4.8/
, there is no such file.Just to be sure, I checked the 9.8.2 directory and it's also not in there.
Debug information
$ haskell-language-server-wrapper --debug
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.7.0.0 x86_64 ghc-9.2.8
Current directory: /home/thomas/Projects/hlox
Operating system: linux
Arguments: ["--debug"]
Cradle directory: /home/thomas/Projects/hlox
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.10.2.1
stack: 2.13.1
ghc: 9.4.8
Consulting the cradle to get project GHC version...
2024-03-16T19:04:50.992505Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-03-16T19:04:51.147451Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-03-16T19:04:51.224244Z | Debug | cabal --builddir=/home/thomas/.cache/hie-bios/dist-hlox-1a935d12146f65740c93580ab0e3a370 v2-exec --with-compiler /home/thomas/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/thomas/.cache/hie-bios/ghc-pkg-f991dad7f140da4685186d716b70b438 ghc -v0 -- --numeric-version
Environment Variables
HIE_BIOS_GHC: /home/thomas/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/bin/ghc-9.4.8
HIE_BIOS_GHC_ARGS: -B/home/thomas/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib
Project GHC version: 9.4.8
haskell-language-server exe candidates: ["haskell-language-server-9.4.8","haskell-language-server"]
Launching haskell-language-server exe at:/home/thomas/.ghcup/bin/haskell-language-server-9.4.8
2024-03-16T19:04:51.303610Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-03-16T19:04:51.457805Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-03-16T19:04:51.614621Z | Debug | cabal --builddir=/home/thomas/.cache/hie-bios/dist-hlox-1a935d12146f65740c93580ab0e3a370 v2-exec --with-compiler /home/thomas/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/thomas/.cache/hie-bios/ghc-pkg-f991dad7f140da4685186d716b70b438 ghc -v0 -- -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
Environment Variables
HIE_BIOS_GHC: /home/thomas/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/bin/ghc-9.4.8
HIE_BIOS_GHC_ARGS: -B/home/thomas/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib
2024-03-16T19:04:51.693325Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-03-16T19:04:51.847618Z | Debug | cabal exec -v0 -- ghc -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-03-16T19:04:51.914209Z | Debug | cabal --builddir=/home/thomas/.cache/hie-bios/dist-hlox-1a935d12146f65740c93580ab0e3a370 v2-exec --with-compiler /home/thomas/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/thomas/.cache/hie-bios/ghc-pkg-f991dad7f140da4685186d716b70b438 ghc -v0 -- --print-libdir
Environment Variables
HIE_BIOS_GHC: /home/thomas/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/bin/ghc-9.4.8
HIE_BIOS_GHC_ARGS: -B/home/thomas/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib
/home/thomas/.ghcup/hls/2.7.0.0/lib/haskell-language-server-2.7.0.0/bin//haskell-language-server-9.4.8: error while loading shared libraries: libHShaskell-language-server-2.7.0.0-l-hls-qualify-imported-names-plugin-6c99426d851435d186c607a3a593b9558e1a11f29351f1465cf1211047315fc0-ghc9.4.8.so: cannot open shared object file: No such file or directory
The text was updated successfully, but these errors were encountered: