You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently metals gets bootstraped with coursier binary. However precompiled binaries provided by coursier are not running under Guix due to the nature of distribution and how it deals with linux ld loader.
When (lsp-install-server t 'metals) is executed on such environemnt, *Messages* will have:
LSP :: Download metals started.
(:download :url "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" :store-path "/home/muradm/.local/share/emacs/var/lsp/server/metals/coursier" :decompress :gzip :set-executable? t)
LSP :: Starting to download https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz to /home/muradm/.local/share/emacs/var/lsp/server/metals/coursier.gz...
Contacting host: github.com:443
Wrote /home/muradm/.local/share/emacs/var/lsp/server/metals/coursier.gz
LSP :: Finished downloading /home/muradm/.local/share/emacs/var/lsp/server/metals/coursier.gz...
LSP :: Decompressing /home/muradm/.local/share/emacs/var/lsp/server/metals/coursier.gz...
(Shell command succeeded with no output)
LSP :: Decompressed /home/muradm/.local/share/emacs/var/lsp/server/metals/coursier...
LSP :: Server metals install process failed with the following error message: (file-missing Doing vfork No such file or directory).
Check `*lsp-install*' and `*lsp-log*' buffer.
Below sequence of commands illustrating the issue with downloaded non-working launcher and working ls command as example.
$ wget https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz
$ gunzip cs-x86_64-pc-linux.gz
$ chmod a+x cs-x86_64-pc-linux
$ file cs-x86_64-pc-linux
cs-x86_64-pc-linux: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ba800144eff305fab792b58743c6e5b9aaa50a46, for GNU/Linux 3.2.0, with debug_info, not stripped
$ ./cs-x86_64-pc-linux
bash: ./cs-x86_64-pc-linux: No such file or directory
$ ls -la /lib64/ld-linux-x86-64.so.2
ls: cannot access '/lib64/ld-linux-x86-64.so.2': No such file or directory
$ file $(readlink $(which ls))
/gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped
$ ls -la /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2
lrwxrwxrwx 1 root root 10 Jan 1 1970 /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2 -> ld-2.33.so
To Reproduce
Setup Guix, emacs for your liking and try (lsp-install-server t 'metals).
Expected behavior
Should be possible to use lsp-metals out-of-the-box.
In order to solve this issue, it could be better to use jar version of coursier launcher. It requires only java to be present in the system, which should be available any way. It will also simplify things for multiple platforms, as it should be running on any platform having java preinstalled.
Workaround
Dig lsp-metals to identify how coursier is used. Find emacslsp server install path. Do the lsp-install-server work manually. For instance:
# for me lsp server install path is below
$ cd ~/.local/share/emacs/var/lsp/server/metals
$ wget https://github.com/coursier/launchers/raw/master/coursier.jar
$ java -jar coursier.jar bootstrap --java-opt -Xss4m --java-opt -Xms100m org.scalameta:metals_2.12:latest.release -r bintray:scalacenter/releases -r sonatype:snapshots -o metals
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently
metals
gets bootstraped withcoursier
binary. However precompiled binaries provided bycoursier
are not running underGuix
due to the nature of distribution and how it deals with linux ld loader.When
(lsp-install-server t 'metals)
is executed on such environemnt,*Messages*
will have:Below sequence of commands illustrating the issue with downloaded non-working launcher and working
ls
command as example.To Reproduce
Setup
Guix
,emacs
for your liking and try(lsp-install-server t 'metals)
.Expected behavior
Should be possible to use
lsp-metals
out-of-the-box.In order to solve this issue, it could be better to use
jar
version ofcoursier
launcher. It requires onlyjava
to be present in the system, which should be available any way. It will also simplify things for multiple platforms, as it should be running on any platform havingjava
preinstalled.Workaround
Dig
lsp-metals
to identify howcoursier
is used. Findemacs
lsp
server install path. Do thelsp-install-server
work manually. For instance:The text was updated successfully, but these errors were encountered: