Skip to content
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

DllNotFoundException error message doesn't account for musl libc #12577

Closed
bording opened this issue Apr 24, 2019 · 1 comment · Fixed by #66950
Closed

DllNotFoundException error message doesn't account for musl libc #12577

bording opened this issue Apr 24, 2019 · 1 comment · Fixed by #66950
Labels
area-Interop-coreclr help wanted [up-for-grabs] Good issue for external contributors os-linux Linux OS (any supported distro)
Milestone

Comments

@bording
Copy link
Contributor

bording commented Apr 24, 2019

Currently, when there is a problem loading a library on linux, you get a System.DllNotFoundException with the following text:

IDS_EE_NDIRECT_LOADLIB_LINUX            "Unable to load shared library '%1' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: %2"

LD_DEBUG is something implemented in the glibc dynamic loader. If you're on a distro like Alpine, then you're using the musl libc dynamic loader, and it doesn't implement support for LD_DEBUG.

The error message is misleading in that case because setting LD_DEBUG doesn't do anything.

@danmoseley
Copy link
Member

Apparently so https://www.musl-libc.org/doc/1.0.0/manual.html

Please do'nt remove the mention of LD_DEBUG though: it was added intentionally because users were commonly hitting some load error or another often in some library their own app pinvoked into, and did not know how to proceed without posting an issue here. Perhaps it can say "if you're using glibc" and possibly even suggest other means (strace?)

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@elinor-fung elinor-fung added the help wanted [up-for-grabs] Good issue for external contributors label May 11, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 21, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Interop-coreclr help wanted [up-for-grabs] Good issue for external contributors os-linux Linux OS (any supported distro)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants