-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
ms-python.python vscode extension fails with "... Couldn't find a valid ICU package ..." #73810
Comments
@jonringer thank you for the fast response! I can't seem to get this to work using my install method - applying the patch adds to the rpath of When I directly run autopatchElf on both those files in one of the hooks it doesn't seem to modify the rpaths either. This fixes my problem:
...but I don't know the repercussions that might have elsewhere. |
OK, this is even stranger... it can't find SSL with everything in the rpath - but can find it when the rpaths are very specific. So this works:
but this does not:
I can do a bit more investigation to see if I can pull a stack trace from vscode running the server - I've got some other bits to do this morning (UK) first though. Edit - It also fails if openssl / icu are flipped around so openssl occurs first. |
I think the underlying failure, is that isExecutable() returns false on the shared libraries, thus skips editing their rpaths |
I've just checked without the additional runtimeDependencies and unfortunately neither of System.Globalization.Native.so or System.Security.Cryptography.Native.OpenSsl.so parse to find icu or openssl as a dependency. If you add both rpaths to System.Security.Cryptography.Native.OpenSsl.so then it breaks it - it must have only SSL in its rpath - but System.Globalization.Native.so must have icu... I get the feeling this can only be fixed by manually calling patchelf. Is there a way I can add in a hook to do this? postfixUp seems to get called before autopatchElf is run - so the paths get destroyed by the later run. |
This seems to work on unstable (with no edits), not sure why stable is broken |
Shall I upgrade dependencies from stable to locate the fix? Is that a necessary step to completing or can the fix be confirmed in unstable? |
It doesn't work for me on unstable |
Still does not work for me. Are there any other workarounds for using Python extension on VS Code? |
if you look at the strace, it's looking for a How to expose this? I'm not sure |
ran into a similar issue with dotnet-sdk. There's likely an executable or shared library that doesn't have it's rpath set correctly. |
Also interested in this as nvim-lsp uses the dotnet version of microsoft's python language server, and if I should separately package the server |
I believe the python language server is already packaged |
@jonringer I wasn't able to find it, it's a subset of the vscode extension package, but for use with nvim/vim it should be on PATH |
I was thinking of |
I'd be interested in a separate server package. Emacs can also use mspyls (and is my preference because it's faster and supports 3.8. palantir's pyls does not.) |
I decided to write this the hope that someone with a problem like mine arrive here. I am not sure it is related but I really did not find any similar issue somewhere else. I am experiencing a similar problem, however my extension is installed differently. I am on 20.03. I just added the package vscode-with-extensions, and my python extension is failing. The file > ~/.vscode/extensions/ms-python.python-2020.4.74986/languageServer.0.5.45/Microsoft.Python.LanguageServer
zsh: no such file or directory: /home/pvelho/.vscode/extensions/ms-python.python-2020.4.74986/languageServer.0.5.45/Microsoft.Python.LanguageServer Using bash I get the /usr/bin/env bash ./Microsoft.Python.LanguageServer
./Microsoft.Python.LanguageServer: ./Microsoft.Python.LanguageServer: cannot execute binary file I used > ldd Microsoft.Python.LanguageServer
linux-vdso.so.1 (0x00007ffc3dfdc000)
libpthread.so.0 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libpthread.so.0 (0x00007f4b9b4cd000)
libdl.so.2 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libdl.so.2 (0x00007f4b9b4c8000)
libstdc++.so.6 => not found
libm.so.6 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libm.so.6 (0x00007f4b9b388000)
libgcc_s.so.1 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libgcc_s.so.1 (0x00007f4b9b36e000)
libc.so.6 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libc.so.6 (0x00007f4b9b1af000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x00007f4b9b4f0000) Sorry if I post this in the wrong place. Please let me know if this is related or not, and if you have any idea how to fix it i would appreciate. |
Hi all -- I just created a PR that builds the Microsoft Python Language Server independently from VS Code. It should make it easier to use this language server with other editors and might help with the issue mentioned in this thread. Any testing or review would be appreciated. PR is here: #85930 |
@pedrovelho you shouldn't run |
It is possible to patch this kind of thing as follow;
|
I was thinking of just making vscode into a This would solve a lot of other issues with extensions having pre-built binaries |
I marked this as stale due to inactivity. → More info |
Describe the bug
After installing ms-python.python vscode extension the extension fails to start:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The extension loads correctly when a python file is loaded in vscode.
Also, when directly running the language server (
Microsoft.Python.LanguageServer
) there is no output.Additional context
The binary can be fixed using:
Unfortunately, the
postFixup
hook inpython/default.nix
appears to run before the autoPatchelfHook stage - so any changes added there are undone.Metadata
"x86_64-linux"
Linux 4.19.84, NixOS, 19.09.1292.e1843646b04 (Loris)
yes
yes
nix-env (Nix) 2.3
"nixos-19.09.1292.e1843646b04"
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: