Open frenck opened 4 years ago
Is it x86 or ARM? LS is not built for ARM.
This is all x86_64.
Try launching Microsoft.Python.LanguageServer
manually from console. Perhaps chmod +x Microsoft.Python.LanguageServer
will help?
Alpine Linux uses musl, not libc. I believe that's why it refuses to execute, since the language server executable is linked against libc.
https://github.com/microsoft/python-language-server/blob/master/CONTRIBUTING.md has some instructions for building from source and pointing the extension at the built code. I'm not certain the constraints about building for Alpine with dotnet, but it might be the case that you need to build with musl to get musl in the final output.
Though, I was under the impression that both the traditional libc and musl presented themselves as "libc" at load time, to be compatible, so I'm not convinced that's it either.
Ah, that clears it. For dotnet publish
we specify <RuntimeIdentifiers>win-x86;win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
and linux-x64
does not include Alpine. According to RID catalog https://docs.microsoft.com/en-us/dotnet/core/rid-catalog it has to be linux-musl-x64
To make this work two things needs to happen
linux-musl-x64
.At the moment LS may have to be built from source and installed manually per https://github.com/microsoft/python-language-server/issues/1698
Environment data
Expected behaviour
The language server to start.
Actual behaviour
The server crashes, without any error or warning message that could provide a useful hint to what is going on.
Logs
I've set the
logLevel
toTrace
, but it has no effect on the output. Would love some guidance on how to get more information out of it.Code Snippet / Additional lnformation
The Python Language server states in the docs:
Which is great, since Microsoft has a .NET Core for Alpine, however, adding that manually to the container, doesn't help either.
The used Dockerfile
Upstream PR, where we want to apply this: home-assistant/home-assistant#31721
Upstream PR is closed until a solution is found, and does not have dotnet core installed as I have done in the above-provided example, which suffers from the same issue.