-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Publishing release as single file does not include all libraries (libgssapi_krb5) #45720
Comments
Issue moved from microsoft/dotnet#1273
From @lastcoolnameleft on Monday, November 23, 2020 5:40:27 PM FYI, adding |
Tagging subscribers to this area: @agocke, @vitek-karas Issue DetailsIssue moved from microsoft/dotnet#1273
From @lastcoolnameleft on Monday, November 23, 2020 4:42:46 PM I'm trying to create a single-file binary to run on Linux; however, it does not include all libraries. I'm unclear why the Kerberos library is needed. To reproduce:
Start an Ubuntu instance via docker
As you can see, libgssapi_krb5.so.2 was not included. Due to
|
Single-file doesn't change the machine dependencies required by dotnet, it only links the dotnet libraries themselves together. You'll still need to install everything in https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#dependencies |
@danmosemsft Do you happen to know if we have a doc on why certain dotnet dependencies are machine dependencies, vs distributed w/ dotnet? |
I do not know of a document that describes all our dependencies. It may be these simply have to be uncovered by testing. Perhaps @wfurt has context on this one. |
The main difference between single-file and non-single-file is that the superhost currently requires all of its dependencies - so if they are not present, that app won't even start. Normal apphost doesn't have this, the dependencies are only loaded when the relevant managed code is executed - which may never happen for some apps. So while it's technically correct that the dependency set hasn't changed, the effective behavior does change for certain apps. |
do we know where this comes from? AFAIK, all the dependencies from NegotiateStream should be hidden behind Native shim we dlopen when needed. SO I would expect that libgssapi_krb5 is NOT needed to run. |
In single-file we can't bundle the native shims as .so files, because we don't want to write them to disk on execution and we can't 'dlopen' them from the single-file. So we statically link all the native shims into the executable. But that means they are not delay-loaded anymore... and that's where the problem comes from. |
note that if we link libSystem.Net.Security.Native.so directly, we will not only include it's dependencies but recursively also their dependencies. cc: @janvorli for ideas how to do this programatically. |
@VSadov did most of this work, so I'll have to leave it up to him to comment on what exactly happened. |
This is the entire purpose of the runtime-deps Docker images we provide. They install the required package dependencies on top of the base OS. It is recommended for self-contained deployments to be based on a |
It would be awesome to have this feature, publishing a single file with all runtime .so libs. Just saying. 😄 😅 |
I had the same problem and solved it by abandoning single file idea. If app is published as self contained but NOT as single file, everything works on the same linux distribution. |
Is there any method to solve the problem?I got the same error,and the Linux do not allowed to install other librarys. |
Never mind, that's only for OpenSsl. Let's see if there's any way to shim these calls with |
Created a new issue specifically for lazy loading, since this issue is about including all the possible dependencies, which isn't necessarily something we want to do as it would bloat the size of the file, regardless of whether or not you're using, say, kerberos support. |
This should be fixed in #55037 |
Issue moved from microsoft/dotnet#1273
From @lastcoolnameleft on Monday, November 23, 2020 4:42:46 PM
I'm trying to create a single-file binary to run on Linux; however, it does not include all libraries. I'm unclear why the Kerberos library is needed.
To reproduce:
Start an Ubuntu instance via docker
As you can see, libgssapi_krb5.so.2 was not included.
Due to
-p:PublishSingleFile=true
, I would expect the application to be a statically linked library instead of a dynamically linked one.The text was updated successfully, but these errors were encountered: